Bobox
Classes | Typedefs | Enumerations | Functions
bobox Namespace Reference

The main namespace of the Bobox library. More...

Classes

class  allocator
 Allocator for STL containers. Uses bobox::allocate and bobox::deallocate for memory management. More...
class  basic_box
 The base class for most cases. More...
class  basic_box_model
 Partial implementation of the bobox::box_model interface. More...
class  basic_object_factory
 Implementation of the bobox::object_factory. It makes registration of boxes and types easier. More...
class  bobolang
 Contains classes and functions related to Bobolang. More...
class  box
 The interface for box implementations. More...
class  box_model
 Interface for classes which represents model of boxes. More...
struct  box_model_parameters_pack
 Contains all parameters passed to the box model. More...
struct  box_parameters_pack
 Contains all parameters passed to the box. More...
struct  box_pid_type
 Represents the parallel identifier of a box. When boxes are parallelized and work in a group, this identifier distinguishes them. More...
class  broadcast_box
 Broadcasts all envelopes from its input to its all outputs. More...
class  column
 Represents one column in an envelope . More...
class  column_buffer
 Keeps the raw data of the column . More...
class  debug_printer
 Encapsulates some functions for printing debug info. More...
class  dummy_box
 Base class for dummy boxes, i.e. boxes, which wait until all their inputs are closed and then send poisoned envelopes to all their outputs. More...
class  envelope
 Represents an envelope. More...
class  envelope_buffer
 Represents the buffer of envelopes. More...
class  envelope_descriptor
 Descriptor of envelopes. More...
class  envelope_split_box
 Splits every incoming envelope into equal-sized parts and sends them to its output. The splitting algorithm is fair and resistant to rounding errors. More...
class  exception
 The main Bobox exception. More...
class  generic_box_model
 Generic implementation of the bobox::box_model. Should be usable for most cases. More...
class  generic_type_descriptor
 Generic type descriptor parametrized by a type policy. More...
class  good_old_parser
 Parser of the old format of the model description. The Bobolang is better choice now:-) More...
class  group_box
 One of implementation of the bobox::box interface. It is easier to use bobox::basic_box. More...
class  init_box
 Initialization box. It sends a poisoned envelope to its output and initialize the main box bobox::init_box::set_main_box. More...
class  input_index_envelope_buffer
 Buffer for input envelopes which all have the same size of power of 2. The stream might be indexed by size_t in this case. More...
class  input_stream
 Encapsulates manipulation with an input stream. More...
class  io_descriptor
 Descriptor of box input/output. More...
class  join_box
 Collects envelopes from its inputs and passes them to the output. In contrary to bobox::rr_join_box, the ordering of output envelopes is undeterministic. More...
class  manager
 The manager is responsible for request management. i.e. their instatiation and evaluation. In the application at most one instance of this class must exist. More...
class  manager_listener
 Manager listener. The bobox::manager sends its events through this interface. More...
class  model
 Represents the model. More...
class  model_box
 Model box encapsulate the instantiation of bobox::model. See bobox::model::instantiate. More...
class  object_factory
 Interface for box models and types creation. More...
class  output_stream
 Encapsulates manipulation with an output stream. More...
class  parallel_dummy_box
 Parallel dummy box, i.e. the box, which waits until all its inputs are closed and then sends poisoned envelopes to all its outputs. More...
class  parameters
 Represents parameters which are passed to request, box models, boxes and types. More...
class  passthrough_box
 Passthrough box passes all envelopes from input directly to the output. It is used for example as input/output box in bobolang model. More...
class  proxy_box
 Proxy encapsulates two boxes (input and output boxes) so that they look like one box. Its inputs are connected to the input box and its outpus to the output box. More...
class  request
 Represents a request. All boxes of one request shares pointer to its corresponding instance. More...
class  results
 Represents results of a request. More...
class  rr_join_box
 Collects envelopes from its inputs in round-robin manner and passes them to the output. More...
class  rr_split_box
 Dispatches envelopes from its input to its outputs in round-robin manner. More...
class  runtime
 Represents the runtime. In fact, runtimes correspond to front-ends, i.e. each front-end has typically one runtime which is responsible for creation its boxes, data types and for management of data related to the front-end. More...
class  simple_box
 Very simple box, in fact, the simpliest implementation of bobox::box interface. All you need to do is override bobox::box::push_envelope_impl, bobox::box::pull_envelope_impl and optionally bobox::box::init_impl. More...
class  stateful_dummy_box
 Stateful dummy box, i.e. the box, which waits until all its inputs are closed and then sends poisoned envelopes to all its outputs. More...
class  stateless_dummy_box
 Stateless dummy box, i.e. the box, which waits until all its inputs are closed and then sends poisoned envelopes to all its outputs. More...
struct  stream_index
 Represents the index of a line in the stream. More...
class  stream_line
 Represents one line in the stream. More...
class  term_box
 Termination box. It waits until it receives a poisoned envelope on its input and after that it terminates the request. More...
class  type_descriptor
 Describes type of values in envelopes and scalars. More...

Typedefs

typedef generic_distinctizer
< box_id_tag > 
box_id_type
 Represents the unique identifier of a box in a request.
typedef ulibpp::intrusive_ptr
< const box_model
box_model_ptr_type
 Smart pointer to a bobox::box_model.
typedef generic_distinctizer
< box_model_tid_tag > 
box_model_tid_type
 Represents the name of a model (e.g. in Bobolang).
typedef generic_distinctizer
< box_tid_tag > 
box_tid_type
 Represents the textual identifier of a box.
typedef ulibpp::intrusive_ptr
< column_buffer
column_buffer_ptr
 Smart pointer to the bobox::column_buffer.
typedef generic_distinctizer
< column_index_tag > 
column_index_type
 Type for indexing columns in envelopes.
typedef std::shared_ptr< const
envelope_descriptor
envelope_descriptor_ptr_type
 Smart pointer to a bobox::envelope_descriptor.
typedef ulibpp::intrusive_ptr
< const envelope
envelope_ptr_type
 Smart pointer to an bobox::envelope.
typedef generic_distinctizer
< inarc_tag > 
inarc_index_type
 Represents the index of an input arc on the box level.
typedef generic_distinctizer
< input_tag > 
input_index_type
 Represents the index of an input on the model level.
typedef generic_distinctizer
< outarc_tag > 
outarc_index_type
 Represents the index of an output arc on the box level.
typedef generic_distinctizer
< output_tag > 
output_index_type
 Represents the index of an output on the model level.
typedef generic_distinctizer
< plevel_tag > 
plevel_type
 Represents the parallelization level of a box.
typedef generic_distinctizer
< req_id_tag > 
request_id_type
 Represents the unique identifier of a request.
typedef
ulibpp::tr1::shared_ptr
< request
request_ptr_type
 Smart pointer to a bobox::request.
typedef std::shared_ptr< const
type_descriptor
type_descriptor_ptr_type
 Smart pointer to a type_descriptors .
typedef std::shared_ptr< const
type_descriptors_type
type_descriptors_ptr_type
 Smart pointer to a list of type_descriptors .
typedef std::vector
< type_descriptor_ptr_type
type_descriptors_type
 List of bobox::type_descriptor.
typedef generic_distinctizer
< type_tid_tag > 
type_tid_type
 Represents the name of a type (e.g. in Bobolang).

Enumerations

enum  box_stateness_type { BST_STATEFUL, BST_STATELESS, BST_PARALLEL }
 Values that represent stateness of a box. More...
enum  request_result_type {
  RRT_OK, RRT_CANCELED, RRT_MEMORY, RRT_ERROR,
  RRT_TIMEOUT, RRT_DEADLOCK
}
 Values that represent results of request. More...
enum  scheduling_strategy_type { SS_SINGLE_THREADED, SS_SMP, SS_NUMA_AWARE }
 Values that represent scheduling strategies of the Bobox manager. More...

Functions

void * allocate (size_t size)
 Allocates a block of memory. The function uses the Bobox allocator.
void deallocate (void *ptr, size_t size)
 Deallocates the block of memory allocated by bobox::allocate.

Detailed Description

The main namespace of the Bobox library.


Enumeration Type Documentation

Values that represent stateness of a box.

Enumerator:
BST_STATEFUL 

Ordinary box without possibility of parallelization.

BST_STATELESS 

The box does not keep any internal state between two envelopes.

BST_PARALLEL 

The box allows parallel stream processing.

Values that represent results of request.

Enumerator:
RRT_OK 

Everything was alright.

RRT_CANCELED 

The request was canceled.

RRT_MEMORY 

The request ran out of memory.

RRT_ERROR 

Unspecified error occurred.

RRT_TIMEOUT 

The request has timed out.

RRT_DEADLOCK 

A deadlock has occurred during evaluation.

Values that represent scheduling strategies of the Bobox manager.

Enumerator:
SS_SINGLE_THREADED 

Just one worker thread is used for the evaluation. Good for debugging.

SS_SMP 

The number of the worker threads is the same as the number of logical processors in the system.

SS_NUMA_AWARE 

The same as bobox::SS_SMP, but takes NUMA factor into account.


Function Documentation

void* bobox::allocate ( size_t  size)

Allocates a block of memory. The function uses the Bobox allocator.

Parameters:
sizeThe required size of the block.
Returns:
null if it fails, else the pointer to the allocated block.
void bobox::deallocate ( void *  ptr,
size_t  size 
)

Deallocates the block of memory allocated by bobox::allocate.

Parameters:
ptrThe pointer to the block.
sizeThe size of the block.