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
1e8692e9
Commit
1e8692e9
authored
Sep 17, 2014
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add subsection for `message_builder`
parent
556957e8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
11 deletions
+16
-11
manual/PatternMatching.tex
manual/PatternMatching.tex
+16
-11
No files found.
manual/PatternMatching.tex
View file @
1e8692e9
...
...
@@ -129,7 +129,6 @@ others() >> [] {
}
\end{lstlisting}
\clearpage
\subsection
{
Projections and Extractors
}
Projections perform type conversions or extract data from a given input.
...
...
@@ -164,15 +163,21 @@ A pattern does not match if a projection failed.
The types for the pattern are deduced from the functor's signature.
If the functor returns an
\lstinline
^
option<T>
^
, then
\lstinline
^
T
^
is deduced.
%\clearpage
%\subsection{Match Expressions}
\subsection
{
Dynamically Building Messages
}
Usually, messages are created implicitly when sending messages but can also be created explicitly using
\lstinline
^
make
_
message
^
.
In both cases, types and number of elements is fixed at compile time.
To allow for fully dynamic message generation,
\lib
also offers a third option to create messages by using a
\lstinline
^
message
_
builder
^
:
\begin{lstlisting}
message
_
builder mb;
// prefix message with some atom
mb.append(atom("strings"));
// fill message with some strings
std::vector<std::string> strings
{
/*...*/
}
;
for (auto
&
str : strings)
{
mb.append(str);
}
// create the message
message msg = mb.to
_
message();
\end{lstlisting}
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