ecto
|
ecto::cell is the non virtual interface to the basic building block of ecto graphs. This interface should never be the parent of client cell, but may be used for polymorphic access to client cells. More...
#include <cell.hpp>
Public Types | |
typedef boost::shared_ptr< cell > | ptr |
A convenience pointer typedef. More... | |
Public Member Functions | |
cell () | |
virtual | ~cell () |
void | declare_params () |
Dispatches parameter declaration code. After this code, the parameters for the cell will be set to their defaults. More... | |
void | declare_io () |
Dispatches input/output declaration code. It is assumed that the parameters have been declared before this is called, so that inputs and outputs may be dependent on those parameters. More... | |
void | configure () |
Given initialized parameters,inputs, and outputs, this will dispatch the client configuration code. This will allocated an instace of the clients cell, so this should not be called during introspection. More... | |
void | activate () |
Activate the cell. i.e. Put it into a "ready" state, opening sockets, etc. More... | |
void | deactivate () |
Deactivate the cell. i.e. Put it into an "unready" state, closing sockets, etc. More... | |
void | start () |
void | stop () |
ReturnCode | process () |
Dispatches the process function for the client cell. This should only be called from one thread at a time. Also, this function may throw exceptions... More... | |
ReturnCode | process_with_only_these_inputs (const tendrils &connected_inputs) |
std::string | type () const |
Return the type of the child class. More... | |
std::string | name () const |
Grab the name of the instance. More... | |
void | name (const std::string &name) |
Set the name of the instance. More... | |
std::string | short_doc () const |
Set the short_doc_ of the instance. More... | |
void | short_doc (const std::string &short_doc) |
Set the short_doc_ of the instance. More... | |
void | reset_strand () |
void | set_strand (ecto::strand) |
std::string | gen_doc (const std::string &doc="A module...") const |
Generate an Restructured Text doc string for the cell. Includes documentation for all parameters, inputs, outputs. More... | |
void | verify_params () const |
void | verify_inputs () const |
bool | process_connected_inputs_only () const |
Processing mode query - only connected tendrils or all. Typically used by the scheduler to arrange input tendrils when invoking a process. More... | |
void | set_process_connected_inputs_only (const bool &value) |
ptr | clone () const |
virtual bool | init ()=0 |
Public Attributes | |
tendrils | parameters |
Parameters. More... | |
tendrils | inputs |
Inputs, inboxes, always have a valid value ( may be NULL ) More... | |
tendrils | outputs |
Outputs, outboxes, always have a valid value ( may be NULL ) More... | |
boost::optional< strand > | strand_ |
The strand that this cell should be executed in. More... | |
Protected Member Functions | |
virtual void | dispatch_declare_params (tendrils &t)=0 |
virtual void | dispatch_declare_io (const tendrils ¶ms, tendrils &inputs, tendrils &outputs)=0 |
virtual void | dispatch_configure (const tendrils ¶ms, const tendrils &inputs, const tendrils &outputs)=0 |
virtual void | dispatch_activate ()=0 |
virtual void | dispatch_deactivate ()=0 |
virtual ReturnCode | dispatch_process (const tendrils &inputs, const tendrils &outputs)=0 |
virtual void | dispatch_start ()=0 |
virtual void | dispatch_stop ()=0 |
virtual std::string | dispatch_name () const =0 |
virtual ptr | dispatch_clone () const =0 |
virtual std::string | dispatch_short_doc () const |
virtual void | dispatch_short_doc (const std::string &) |
Private Member Functions | |
cell (const cell &) | |
Private Attributes | |
std::string | instance_name_ |
bool | configured_ |
bool | activated_ |
bool | process_connected_inputs_only_ |
ecto::cell is the non virtual interface to the basic building block of ecto graphs. This interface should never be the parent of client cell, but may be used for polymorphic access to client cells.
Clients should expose their code to this interface through ecto::wrap, or ecto::create_cell<T>().
For a client's cell to satisfy the ecto::cell idiom, it must look similar to the following definition.
All functions are optional.
typedef boost::shared_ptr<cell> ecto::cell::ptr |
A convenience pointer typedef.
ecto::cell::cell | ( | ) |
|
virtual |
|
private |
void ecto::cell::activate | ( | ) |
Activate the cell. i.e. Put it into a "ready" state, opening sockets, etc.
ptr ecto::cell::clone | ( | ) | const |
void ecto::cell::configure | ( | ) |
Given initialized parameters,inputs, and outputs, this will dispatch the client configuration code. This will allocated an instace of the clients cell, so this should not be called during introspection.
void ecto::cell::deactivate | ( | ) |
Deactivate the cell. i.e. Put it into an "unready" state, closing sockets, etc.
void ecto::cell::declare_io | ( | ) |
Dispatches input/output declaration code. It is assumed that the parameters have been declared before this is called, so that inputs and outputs may be dependent on those parameters.
void ecto::cell::declare_params | ( | ) |
Dispatches parameter declaration code. After this code, the parameters for the cell will be set to their defaults.
|
protectedpure virtual |
Implemented in ecto::cell_< Impl >.
|
protectedpure virtual |
Implemented in ecto::cell_< Impl >.
|
protectedpure virtual |
Implemented in ecto::cell_< Impl >.
|
protectedpure virtual |
Implemented in ecto::cell_< Impl >.
|
protectedpure virtual |
Implemented in ecto::cell_< Impl >.
|
protectedpure virtual |
Implemented in ecto::cell_< Impl >.
|
protectedpure virtual |
Implemented in ecto::cell_< Impl >.
|
protectedpure virtual |
Implemented in ecto::cell_< Impl >.
|
inlineprotectedvirtual |
Reimplemented in ecto::cell_< Impl >.
|
inlineprotectedvirtual |
Reimplemented in ecto::cell_< Impl >.
|
protectedpure virtual |
Implemented in ecto::cell_< Impl >.
|
protectedpure virtual |
Implemented in ecto::cell_< Impl >.
std::string ecto::cell::gen_doc | ( | const std::string & | doc = "A module..." | ) | const |
Generate an Restructured Text doc string for the cell. Includes documentation for all parameters, inputs, outputs.
doc | The highest level documentation for the cell. |
|
pure virtual |
Implemented in ecto::cell_< Impl >.
|
inline |
Grab the name of the instance.
|
inline |
Set the name of the instance.
ReturnCode ecto::cell::process | ( | ) |
Dispatches the process function for the client cell. This should only be called from one thread at a time. Also, this function may throw exceptions...
|
inline |
Processing mode query - only connected tendrils or all. Typically used by the scheduler to arrange input tendrils when invoking a process.
ReturnCode ecto::cell::process_with_only_these_inputs | ( | const tendrils & | connected_inputs | ) |
void ecto::cell::reset_strand | ( | ) |
|
inline |
void ecto::cell::set_strand | ( | ecto::strand | ) |
|
inline |
Set the short_doc_ of the instance.
|
inline |
Set the short_doc_ of the instance.
void ecto::cell::start | ( | ) |
scheduler is going to call process() zero or more times.
void ecto::cell::stop | ( | ) |
scheduler is not going to call process() for a while.
|
inline |
Return the type of the child class.
void ecto::cell::verify_inputs | ( | ) | const |
void ecto::cell::verify_params | ( | ) | const |
|
private |
|
private |
tendrils ecto::cell::inputs |
Inputs, inboxes, always have a valid value ( may be NULL )
|
private |
tendrils ecto::cell::outputs |
Outputs, outboxes, always have a valid value ( may be NULL )
tendrils ecto::cell::parameters |
Parameters.
|
private |
boost::optional<strand> ecto::cell::strand_ |
The strand that this cell should be executed in.