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
1df31891
Commit
1df31891
authored
Aug 25, 2011
by
neverlord
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
moved invoke_rules implementation to own .cpp file
parent
0bccb735
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
103 additions
and
48 deletions
+103
-48
Makefile.am
Makefile.am
+1
-0
cppa.files
cppa.files
+1
-0
cppa/invoke_rules.hpp
cppa/invoke_rules.hpp
+16
-48
src/invoke_rules.cpp
src/invoke_rules.cpp
+85
-0
No files found.
Makefile.am
View file @
1df31891
...
@@ -28,6 +28,7 @@ libcppa_la_SOURCES = \
...
@@ -28,6 +28,7 @@ libcppa_la_SOURCES = \
src/group.cpp
\
src/group.cpp
\
src/intermediate.cpp
\
src/intermediate.cpp
\
src/invokable.cpp
\
src/invokable.cpp
\
src/invoke_rules.cpp
\
src/mailman.cpp
\
src/mailman.cpp
\
src/matcher_arguments.cpp
\
src/matcher_arguments.cpp
\
src/message.cpp
\
src/message.cpp
\
...
...
cppa.files
View file @
1df31891
...
@@ -210,3 +210,4 @@ cppa/detail/boxed.hpp
...
@@ -210,3 +210,4 @@ cppa/detail/boxed.hpp
cppa/detail/unboxed.hpp
cppa/detail/unboxed.hpp
cppa/detail/matcher_arguments.hpp
cppa/detail/matcher_arguments.hpp
src/matcher_arguments.cpp
src/matcher_arguments.cpp
src/invoke_rules.cpp
cppa/invoke_rules.hpp
View file @
1df31891
...
@@ -50,57 +50,25 @@ struct invoke_rules
...
@@ -50,57 +50,25 @@ struct invoke_rules
invoke_rules
(
const
invoke_rules
&
)
=
delete
;
invoke_rules
(
const
invoke_rules
&
)
=
delete
;
invoke_rules
&
operator
=
(
const
invoke_rules
&
)
=
delete
;
invoke_rules
&
operator
=
(
const
invoke_rules
&
)
=
delete
;
invoke_rules
(
list_type
&&
ll
)
:
m_list
(
std
::
move
(
ll
))
{
}
invoke_rules
(
list_type
&&
ll
)
;
public:
public:
invoke_rules
()
{
}
invoke_rules
()
=
default
;
invoke_rules
(
invoke_rules
&&
other
)
:
m_list
(
std
::
move
(
other
.
m_list
))
invoke_rules
(
invoke_rules
&&
other
);
{
}
invoke_rules
(
detail
::
invokable
*
arg
);
invoke_rules
(
detail
::
invokable
*
arg
)
invoke_rules
(
std
::
unique_ptr
<
detail
::
invokable
>&&
arg
);
{
if
(
arg
)
m_list
.
push_back
(
std
::
unique_ptr
<
detail
::
invokable
>
(
arg
));
bool
operator
()(
const
any_tuple
&
t
)
const
;
}
detail
::
intermediate
*
get_intermediate
(
const
any_tuple
&
t
)
const
;
invoke_rules
(
std
::
unique_ptr
<
detail
::
invokable
>&&
arg
)
{
invoke_rules
&
splice
(
invoke_rules
&&
other
);
if
(
arg
)
m_list
.
push_back
(
std
::
move
(
arg
));
}
invoke_rules
operator
,(
invoke_rules
&&
other
);
bool
operator
()(
const
any_tuple
&
t
)
const
{
for
(
auto
i
=
m_list
.
begin
();
i
!=
m_list
.
end
();
++
i
)
{
if
((
*
i
)
->
invoke
(
t
))
return
true
;
}
return
false
;
}
detail
::
intermediate
*
get_intermediate
(
const
any_tuple
&
t
)
const
{
detail
::
intermediate
*
result
;
for
(
auto
i
=
m_list
.
begin
();
i
!=
m_list
.
end
();
++
i
)
{
result
=
(
*
i
)
->
get_intermediate
(
t
);
if
(
result
!=
nullptr
)
return
result
;
}
return
nullptr
;
}
invoke_rules
&
splice
(
invoke_rules
&&
other
)
{
m_list
.
splice
(
m_list
.
end
(),
other
.
m_list
);
return
*
this
;
}
invoke_rules
operator
,(
invoke_rules
&&
other
)
{
m_list
.
splice
(
m_list
.
end
(),
other
.
m_list
);
return
std
::
move
(
m_list
);
}
};
};
...
...
src/invoke_rules.cpp
0 → 100644
View file @
1df31891
/******************************************************************************\
* ___ __ *
* /\_ \ __/\ \ *
* \//\ \ /\_\ \ \____ ___ _____ _____ __ *
* \ \ \ \/\ \ \ '__`\ /'___\/\ '__`\/\ '__`\ /'__`\ *
* \_\ \_\ \ \ \ \L\ \/\ \__/\ \ \L\ \ \ \L\ \/\ \L\.\_ *
* /\____\\ \_\ \_,__/\ \____\\ \ ,__/\ \ ,__/\ \__/.\_\ *
* \/____/ \/_/\/___/ \/____/ \ \ \/ \ \ \/ \/__/\/_/ *
* \ \_\ \ \_\ *
* \/_/ \/_/ *
* *
* Copyright (C) 2011, Dominik Charousset <dominik.charousset@haw-hamburg.de> *
* *
* This file is part of libcppa. *
* libcppa is free software: you can redistribute it and/or modify it under *
* the terms of the GNU Lesser General Public License as published by the *
* Free Software Foundation, either version 3 of the License *
* or (at your option) any later version. *
* *
* libcppa is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with libcppa. If not, see <http://www.gnu.org/licenses/>. *
\******************************************************************************/
#include "cppa/invoke_rules.hpp"
namespace
cppa
{
invoke_rules
::
invoke_rules
(
list_type
&&
ll
)
:
m_list
(
std
::
move
(
ll
))
{
}
invoke_rules
::
invoke_rules
(
invoke_rules
&&
other
)
:
m_list
(
std
::
move
(
other
.
m_list
))
{
}
invoke_rules
::
invoke_rules
(
detail
::
invokable
*
arg
)
{
if
(
arg
)
m_list
.
push_back
(
std
::
unique_ptr
<
detail
::
invokable
>
(
arg
));
}
invoke_rules
::
invoke_rules
(
std
::
unique_ptr
<
detail
::
invokable
>&&
arg
)
{
if
(
arg
)
m_list
.
push_back
(
std
::
move
(
arg
));
}
bool
invoke_rules
::
operator
()(
const
any_tuple
&
t
)
const
{
for
(
auto
i
=
m_list
.
begin
();
i
!=
m_list
.
end
();
++
i
)
{
if
((
*
i
)
->
invoke
(
t
))
return
true
;
}
return
false
;
}
detail
::
intermediate
*
invoke_rules
::
get_intermediate
(
const
any_tuple
&
t
)
const
{
detail
::
intermediate
*
result
;
for
(
auto
i
=
m_list
.
begin
();
i
!=
m_list
.
end
();
++
i
)
{
result
=
(
*
i
)
->
get_intermediate
(
t
);
if
(
result
!=
nullptr
)
return
result
;
}
return
nullptr
;
}
invoke_rules
&
invoke_rules
::
splice
(
invoke_rules
&&
other
)
{
m_list
.
splice
(
m_list
.
end
(),
other
.
m_list
);
return
*
this
;
}
invoke_rules
invoke_rules
::
operator
,(
invoke_rules
&&
other
)
{
m_list
.
splice
(
m_list
.
end
(),
other
.
m_list
);
return
std
::
move
(
m_list
);
}
}
// namespace cppa
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