ecto
Public Types | Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
ecto::plasm Struct Reference

The plasm helps construct the graph structure in ecto. It enforces several invariants that are necessary for scheduling DAGs and is used by all the ecto::schedulers to enable execution of modules that are connected in the graph. More...

#include <plasm.hpp>

Inheritance diagram for ecto::plasm:
Inheritance graph
[legend]
Collaboration diagram for ecto::plasm:
Collaboration graph
[legend]

Public Types

typedef boost::shared_ptr< plasmptr
 
typedef boost::shared_ptr< plasm const > cptr
 

Public Member Functions

 plasm ()
 
 ~plasm ()
 
void insert (cell_ptr mod)
 Insert the cell into the graph so that it may be executed by a scheduler. More...
 
void connect (cell_ptr from, const std::string &output, cell_ptr to, const std::string &input)
 Connect one cell to another, and populate the graph accordingly. This will throw on a type mismatch. More...
 
void disconnect (cell_ptr from, const std::string &output, cell_ptr to, const std::string &input)
 
void viz (std::ostream &out) const
 output graphviz to a stream. More...
 
std::string viz () const
 Get a std::string graphiz of the cell. More...
 
void check () const
 Check that all tags on the graph are satisfied. This will throw on errors in the graph, including, if required inputs are not connected if required outputs are not connected, if there are cycles, etc... More...
 
graph::graph_tgraph ()
 Get the underlying boost graph that this plasm has constructed. More...
 
const graph::graph_tgraph () const
 
std::size_t size () const
 Return the number of cells in the plasm (vertices in the graph) More...
 
std::vector< cell_ptrcells () const
 Grab a set of all the cells from the plasm. More...
 
void configure_all ()
 Calls configure on all modules, if configure has not already been called. More...
 
void activate_all ()
 Calls activate on all modules, if hasn't already been called. More...
 
void deactivate_all ()
 Calls deactivate on all modules, if it hasn't already been called. More...
 
void reset_ticks ()
 
void save (std::ostream &) const
 
void load (std::istream &)
 

Private Member Functions

template<class Archive >
void save (Archive &ar, const unsigned int) const
 
template<class Archive >
void load (Archive &ar, const unsigned int)
 
 BOOST_SERIALIZATION_SPLIT_MEMBER ()
 

Private Attributes

boost::shared_ptr< impl > impl_
 
bool configured
 

Friends

class boost::serialization::access
 

Detailed Description

The plasm helps construct the graph structure in ecto. It enforces several invariants that are necessary for scheduling DAGs and is used by all the ecto::schedulers to enable execution of modules that are connected in the graph.

Member Typedef Documentation

typedef boost::shared_ptr<plasm const> ecto::plasm::cptr
typedef boost::shared_ptr<plasm> ecto::plasm::ptr

Constructor & Destructor Documentation

ecto::plasm::plasm ( )
ecto::plasm::~plasm ( )

Member Function Documentation

void ecto::plasm::activate_all ( )

Calls activate on all modules, if hasn't already been called.

ecto::plasm::BOOST_SERIALIZATION_SPLIT_MEMBER ( )
private
std::vector<cell_ptr> ecto::plasm::cells ( ) const

Grab a set of all the cells from the plasm.

Returns
a set of cells.
void ecto::plasm::check ( ) const

Check that all tags on the graph are satisfied. This will throw on errors in the graph, including, if required inputs are not connected if required outputs are not connected, if there are cycles, etc...

void ecto::plasm::configure_all ( )

Calls configure on all modules, if configure has not already been called.

void ecto::plasm::connect ( cell_ptr  from,
const std::string &  output,
cell_ptr  to,
const std::string &  input 
)

Connect one cell to another, and populate the graph accordingly. This will throw on a type mismatch.

Parameters
fromThe from cell
outputThe output key of the from cell
toThe to cell
inputThe input key from the to cell.
void ecto::plasm::deactivate_all ( )

Calls deactivate on all modules, if it hasn't already been called.

void ecto::plasm::disconnect ( cell_ptr  from,
const std::string &  output,
cell_ptr  to,
const std::string &  input 
)

Disconnect a tendril from another tendril.

Parameters
from
output
to
input
graph::graph_t& ecto::plasm::graph ( )

Get the underlying boost graph that this plasm has constructed.

Returns
const graph::graph_t& ecto::plasm::graph ( ) const
void ecto::plasm::insert ( cell_ptr  mod)

Insert the cell into the graph so that it may be executed by a scheduler.

Parameters
modThe cell to insert into the graph.
void ecto::plasm::load ( std::istream &  )
template<class Archive >
void ecto::plasm::load ( Archive &  ar,
const unsigned  int 
)
private
void ecto::plasm::reset_ticks ( )
void ecto::plasm::save ( std::ostream &  ) const
template<class Archive >
void ecto::plasm::save ( Archive &  ar,
const unsigned  int 
) const
private
std::size_t ecto::plasm::size ( ) const

Return the number of cells in the plasm (vertices in the graph)

void ecto::plasm::viz ( std::ostream &  out) const

output graphviz to a stream.

Parameters
outthe output stream. Graphviz will be in plain text format.
std::string ecto::plasm::viz ( ) const

Get a std::string graphiz of the cell.

Returns

Friends And Related Function Documentation

friend class boost::serialization::access
friend

Member Data Documentation

bool ecto::plasm::configured
private
boost::shared_ptr<impl> ecto::plasm::impl_
private

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