Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
senf
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
wiback
senf
Commits
a4cb190a
Commit
a4cb190a
authored
17 years ago
by
dw6
Browse files
Options
Downloads
Patches
Plain Diff
major bugs fixed :-)
parent
7eccff90
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
PPI/ForwardSwitch.cci
+13
-6
13 additions, 6 deletions
PPI/ForwardSwitch.cci
PPI/ForwardSwitch.hh
+5
-3
5 additions, 3 deletions
PPI/ForwardSwitch.hh
with
18 additions
and
9 deletions
PPI/ForwardSwitch.cci
+
13
−
6
View file @
a4cb190a
...
...
@@ -20,30 +20,37 @@
#include "ForwardSwitch.hh"
#define prefix_
#define prefix_
inline
prefix_ ForwardSwitch::ForwardSwitch(bool state)
prefix_
senf::ppi::module::
ForwardSwitch::ForwardSwitch(bool state)
{
route( input, output );
input.onRequest( &ForwardSwitch::onRequest );
forward_ = state;
}
prefix_ bool ForwardSwitch::forward(){
prefix_ void senf::ppi::module::ForwardSwitch::onRequest()
{
if(forward_){
output(input());
}
}
prefix_ bool senf::ppi::module::ForwardSwitch::forward(){
return forward_;
}
prefix_ bool ForwardSwitch::forward(bool state){
prefix_ bool
senf::ppi::module::
ForwardSwitch::forward(bool state){
forward_ = state;
return state;
}
prefix_
void
ForwardSwitch::stopForwarding(){
prefix_
bool senf::ppi::module::
ForwardSwitch::stopForwarding(){
return forward(false);
}
prefix_
void
ForwardSwitch::startForwarding(){
prefix_
bool senf::ppi::module::
ForwardSwitch::startForwarding(){
return forward(true);
}
...
...
This diff is collapsed.
Click to expand it.
PPI/ForwardSwitch.hh
+
5
−
3
View file @
a4cb190a
...
...
@@ -35,18 +35,20 @@ class ForwardSwitch
SENF_PPI_MODULE
(
ForwardSwitch
);
public:
connector
::
Act
iveInput
<>
input
;
connector
::
Pass
iveInput
<>
input
;
connector
::
ActiveOutput
<>
output
;
ForwardSwitch
(
bool
state
);
private:
void
onRequest
();
bool
forward_
;
bool
forward
();
bool
forward
(
bool
state
);
void
stopForwarding
();
void
startForwarding
();
bool
stopForwarding
();
bool
startForwarding
();
};
}}}
//namespaces
#include
"ForwardSwitch.cci"
#endif
/*FORWARDSWITCH_HH_*/
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment