Inheritance diagram for csp::common::Prefix< DATA_TYPE >:
This process first sends out its initial value, and then repeatedly: reads a value from its input channel, then writes it on its output channel. That is, it sends out its initial value on its output channel, then behaves as Id.
To use this process, you will need to include <cppcsp/common/basic.h>
Public Member Functions
|Prefix (const Chanin< DATA_TYPE > &_in, const Chanout< DATA_TYPE > &_out, const DATA_TYPE &initialValue, const int _times=1)|
|Constructs the Prefix process. |
Protected Member Functions
|You must implement this function to provide the code for your process. |
|csp::common::Prefix< DATA_TYPE >::Prefix||(||const Chanin< DATA_TYPE > &||_in,|
|const Chanout< DATA_TYPE > &||_out,|
|const DATA_TYPE &||initialValue,|
|const int|| _times = |
Constructs the Prefix process.
|_in||The input channel|
|_out||The output channel|
|initialValue||The value to prefix to (send first on) the channel|
|_times||The number of times to send the prefixed value. Defaults to one.|
|void csp::common::Prefix< DATA_TYPE >::run||(||)||
You must implement this function to provide the code for your process.
When the run method finishes, the process will terminate.
You should not let an uncaught exception cause the end of this function. If it derives from std::exception, it will be caught (although this behaviour should not be relied upon) but otherwise undefined behaviour will result.