ecto
Classes | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes | List of all members
ecto::cell_< Impl > Struct Template Reference

cell_<T> is for registering an arbitrary class with the the cell NVI. This adds a barrier between client code and the cell. More...

#include <cell.hpp>

Inheritance diagram for ecto::cell_< Impl >:
Inheritance graph
[legend]
Collaboration diagram for ecto::cell_< Impl >:
Collaboration graph
[legend]

Classes

struct  int_
 

Public Types

typedef boost::shared_ptr< cell_< Impl > > ptr
 
typedef int_< 0 > not_implemented
 
typedef int_< 1 > implemented
 
typedef int_< has_f< Impl >::declare_paramshas_declare_params
 
typedef int_< has_f< Impl >::declare_iohas_declare_io
 
- Public Types inherited from ecto::cell
typedef boost::shared_ptr< cellptr
 A convenience pointer typedef. More...
 

Public Member Functions

 cell_ ()
 
 ~cell_ ()
 
void dispatch_declare_params (tendrils &params)
 
void dispatch_declare_io (const tendrils &params, tendrils &inputs, tendrils &outputs)
 
void configure (const tendrils &, const tendrils &, const tendrils &, not_implemented)
 
void configure (const tendrils &params, const tendrils &inputs, const tendrils &outputs, implemented)
 
void dispatch_configure (const tendrils &params, const tendrils &inputs, const tendrils &outputs)
 
void activate (not_implemented)
 
void activate (implemented)
 
void dispatch_activate ()
 
void deactivate (not_implemented)
 
void deactivate (implemented)
 
void dispatch_deactivate ()
 
ReturnCode process (const tendrils &, const tendrils &, not_implemented)
 
ReturnCode process (const tendrils &inputs, const tendrils &outputs, implemented)
 
ReturnCode dispatch_process (const tendrils &inputs, const tendrils &outputs)
 
void start (not_implemented)
 
void start (implemented)
 
void dispatch_start ()
 
void stop (not_implemented)
 
void stop (implemented)
 
void dispatch_stop ()
 
std::string dispatch_name () const
 
std::string dispatch_short_doc () const
 
void dispatch_short_doc (const std::string &)
 
cell::ptr dispatch_clone () const
 
bool init ()
 
Impl & impl ()
 Grab a typed reference to the implementation of the cell. More...
 
const Impl & impl () const
 
- Public Member Functions inherited from ecto::cell
 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
 

Static Public Member Functions

static void declare_params (tendrils &params, not_implemented)
 
static void declare_params (tendrils &params, implemented)
 
static void declare_params (tendrils &params)
 
static void declare_io (const tendrils &params, tendrils &inputs, tendrils &outputs, not_implemented)
 
static void declare_io (const tendrils &params, tendrils &inputs, tendrils &outputs, implemented)
 
static void declare_io (const tendrils &params, tendrils &inputs, tendrils &outputs)
 

Static Public Attributes

static std::string SHORT_DOC
 
static std::string CELL_NAME
 The python name for the cell. More...
 
static std::string MODULE_NAME
 The module that the cell is part of. More...
 
static const std::string CELL_TYPE_NAME = ecto::name_of<Impl>()
 

Private Member Functions

void init_strand (boost::mpl::true_)
 
void init_strand (boost::mpl::false_)
 

Private Attributes

boost::scoped_ptr< Impl > impl_
 

Additional Inherited Members

- Public Attributes inherited from ecto::cell
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< strandstrand_
 The strand that this cell should be executed in. More...
 

Detailed Description

template<class Impl>
struct ecto::cell_< Impl >

cell_<T> is for registering an arbitrary class with the the cell NVI. This adds a barrier between client code and the cell.

Member Typedef Documentation

template<class Impl >
typedef int_<has_f<Impl>::declare_io> ecto::cell_< Impl >::has_declare_io
template<class Impl >
typedef int_<has_f<Impl>::declare_params> ecto::cell_< Impl >::has_declare_params
template<class Impl >
typedef int_<1> ecto::cell_< Impl >::implemented
template<class Impl >
typedef int_<0> ecto::cell_< Impl >::not_implemented
template<class Impl >
typedef boost::shared_ptr<cell_<Impl> > ecto::cell_< Impl >::ptr

Constructor & Destructor Documentation

template<class Impl >
ecto::cell_< Impl >::cell_ ( )
inline
template<class Impl >
ecto::cell_< Impl >::~cell_ ( )
inline

Member Function Documentation

template<class Impl >
void ecto::cell_< Impl >::activate ( not_implemented  )
inline
template<class Impl >
void ecto::cell_< Impl >::activate ( implemented  )
inline
template<class Impl >
void ecto::cell_< Impl >::configure ( const tendrils ,
const tendrils ,
const tendrils ,
not_implemented   
)
inline
template<class Impl >
void ecto::cell_< Impl >::configure ( const tendrils params,
const tendrils inputs,
const tendrils outputs,
implemented   
)
inline
template<class Impl >
void ecto::cell_< Impl >::deactivate ( not_implemented  )
inline
template<class Impl >
void ecto::cell_< Impl >::deactivate ( implemented  )
inline
template<class Impl >
static void ecto::cell_< Impl >::declare_io ( const tendrils params,
tendrils inputs,
tendrils outputs,
not_implemented   
)
inlinestatic
template<class Impl >
static void ecto::cell_< Impl >::declare_io ( const tendrils params,
tendrils inputs,
tendrils outputs,
implemented   
)
inlinestatic
template<class Impl >
static void ecto::cell_< Impl >::declare_io ( const tendrils params,
tendrils inputs,
tendrils outputs 
)
inlinestatic
template<class Impl >
static void ecto::cell_< Impl >::declare_params ( tendrils params,
not_implemented   
)
inlinestatic
template<class Impl >
static void ecto::cell_< Impl >::declare_params ( tendrils params,
implemented   
)
inlinestatic
template<class Impl >
static void ecto::cell_< Impl >::declare_params ( tendrils params)
inlinestatic
template<class Impl >
void ecto::cell_< Impl >::dispatch_activate ( )
inlinevirtual

Implements ecto::cell.

template<class Impl >
cell::ptr ecto::cell_< Impl >::dispatch_clone ( ) const
inlinevirtual

Implements ecto::cell.

template<class Impl >
void ecto::cell_< Impl >::dispatch_configure ( const tendrils params,
const tendrils inputs,
const tendrils outputs 
)
inlinevirtual

Implements ecto::cell.

template<class Impl >
void ecto::cell_< Impl >::dispatch_deactivate ( )
inlinevirtual

Implements ecto::cell.

template<class Impl >
void ecto::cell_< Impl >::dispatch_declare_io ( const tendrils params,
tendrils inputs,
tendrils outputs 
)
inlinevirtual

Implements ecto::cell.

template<class Impl >
void ecto::cell_< Impl >::dispatch_declare_params ( tendrils params)
inlinevirtual

Implements ecto::cell.

template<class Impl >
std::string ecto::cell_< Impl >::dispatch_name ( ) const
inlinevirtual

Implements ecto::cell.

template<class Impl >
ReturnCode ecto::cell_< Impl >::dispatch_process ( const tendrils inputs,
const tendrils outputs 
)
inlinevirtual

Implements ecto::cell.

template<class Impl >
std::string ecto::cell_< Impl >::dispatch_short_doc ( ) const
inlinevirtual

Reimplemented from ecto::cell.

template<class Impl >
void ecto::cell_< Impl >::dispatch_short_doc ( const std::string &  )
inlinevirtual

Reimplemented from ecto::cell.

template<class Impl >
void ecto::cell_< Impl >::dispatch_start ( )
inlinevirtual

Implements ecto::cell.

template<class Impl >
void ecto::cell_< Impl >::dispatch_stop ( )
inlinevirtual

Implements ecto::cell.

template<class Impl >
Impl& ecto::cell_< Impl >::impl ( )
inline

Grab a typed reference to the implementation of the cell.

template<class Impl >
const Impl& ecto::cell_< Impl >::impl ( ) const
inline
template<typename Impl >
bool ecto::cell_< Impl >::init ( )
virtual

Implements ecto::cell.

template<class Impl >
void ecto::cell_< Impl >::init_strand ( boost::mpl::true_  )
inlineprivate
template<class Impl >
void ecto::cell_< Impl >::init_strand ( boost::mpl::false_  )
inlineprivate
template<class Impl >
ReturnCode ecto::cell_< Impl >::process ( const tendrils ,
const tendrils ,
not_implemented   
)
inline
template<class Impl >
ReturnCode ecto::cell_< Impl >::process ( const tendrils inputs,
const tendrils outputs,
implemented   
)
inline
template<class Impl >
void ecto::cell_< Impl >::start ( not_implemented  )
inline
template<class Impl >
void ecto::cell_< Impl >::start ( implemented  )
inline
template<class Impl >
void ecto::cell_< Impl >::stop ( not_implemented  )
inline
template<class Impl >
void ecto::cell_< Impl >::stop ( implemented  )
inline

Member Data Documentation

template<class Impl >
std::string ecto::cell_< Impl >::CELL_NAME
static

The python name for the cell.

template<class Impl >
const std::string ecto::cell_< Impl >::CELL_TYPE_NAME = ecto::name_of<Impl>()
static
template<class Impl >
boost::scoped_ptr<Impl> ecto::cell_< Impl >::impl_
private
template<class Impl >
std::string ecto::cell_< Impl >::MODULE_NAME
static

The module that the cell is part of.

template<class Impl >
std::string ecto::cell_< Impl >::SHORT_DOC
static

The documentation for this struct was generated from the following file: