Commit 79c5acb1 authored by neverlord's avatar neverlord

documentation

parent a759f53b
......@@ -74,43 +74,72 @@ class actor : public channel
/**
* @brief Forces this actor to subscribe to the group @p what.
*
* The group will be unsubscribed if the actor exits.
* The group will be unsubscribed if the actor finishes execution.
* @param what Group instance that should be joined.
*/
void join(group_ptr& what);
/**
* @brief Forces this actor to leave the group @p what.
* @param what Joined group that should be leaved.
* @note Groups are leaved automatically if the Actor finishes
* execution.
*/
void leave(const group_ptr& what);
/**
* @brief Links this actor to @p other.
* @param other Actor instance that whose execution is coupled to the
* execution of this Actor.
*/
virtual void link_to(intrusive_ptr<actor>& other) = 0;
/**
* @brief Unlinks this actor from @p other.
* @param oter Linked Actor.
* @note Links are automatically removed if the Actor finishes execution.
*/
virtual void unlink_from(intrusive_ptr<actor>& other) = 0;
/**
* @brief Establishes a link relation between this actor and @p other.
* @param other Actor instance that wants to link against this Actor.
* @returns @c true if this actor is running and added @p other to its
* list of linked actors.
* list of linked actors; otherwise @c false.
*/
virtual bool establish_backlink(intrusive_ptr<actor>& other) = 0;
/**
* @brief Removes a link relation between this actor and @p other.
* @param other Actor instance that wants to unlink from this Actor.
* @returns @c true if this actor is running and removed @p other
* from its list of linked actors.
* from its list of linked actors; otherwise @c false.
*/
virtual bool remove_backlink(intrusive_ptr<actor>& other) = 0;
// rvalue support
/**
* @copydoc link_to(intrusive_ptr<actor>&)
* Support for rvalue references.
*/
void link_to(intrusive_ptr<actor>&& other);
/**
* @copydoc unlink_from(intrusive_ptr<actor>&)
* Support for rvalue references.
*/
void unlink_from(intrusive_ptr<actor>&& other);
/**
* @copydoc remove_backlink(intrusive_ptr<actor>&)
* Support for rvalue references.
*/
bool remove_backlink(intrusive_ptr<actor>&& to);
/**
* @copydoc establish_backlink(intrusive_ptr<actor>&)
* Support for rvalue references.
*/
bool establish_backlink(intrusive_ptr<actor>&& to);
/**
......@@ -128,7 +157,8 @@ class actor : public channel
inline process_information_ptr parent_process_ptr() const;
/**
* @brief Get the unique identifier of this actor.
* @brief Gets an integer value that uniquely identifies this Actor in
* the process it's executed in.
* @returns The unique identifier of this actor.
*/
inline std::uint32_t id() const;
......@@ -136,7 +166,7 @@ class actor : public channel
/**
* @brief Get the actor that has the unique identifier @p actor_id.
* @returns A pointer to the requestet actor or @c nullptr if no
* running actor with the ID @p actor_id was found.
* running actor with the ID @p actor_id was found in this process.
*/
static intrusive_ptr<actor> by_id(std::uint32_t actor_id);
......
......@@ -6,6 +6,9 @@
namespace cppa {
/**
* @brief Represents a remote Actor.
*/
class actor_proxy : public detail::abstract_actor<actor>
{
......
This diff is collapsed.
......@@ -18,6 +18,9 @@
namespace cppa { namespace detail {
/**
* @brief Implements.
*/
template<class Base>
class abstract_actor : public Base
{
......
......@@ -18,6 +18,9 @@
namespace cppa { namespace detail {
/**
* @brief Represents a thread that was converted to an Actor.
*/
class converted_thread_context : public abstract_actor<local_actor>
{
......
......@@ -14,6 +14,9 @@ namespace cppa { namespace detail {
class task_scheduler;
/**
* @brief A spawned, scheduled Actor.
*/
class scheduled_actor : public abstract_actor<local_actor>
{
......
......@@ -77,7 +77,7 @@ class group : public channel
/**
* @brief Get the name of this module implementation.
* @returnss The name of this module implementation.
* @returns The name of this module implementation.
* @threadsafe
*/
const std::string& name();
......@@ -93,20 +93,20 @@ class group : public channel
/**
* @brief A string representation of the group identifier.
* @returnss The group identifier as string (e.g. "224.0.0.1" for IPv4
* @returns The group identifier as string (e.g. "224.0.0.1" for IPv4
* multicast or a user-defined string for local groups).
*/
const std::string& identifier() const;
/**
* @brief The name of the module.
* @returnss The module name of this group (e.g. "local").
* @returns The module name of this group (e.g. "local").
*/
const std::string& module_name() const;
/**
* @brief Subscribe @p who to this group.
* @returnss A {@link subscription} object that unsubscribes @p who
* @returns A {@link subscription} object that unsubscribes @p who
* if the lifetime of @p who ends.
*/
virtual subscription subscribe(const channel_ptr& who) = 0;
......
......@@ -49,7 +49,7 @@ class process_information : public ref_counted,
/**
* @brief Returns the proccess_information for the running process.
* @returnss
* @returns
*/
static const intrusive_ptr<process_information>& get();
......
......@@ -56,7 +56,7 @@ void receive(invoke_rules& rules, Head&& head, Tail&&... tail)
/**
* @brief Tries to dequeue the next message from the mailbox.
* @returnss @p true if a messages was dequeued;
* @returns @p true if a messages was dequeued;
* @p false if the mailbox is empty
*/
inline bool try_receive(message& msg)
......@@ -66,7 +66,7 @@ inline bool try_receive(message& msg)
/**
* @brief Tries to dequeue the next message from the mailbox.
* @returnss @p true if a messages was dequeued;
* @returns @p true if a messages was dequeued;
* @p false if the mailbox is empty
*/
inline bool try_receive(invoke_rules& rules)
......
......@@ -17,7 +17,30 @@ namespace cppa {
* Serves the requirements of {@link intrusive_ptr}.
* @relates intrusive_ptr
*/
class ref_counted { };
class ref_counted
{
public:
/**
* @brief Increases reference count by one.
*/
void ref();
/**
* @brief Decreases reference cound by one.
* @returns @p true if there are still references to this object
* (reference count > 0); otherwise @p false.
*/
bool deref();
/**
* @brief Queries if there is exactly one reference.
* @returns @p true if reference count is one; otherwise @p false.
*/
bool unique();
};
#else
......
......@@ -73,7 +73,7 @@ class scheduler
/**
* @brief Informs the scheduler about a hidden (non-actor)
* context that should be counted by await_others_done().
* @returnss An {@link attachable} that the hidden context has to destroy
* @returns An {@link attachable} that the hidden context has to destroy
* if his lifetime ends.
*/
virtual attachable* register_hidden_context();
......@@ -104,7 +104,7 @@ void set_scheduler(scheduler* sched);
/**
* @brief Gets the actual used scheduler implementation.
* @returnss The active scheduler (default constructed).
* @returns The active scheduler (default constructed).
*/
scheduler* get_scheduler();
......
......@@ -104,13 +104,13 @@ class uniform_type_info : cppa::util::comparable<uniform_type_info>
/**
* @brief Get instance by uniform name.
* @param uniform_name The libCPPA internal name for a type.
* @returnss The instance associated to @p uniform_name.
* @returns The instance associated to @p uniform_name.
*/
static uniform_type_info* by_uniform_name(const std::string& uniform_name);
/**
* @brief Get all instances.
* @returnss A vector with all known (announced) instances.
* @returns A vector with all known (announced) instances.
*/
static std::vector<uniform_type_info*> instances();
......@@ -118,13 +118,13 @@ class uniform_type_info : cppa::util::comparable<uniform_type_info>
/**
* @brief Get the internal libCPPA name for this type.
* @returnss A string describing the libCPPA internal type name.
* @returns A string describing the libCPPA internal type name.
*/
inline const std::string& name() const { return m_name; }
/**
* @brief Get the unique identifier of this instance.
* @returnss The unique identifier of this instance.
* @returns The unique identifier of this instance.
*/
inline const identifier& id() const { return m_id; }
......
......@@ -20,7 +20,7 @@ struct abstract_type_list
/**
* @brief Increases the iterator position.
* @returnss @c false if the iterator is at the end; otherwise @c true.
* @returns @c false if the iterator is at the end; otherwise @c true.
*/
virtual bool next() = 0;
......
......@@ -565,7 +565,7 @@ WARN_LOGFILE =
# directories like "/usr/src/myproject". Separate the files or directories
# with spaces.
INPUT = cppa/ cppa/util
INPUT = cppa/ cppa/util cppa/detail
# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
......
......@@ -24,7 +24,7 @@ inline void range_check(iterator begin, iterator end, size_t read_size)
}
}
// @returnss the next iterator position
// @returns the next iterator position
template<typename T>
iterator read(iterator, iterator, T&,
typename enable_if< std::is_floating_point<T> >::type* = 0)
......
......@@ -138,7 +138,7 @@ class post_office_worker
return m_parent;
}
// @returnss new reference count
// @returns new reference count
size_t parent_exited(native_socket_t parent_socket)
{
if (has_parent() && parent() == parent_socket)
......@@ -230,7 +230,7 @@ class po_peer : public post_office_worker
}
}
// @returnss false if an error occured; otherwise true
// @returns false if an error occured; otherwise true
bool read_and_continue()
{
switch (m_state)
......@@ -381,7 +381,7 @@ class po_doorman : public post_office_worker
{
}
// @returnss false if an error occured; otherwise true
// @returns false if an error occured; otherwise true
bool read_and_continue()
{
sockaddr addr;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment