Bobox
Classes | Public Types | Public Member Functions
bobox::model Class Reference

Represents the model. More...

#include <bobox_model.hpp>

List of all members.

Classes

struct  connection
 Represents a connection between two boxes. More...

Public Types

typedef std::vector
< box_model_id_type > 
box_model_id_vector_type
 List of box identifiers.
typedef std::vector< connectionconnections_type
 List of connections.

Public Member Functions

void add_box (box_model_id_type id, const box_model_ptr_type &box, const box_tid_type &tid=box_tid_type::null())
 Adds a new box to the model.
void add_connection (box_model_id_type source_box_id, output_index_type output, box_model_id_type destination_box_id, input_index_type input, bool cross=true)
 Adds a new connection to the model.
void add_connection (const connection::source &src, const connection::destination &dest, bool cross=true)
 Adds a new connection to the model.
void erase_connection (box_model_id_type source_box_id, box_model_id_type destination_box_id)
 Erases the connection given connection.
const box_model_ptr_typeget_box_model (box_model_id_type id) const
 Gets a box model with the given id.
const box_tid_typeget_box_tid (box_model_id_type id) const
 Gets a tid of the box with the given id.
void get_boxes (box_model_id_vector_type &ids) const
 Gets all boxes in the model.
const connections_typeget_connections () const
 Gets all connections in the model.
box_model_id_type get_input_box () const
 Gets the input box.
connections_type get_inputs (box_model_id_type id) const
 Gets all inputs of the given box.
box_model_id_type get_next_id ()
 Gets the next unused identifier.
box_model_id_type get_output_box () const
 Gets the output box.
connections_type get_outputs (box_model_id_type id) const
 Gets all outputs of the given box.
bool has_box (box_model_id_type id) const
 Query if a box with the given id exists.
model_boxinstantiate (box_id_type id, const box_tid_type &tid, const io_multipliers_type &input_multipliers, const io_multipliers_type &output_multipliers, plevel_type plevel, request *req) const
 Instantiates the model and returns the new instance of model box .
bool is_volatile () const
 Query if this model is volatile. Volatile models are not autoparallelized.
void replace_box (box_model_id_type which, const box_model_ptr_type &with, const box_tid_type &tid=box_tid_type::null())
 Replaces a box by a new box.
void set_input_box (box_model_id_type id)
 Sets the new input box.
void set_output_box (box_model_id_type id)
 Sets the new output box.
void set_volatile (bool is_volatile)
 Sets a volatileness of the box.

Detailed Description

Represents the model.


Member Function Documentation

void bobox::model::add_connection ( box_model_id_type  source_box_id,
output_index_type  output,
box_model_id_type  destination_box_id,
input_index_type  input,
bool  cross = true 
)

Adds a new connection to the model.

Parameters:
source_box_idIdentifier of the source box.
outputThe output of the source box.
destination_box_idIdentifier of the destination box.
inputThe input of the destination box.
cross(optional) Determines wheter the connection is crossed or straight.
void bobox::model::add_connection ( const connection::source src,
const connection::destination dest,
bool  cross = true 
)

Adds a new connection to the model.

Parameters:
srcSource of the connection.
destDestination of the connection.
cross(optional) Determines wheter the connection is crossed or straight.
model_box* bobox::model::instantiate ( box_id_type  id,
const box_tid_type tid,
const io_multipliers_type &  input_multipliers,
const io_multipliers_type &  output_multipliers,
plevel_type  plevel,
request req 
) const

Instantiates the model and returns the new instance of model box .

Parameters:
idThe identifier of the model box.
tidThe tid of the model box.
input_multipliersThe input multipliers of the model box.
output_multipliersThe output multipliers of the model box.
plevelThe plevel of the model box.
reqThe request to which the model box will belong.
Returns:
The new instance of model box.

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