Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
Actor Framework
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cpp-libs
Actor Framework
Commits
79c5acb1
Commit
79c5acb1
authored
Oct 27, 2011
by
neverlord
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
documentation
parent
a759f53b
Changes
17
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
265 additions
and
52 deletions
+265
-52
cppa/actor.hpp
cppa/actor.hpp
+35
-5
cppa/actor_proxy.hpp
cppa/actor_proxy.hpp
+3
-0
cppa/cppa.hpp
cppa/cppa.hpp
+172
-24
cppa/detail/abstract_actor.hpp
cppa/detail/abstract_actor.hpp
+3
-0
cppa/detail/converted_thread_context.hpp
cppa/detail/converted_thread_context.hpp
+3
-0
cppa/detail/ref_counted_impl.hpp
cppa/detail/ref_counted_impl.hpp
+3
-3
cppa/detail/scheduled_actor.hpp
cppa/detail/scheduled_actor.hpp
+3
-0
cppa/group.hpp
cppa/group.hpp
+4
-4
cppa/process_information.hpp
cppa/process_information.hpp
+1
-1
cppa/receive.hpp
cppa/receive.hpp
+2
-2
cppa/ref_counted.hpp
cppa/ref_counted.hpp
+24
-1
cppa/scheduler.hpp
cppa/scheduler.hpp
+2
-2
cppa/uniform_type_info.hpp
cppa/uniform_type_info.hpp
+4
-4
cppa/util/abstract_type_list.hpp
cppa/util/abstract_type_list.hpp
+1
-1
libcppa.doxygen
libcppa.doxygen
+1
-1
src/binary_deserializer.cpp
src/binary_deserializer.cpp
+1
-1
src/post_office.cpp
src/post_office.cpp
+3
-3
No files found.
cppa/actor.hpp
View file @
79c5acb1
...
...
@@ -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
);
...
...
cppa/actor_proxy.hpp
View file @
79c5acb1
...
...
@@ -6,6 +6,9 @@
namespace
cppa
{
/**
* @brief Represents a remote Actor.
*/
class
actor_proxy
:
public
detail
::
abstract_actor
<
actor
>
{
...
...
cppa/cppa.hpp
View file @
79c5acb1
This diff is collapsed.
Click to expand it.
cppa/detail/abstract_actor.hpp
View file @
79c5acb1
...
...
@@ -18,6 +18,9 @@
namespace
cppa
{
namespace
detail
{
/**
* @brief Implements.
*/
template
<
class
Base
>
class
abstract_actor
:
public
Base
{
...
...
cppa/detail/converted_thread_context.hpp
View file @
79c5acb1
...
...
@@ -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
>
{
...
...
cppa/detail/ref_counted_impl.hpp
View file @
79c5acb1
...
...
@@ -7,11 +7,11 @@ template<typename T>
class
ref_counted_impl
{
T
m_rc
;
T
m_rc
;
ref_counted_impl
(
const
ref_counted_impl
&
)
=
delete
;
ref_counted_impl
(
const
ref_counted_impl
&
)
=
delete
;
ref_counted_impl
&
operator
=
(
const
ref_counted_impl
&
)
=
delete
;
ref_counted_impl
&
operator
=
(
const
ref_counted_impl
&
)
=
delete
;
public:
...
...
cppa/detail/scheduled_actor.hpp
View file @
79c5acb1
...
...
@@ -14,6 +14,9 @@ namespace cppa { namespace detail {
class
task_scheduler
;
/**
* @brief A spawned, scheduled Actor.
*/
class
scheduled_actor
:
public
abstract_actor
<
local_actor
>
{
...
...
cppa/group.hpp
View file @
79c5acb1
...
...
@@ -77,7 +77,7 @@ class group : public channel
/**
* @brief Get the name of this module implementation.
* @returns
s
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.
* @returns
s
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.
* @returns
s
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.
* @returns
s
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
;
...
...
cppa/process_information.hpp
View file @
79c5acb1
...
...
@@ -49,7 +49,7 @@ class process_information : public ref_counted,
/**
* @brief Returns the proccess_information for the running process.
* @returns
s
* @returns
*/
static
const
intrusive_ptr
<
process_information
>&
get
();
...
...
cppa/receive.hpp
View file @
79c5acb1
...
...
@@ -56,7 +56,7 @@ void receive(invoke_rules& rules, Head&& head, Tail&&... tail)
/**
* @brief Tries to dequeue the next message from the mailbox.
* @returns
s
@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.
* @returns
s
@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
)
...
...
cppa/ref_counted.hpp
View file @
79c5acb1
...
...
@@ -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
...
...
cppa/scheduler.hpp
View file @
79c5acb1
...
...
@@ -73,7 +73,7 @@ class scheduler
/**
* @brief Informs the scheduler about a hidden (non-actor)
* context that should be counted by await_others_done().
* @returns
s
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.
* @returns
s
The active scheduler (default constructed).
* @returns The active scheduler (default constructed).
*/
scheduler
*
get_scheduler
();
...
...
cppa/uniform_type_info.hpp
View file @
79c5acb1
...
...
@@ -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.
* @returns
s
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.
* @returns
s
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.
* @returns
s
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.
* @returns
s
The unique identifier of this instance.
* @returns The unique identifier of this instance.
*/
inline
const
identifier
&
id
()
const
{
return
m_id
;
}
...
...
cppa/util/abstract_type_list.hpp
View file @
79c5acb1
...
...
@@ -20,7 +20,7 @@ struct abstract_type_list
/**
* @brief Increases the iterator position.
* @returns
s
@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
;
...
...
libcppa.doxygen
View file @
79c5acb1
...
...
@@ -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
...
...
src/binary_deserializer.cpp
View file @
79c5acb1
...
...
@@ -24,7 +24,7 @@ inline void range_check(iterator begin, iterator end, size_t read_size)
}
}
// @returns
s
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
)
...
...
src/post_office.cpp
View file @
79c5acb1
...
...
@@ -138,7 +138,7 @@ class post_office_worker
return
m_parent
;
}
// @returns
s
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
}
}
// @returns
s
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
{
}
// @returns
s
false if an error occured; otherwise true
// @returns false if an error occured; otherwise true
bool
read_and_continue
()
{
sockaddr
addr
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment