GLIP-Lib
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Classes | Public Types | Public Member Functions | Protected Member Functions | List of all members
Glip::CorePipeline::AbstractPipelineLayout Class Reference

Pipeline layout (Read Only). More...

#include <Pipeline.hpp>

Inheritance diagram for Glip::CorePipeline::AbstractPipelineLayout:
Inheritance graph

Classes

struct  Connection
 Object describing connetion betwen elements in a pipeline. More...
 

Public Types

enum  ComponentKind {
  THIS_PIPELINE = -1,
  FILTER = 0,
  PIPELINE = 1
}
 Flags describing the component kind. More...
 

Public Member Functions

 AbstractPipelineLayout (const AbstractPipelineLayout &c)
 AbstractPipelineLayout constructor. More...
 
void checkElement (int i) const
 Check if element exists and raise an exception if any errors occur. More...
 
int getNumElements (void) const
 Get the number of elements. More...
 
int getNumConnections (void) const
 Get the number of connections. More...
 
void getInfoElements (int &numFilters, int &numPipelines, int &numUniformVariables)
 Get the total number of Filters and Pipelines contained by this pipeline. More...
 
int getElementIndex (const std::string &name) const
 Get the ID of an element knowing its name. More...
 
bool doesElementExist (const std::string &name) const
 Check if an element exists knowing its name. More...
 
ComponentKind getElementKind (int i) const
 Get the kind of an element. More...
 
const std::string & getElementName (int i) const
 Get the name of an element. More...
 
int getElementID (int i) const
 Get element ID in global structure. More...
 
int getElementID (const std::string &name) const
 Get element ID in global structure. More...
 
AbstractComponentLayoutcomponentLayout (int i) const
 Get the component layout by its index. More...
 
AbstractComponentLayoutcomponentLayout (const std::string &name) const
 Get the component layout by its name. More...
 
AbstractFilterLayoutfilterLayout (int i) const
 Get the filter layout by its index. More...
 
AbstractFilterLayoutfilterLayout (const std::string &name) const
 Get the filter layout by its name. More...
 
AbstractPipelineLayoutpipelineLayout (int i) const
 Get the pipeline layout by its index. More...
 
AbstractPipelineLayoutpipelineLayout (const std::string &name) const
 Get the pipeline layout by its name. More...
 
Connection getConnection (int i) const
 Get the connection by its ID. More...
 
bool check (bool exception=true)
 Check the validity of the pipeline layout. More...
 
- Public Member Functions inherited from Glip::CorePipeline::AbstractComponentLayout
 AbstractComponentLayout (const AbstractComponentLayout &)
 AbstractComponentLayout constructor. More...
 
void checkInputPort (int i) const
 Check the validity of an input port. Raise an exception if any errors occur. More...
 
void checkOutputPort (int i) const
 Check the validity of an output port. Raise an exception if any errors occur. More...
 
virtual std::string getFullName (void) const
 Returns the full name of this component (might be overloaded). More...
 
const std::string & getLayoutName (void) const
 Returns the layout name of this component. More...
 
int getNumInputPort (void) const
 Get the number of input ports. More...
 
const std::string & getInputPortName (int i) const
 Return the name of an input port. Raise an exception if any errors occur. More...
 
int getInputPortID (const std::string &name) const
 Get the index of an input port knowing its name. Raise an exception if any errors occur. More...
 
bool doesInputPortExist (const std::string &name) const
 Check if an input port exists, knowing its name. More...
 
int getNumOutputPort (void) const
 Get the number of output ports. More...
 
const std::string & getOutputPortName (int i) const
 Return the name of an output port. Raise an exception if any errors occur. More...
 
int getOutputPortID (const std::string &name) const
 Get the index of an output port knowing its name. Raise an exception if any errors occur. More...
 
bool doesOutputPortExist (const std::string &name) const
 Check if an output port exists, knowing its name. More...
 

Protected Member Functions

 AbstractPipelineLayout (const std::string &type)
 AbstractPipelineLayout constructor. More...
 
void setElementID (int i, int ID)
 Set element ID in global structure or raise an exception if any errors occur. More...
 
std::vector< ConnectiongetConnectionDestinations (int id, int p)
 Get all destinations of an output port. More...
 
Connection getConnectionSource (int id, int p)
 Get the source of an input port. More...
 
- Protected Member Functions inherited from Glip::CorePipeline::AbstractComponentLayout
 AbstractComponentLayout (const std::string &_layoutName)
 AbstractComponentLayout constructor. More...
 
 AbstractComponentLayout (const std::string &_layoutName, const std::vector< std::string > &_inputPorts, const std::vector< std::string > &_outputPorts)
 AbstractComponentLayout constructor. More...
 

Detailed Description

Pipeline layout (Read Only).

Member Enumeration Documentation

Flags describing the component kind.

Enumerator
THIS_PIPELINE 

For this pipeline (internal use).

FILTER 

For filters.

PIPELINE 

For pipelines.

Constructor & Destructor Documentation

AbstractPipelineLayout::AbstractPipelineLayout ( const std::string &  type)
protected

AbstractPipelineLayout constructor.

Parameters
typeTypename of the pipeline.
AbstractPipelineLayout::AbstractPipelineLayout ( const AbstractPipelineLayout c)

AbstractPipelineLayout constructor.

Parameters
cCopy.

Member Function Documentation

bool AbstractPipelineLayout::check ( bool  exception = true)

Check the validity of the pipeline layout.

Parameters
exceptionIf set to true, an exception would be raised if any error is found.
Returns
true if valid, false otherwise.
void AbstractPipelineLayout::checkElement ( int  i) const

Check if element exists and raise an exception if any errors occur.

Parameters
iThe ID of the element.
AbstractComponentLayout & AbstractPipelineLayout::componentLayout ( int  i) const

Get the component layout by its index.

Parameters
iThe ID of the component.
Returns
A reference to the component or raise an exception if any errors occur.
AbstractComponentLayout & AbstractPipelineLayout::componentLayout ( const std::string &  name) const

Get the component layout by its name.

Parameters
nameThe name of the element.
Returns
A reference to the component or raise an exception if any errors occur.
bool AbstractPipelineLayout::doesElementExist ( const std::string &  name) const

Check if an element exists knowing its name.

Parameters
nameThe name of the element.
Returns
True if such an element exists, False otherwise.
AbstractFilterLayout & AbstractPipelineLayout::filterLayout ( int  i) const

Get the filter layout by its index.

Parameters
iThe ID of the filter layout.
Returns
A reference to the filter layout or raise an exception if any errors occur.
AbstractFilterLayout & AbstractPipelineLayout::filterLayout ( const std::string &  name) const

Get the filter layout by its name.

Parameters
nameThe name of the filter layout.
Returns
A reference to the filter layout or raise an exception if any errors occur.
AbstractPipelineLayout::Connection AbstractPipelineLayout::getConnection ( int  i) const

Get the connection by its ID.

Parameters
iThe ID of the connection.
Returns
A copy of the corresponding Connection object or raise an exception if any errors occur.
std::vector< AbstractPipelineLayout::Connection > AbstractPipelineLayout::getConnectionDestinations ( int  id,
int  p 
)
protected

Get all destinations of an output port.

Parameters
idThe ID of the output element.
pThe port of the output element.
Returns
A vector of Connection object, all having output as (id,p) or raise an exception if any errors occur.
AbstractPipelineLayout::Connection AbstractPipelineLayout::getConnectionSource ( int  id,
int  p 
)
protected

Get the source of an input port.

Parameters
idThe ID of the input element.
pThe port of the input element.
Returns
A Connection object, having input as (id,p) or raise an exception if any errors occur.
int AbstractPipelineLayout::getElementID ( int  i) const

Get element ID in global structure.

Parameters
iThe ID of the element in the local pipeline layout.
Returns
The ID of the element in the global structure or raise an exception if any errors occur.
int AbstractPipelineLayout::getElementID ( const std::string &  name) const

Get element ID in global structure.

Parameters
nameThe ID of the element in the local pipeline layout.
Returns
The ID of the element in the global structure or raise an exception if any errors occur.
int AbstractPipelineLayout::getElementIndex ( const std::string &  name) const

Get the ID of an element knowing its name.

Parameters
nameThe name of the element.
Returns
The ID of the element or raise an exception if any errors occur.
ComponentKind AbstractPipelineLayout::getElementKind ( int  i) const

Get the kind of an element.

Parameters
iThe ID of the element.
Returns
The kind of the element or raise an exception if any errors occur.
const std::string & AbstractPipelineLayout::getElementName ( int  i) const

Get the name of an element.

Parameters
iThe name of the element.
Returns
The name of the element or raise an exception if any errors occur.
void AbstractPipelineLayout::getInfoElements ( int &  numFilters,
int &  numPipelines,
int &  numUniformVariables 
)

Get the total number of Filters and Pipelines contained by this pipeline.

Parameters
numFiltersThe total number of filters.
numPipelinesThe total number of pipelines (including this one).
numUniformVariablesAPPROXIMATION to the total number of uniform variables : in some cases, the number might be larger than the actual number of uniform variables (this is because a variable can appear in both the vertex and fragment shader).
int AbstractPipelineLayout::getNumConnections ( void  ) const

Get the number of connections.

Returns
Number of connections.
int AbstractPipelineLayout::getNumElements ( void  ) const

Get the number of elements.

Returns
Number of elements.
AbstractPipelineLayout & AbstractPipelineLayout::pipelineLayout ( int  i) const

Get the pipeline layout by its index.

Parameters
iThe ID of the pipeline layout.
Returns
A reference to the pipeline layout or raise an exception if any errors occur.
AbstractPipelineLayout & AbstractPipelineLayout::pipelineLayout ( const std::string &  name) const

Get the pipeline layout by its name.

Parameters
nameThe name of the pipeline layout.
Returns
A reference to the pipeline layout or raise an exception if any errors occur.
void AbstractPipelineLayout::setElementID ( int  i,
int  ID 
)
protected

Set element ID in global structure or raise an exception if any errors occur.

Parameters
iThe ID of the element in the local pipeline layout.
IDThe ID of the element in the global structure.

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