IScenario Class Reference

A static OpenViBE scenarioThis class is a static scenario description. It is used to manipulate an OpenViBE box/connection collection... More...

Inheritance diagram for IScenario:
IAttributable IKernelObject IObject

List of all members.

Public Member Functions

General purpose functions
virtual OpenViBE::boolean clear (void)=0
 Clears the scenario.
virtual OpenViBE::boolean merge (const OpenViBE::Kernel::IScenario &rScenario)=0
 Merges this scenario with an other existing scenario.
Visualisation tree management
virtual OpenViBE::boolean setVisualisationTreeIdentifier (const OpenViBE::CIdentifier &rVisualisationTreeIdentifier)=0
 Sets identifier of IVisualisationTree object corresponding to this scenario.
virtual OpenViBE::CIdentifier getVisualisationTreeIdentifier (void) const =0
 Returns identifier of IVisualisationTree object corresponding to this scenario.
virtual const
OpenViBE::Kernel::IVisualisationTree
getVisualisationTreeDetails () const =0
 Gets the details of the visualisation tree of this scenario.
virtual
OpenViBE::Kernel::IVisualisationTree
getVisualisationTreeDetails ()=0
Box management
virtual OpenViBE::CIdentifier getNextBoxIdentifier (const OpenViBE::CIdentifier &rPreviousIdentifier) const =0
 Gets next box identifier.
virtual OpenViBE::CIdentifier getNextBoxIdentifierOnProcessingUnit (const OpenViBE::CIdentifier &rPreviousIdentifier, const OpenViBE::CIdentifier &rProcessingUnitIdentifier) const =0
 Gets next box identifier running on a given process unit.
virtual OpenViBE::boolean isBox (const OpenViBE::CIdentifier &rBoxIdentifier) const =0
 Tests whether a given identifier is a box or not.
virtual const
OpenViBE::Kernel::IBox
getBoxDetails (const OpenViBE::CIdentifier &rBoxIdentifier) const =0
 Gets the details for a specific box.
virtual OpenViBE::Kernel::IBoxgetBoxDetails (const OpenViBE::CIdentifier &rBoxIdentifier)=0
virtual OpenViBE::boolean addBox (OpenViBE::CIdentifier &rBoxIdentifier)=0
 Adds a new box in the scenario.
virtual OpenViBE::boolean addBox (const OpenViBE::Kernel::IBox &rBox, OpenViBE::CIdentifier &rBoxIdentifier)=0
 Adds a new box in the scenario based on an existing box.
virtual OpenViBE::boolean addBox (const OpenViBE::CIdentifier &rBoxAlgorithmClassIdentifier, OpenViBE::CIdentifier &rBoxIdentifier)=0
 Adds a new box in the scenario.
virtual OpenViBE::boolean removeBox (const OpenViBE::CIdentifier &rBoxIdentifier)=0
 Removes a box of the scenario.
Connection management
virtual OpenViBE::CIdentifier getNextLinkIdentifier (const OpenViBE::CIdentifier &rPreviousIdentifier) const =0
 Gets next link identifier.
virtual OpenViBE::CIdentifier getNextLinkIdentifierFromBox (const OpenViBE::CIdentifier &rPreviousIdentifier, const OpenViBE::CIdentifier &rBoxIdentifier) const =0
 Gets next link identifier from fixed box.
virtual OpenViBE::CIdentifier getNextLinkIdentifierFromBoxOutput (const OpenViBE::CIdentifier &rPreviousIdentifier, const OpenViBE::CIdentifier &rBoxIdentifier, const OpenViBE::uint32 ui32OutputIndex) const =0
 Gets next link identifier from fixed box output.
virtual OpenViBE::CIdentifier getNextLinkIdentifierToBox (const OpenViBE::CIdentifier &rPreviousIdentifier, const OpenViBE::CIdentifier &rBoxIdentifier) const =0
 Gets next link identifier from fixed box.
virtual OpenViBE::CIdentifier getNextLinkIdentifierToBoxInput (const OpenViBE::CIdentifier &rPreviousIdentifier, const OpenViBE::CIdentifier &rBoxIdentifier, const OpenViBE::uint32 ui32InputInex) const =0
 Gets next link identifier from fixed box input.
virtual OpenViBE::boolean isLink (const OpenViBE::CIdentifier &rIdentifier) const =0
 Tests whether a given identifier is a link or not.
virtual const
OpenViBE::Kernel::ILink
getLinkDetails (const OpenViBE::CIdentifier &rLinkIdentifier) const =0
 Gets the details for a specific link.
virtual OpenViBE::Kernel::ILinkgetLinkDetails (const OpenViBE::CIdentifier &rLinkIdentifier)=0
virtual OpenViBE::boolean connect (const OpenViBE::CIdentifier &rSourceBoxIdentifier, const OpenViBE::uint32 ui32SourceBoxOutputIndex, const OpenViBE::CIdentifier &rTargetBoxIdentifier, const OpenViBE::uint32 ui32TargetBoxInputIndex, OpenViBE::CIdentifier &rLinkIdentifier)=0
 Creates a connection between two boxes.
virtual OpenViBE::boolean disconnect (const OpenViBE::CIdentifier &rSourceBoxIdentifier, const OpenViBE::uint32 ui32SourceBoxOutputIndex, const OpenViBE::CIdentifier &rTargetBoxIdentifier, const OpenViBE::uint32 ui32TargetBoxInputIndex)=0
 Deletes a connection between two boxes.
virtual OpenViBE::boolean disconnect (const OpenViBE::CIdentifier &rLinkIdentifier)=0
 Deletes a connection between two boxes.
Comment management
virtual OpenViBE::CIdentifier getNextCommentIdentifier (const OpenViBE::CIdentifier &rPreviousIdentifier) const =0
 Gets next comment identifier.
virtual OpenViBE::boolean isComment (const OpenViBE::CIdentifier &rCommentIdentifier) const =0
 Tests whether a given identifier is a comment or not.
virtual const
OpenViBE::Kernel::IComment
getCommentDetails (const OpenViBE::CIdentifier &rCommentIdentifier) const =0
 Gets the details for a specific comment.
virtual
OpenViBE::Kernel::IComment
getCommentDetails (const OpenViBE::CIdentifier &rCommentIdentifier)=0
virtual OpenViBE::boolean addComment (OpenViBE::CIdentifier &rCommentIdentifier)=0
 Adds a new comment in the scenario.
virtual OpenViBE::boolean addComment (const OpenViBE::Kernel::IComment &rComment, OpenViBE::CIdentifier &rCommentIdentifier)=0
 Adds a new comment in the scenario based on an existing comment.
virtual OpenViBE::boolean removeComment (const OpenViBE::CIdentifier &rCommentIdentifier)=0
 Removes a comment of the scenario.
Processing units management
virtual OpenViBE::CIdentifier getNextProcessingUnitIdentifier (const OpenViBE::CIdentifier &rPreviousIdentifier) const =0
 Gets next processing unit identifier.
virtual OpenViBE::boolean isProcessingUnit (const OpenViBE::CIdentifier &rIdentifier) const =0
 Tests if a processing unit exists.
virtual const
OpenViBE::Kernel::IProcessingUnit
getProcessingUnitDetails (const OpenViBE::CIdentifier &rProcessingUnitIdentifier) const =0
 Gets processing unit details.
virtual
OpenViBE::Kernel::IProcessingUnit
getProcessingUnitDetails (const OpenViBE::CIdentifier &rProcessingUnitIdentifier)=0
virtual OpenViBE::boolean addProcessingUnit (OpenViBE::CIdentifier &rProcessingUnitIdentifier)=0
 Adds a new processing unit in the scenario.
virtual OpenViBE::boolean removeProcessingUnit (const OpenViBE::CIdentifier &rProcessingUnitIdentifier)=0
 Removes a processing unit in the scenario.

Detailed Description

A static OpenViBE scenario

This class is a static scenario description. It is used to manipulate an OpenViBE box/connection collection...

Author:
Yann Renard (IRISA/INRIA)
Date:
2006-08-16
Todo:
Add meta information for this scenario

Member Function Documentation

virtual OpenViBE::boolean clear ( void  ) [pure virtual]

Clears the scenario.

Returns:
true in case of success.
false in case of error.
virtual OpenViBE::boolean merge ( const OpenViBE::Kernel::IScenario rScenario) [pure virtual]

Merges this scenario with an other existing scenario.

Parameters:
rScenario[in] : a reference to the scenario to merge this scenario with
Returns:
true in case of success
false in case of error
virtual OpenViBE::boolean setVisualisationTreeIdentifier ( const OpenViBE::CIdentifier rVisualisationTreeIdentifier) [pure virtual]

Sets identifier of IVisualisationTree object corresponding to this scenario.

Parameters:
rVisualisationTreeIdentifier[in] : identifier to be stored
virtual const OpenViBE::Kernel::IVisualisationTree& getVisualisationTreeDetails ( ) const [pure virtual]

Gets the details of the visualisation tree of this scenario.

Returns:
The visualisation tree details
virtual OpenViBE::Kernel::IVisualisationTree& getVisualisationTreeDetails ( ) [pure virtual]

Gets the details of the visualisation tree of this scenario.

Returns:
The visualisation tree details
virtual OpenViBE::CIdentifier getNextBoxIdentifier ( const OpenViBE::CIdentifier rPreviousIdentifier) const [pure virtual]

Gets next box identifier.

Parameters:
rPreviousIdentifier[in] : The identifier for the preceeding box
Returns:
The identifier of the next box in case of success.
OV_UndefinedIdentifier on error.
Note:
Giving OV_UndefinedIdentifier as rPreviousIdentifier will cause this function to return the first box identifier.
virtual OpenViBE::CIdentifier getNextBoxIdentifierOnProcessingUnit ( const OpenViBE::CIdentifier rPreviousIdentifier,
const OpenViBE::CIdentifier rProcessingUnitIdentifier 
) const [pure virtual]

Gets next box identifier running on a given process unit.

Parameters:
rPreviousIdentifier[in] : The identifier for the preceeding box
rProcessingUnitIdentifier[in] : The identifier for the processing unit which the box should be ran on.
Returns:
The identifier of the next box in case of success.
OV_UndefinedIdentifier on error.
Note:
Giving OV_UndefinedIdentifier as rPreviousIdentifier will cause this function to return the first box identifier.
Giving OV_UndefinedIdentifier as rProcessingUnitIdentifier will cause this function to return an unaffected box identifier.
virtual OpenViBE::boolean isBox ( const OpenViBE::CIdentifier rBoxIdentifier) const [pure virtual]

Tests whether a given identifier is a box or not.

Parameters:
rBoxIdentifier[in] : the identifier to test
Returns:
true if the identified object is a box
false if the identified object is not a box
Note:
Requesting a bad identifier returns false
virtual const OpenViBE::Kernel::IBox* getBoxDetails ( const OpenViBE::CIdentifier rBoxIdentifier) const [pure virtual]

Gets the details for a specific box.

Parameters:
rBoxIdentifier[in] : The identifier of the box which details should be sent.
Returns:
The box details
virtual OpenViBE::Kernel::IBox* getBoxDetails ( const OpenViBE::CIdentifier rBoxIdentifier) [pure virtual]

Gets the details for a specific box.

Parameters:
rBoxIdentifier[in] : The identifier of the box which details should be sent.
Returns:
The box details
virtual OpenViBE::boolean addBox ( OpenViBE::CIdentifier rBoxIdentifier) [pure virtual]

Adds a new box in the scenario.

Parameters:
rBoxIdentifier[out] : The identifier of the created box
Returns:
true in case of success.
false in case of error. In such case, rBoxIdentifier remains unchanged.
Note:
This produces an empty and unconfigured box !
virtual OpenViBE::boolean addBox ( const OpenViBE::Kernel::IBox rBox,
OpenViBE::CIdentifier rBoxIdentifier 
) [pure virtual]

Adds a new box in the scenario based on an existing box.

Parameters:
rBox[in] : the box to copy in this scenario
rBoxIdentifier[out] : The identifier of the created box
Returns:
true in case of success.
false in case of error. In such case, rBoxIdentifier remains unchanged.
virtual OpenViBE::boolean addBox ( const OpenViBE::CIdentifier rBoxAlgorithmClassIdentifier,
OpenViBE::CIdentifier rBoxIdentifier 
) [pure virtual]

Adds a new box in the scenario.

Parameters:
rBoxAlgorithmClassIdentifier[in] : The class identifier of the algorithm for this box
rBoxIdentifier[out] : The identifier of the created box
Returns:
true in case of success.
false in case of error. In such case, rBoxIdentifier remains unchanged.
Note:
This function prepares the box according to its algorithm class identifier !
virtual OpenViBE::boolean removeBox ( const OpenViBE::CIdentifier rBoxIdentifier) [pure virtual]

Removes a box of the scenario.

Parameters:
rBoxIdentifier[in] : The box identifier
Returns:
true in case of success.
false in case of error.
Note:
Each link related to this box is also removed
virtual OpenViBE::CIdentifier getNextLinkIdentifier ( const OpenViBE::CIdentifier rPreviousIdentifier) const [pure virtual]

Gets next link identifier.

Parameters:
rPreviousIdentifier[in] : The identifier for the preceeding link
Returns:
The identifier of the next link in case of success.
OV_UndefinedIdentifier on error.
Note:
Giving OV_UndefinedIdentifier as rPreviousIdentifier will cause this function to return the first link identifier.
virtual OpenViBE::CIdentifier getNextLinkIdentifierFromBox ( const OpenViBE::CIdentifier rPreviousIdentifier,
const OpenViBE::CIdentifier rBoxIdentifier 
) const [pure virtual]

Gets next link identifier from fixed box.

Parameters:
rPreviousIdentifier[in] : The identifier for the preceeding link
rBoxIdentifier[in] : The box identifier which the link should end to
Returns:
The identifier of the next link in case of success.
OV_UndefinedIdentifier on error.
Note:
Giving OV_UndefinedIdentifier as rPreviousIdentifier will cause this function to return the first link identifier.
virtual OpenViBE::CIdentifier getNextLinkIdentifierFromBoxOutput ( const OpenViBE::CIdentifier rPreviousIdentifier,
const OpenViBE::CIdentifier rBoxIdentifier,
const OpenViBE::uint32  ui32OutputIndex 
) const [pure virtual]

Gets next link identifier from fixed box output.

Parameters:
rPreviousIdentifier[in] : The identifier for the preceeding link
rBoxIdentifier[in] : The box identifier which the link should end to
ui32OutputIndex[in] : The input index which the link should end to
Returns:
The identifier of the next link in case of success.
OV_UndefinedIdentifier on error.
Note:
Giving OV_UndefinedIdentifier as rPreviousIdentifier will cause this function to return the first link identifier.
virtual OpenViBE::CIdentifier getNextLinkIdentifierToBox ( const OpenViBE::CIdentifier rPreviousIdentifier,
const OpenViBE::CIdentifier rBoxIdentifier 
) const [pure virtual]

Gets next link identifier from fixed box.

Parameters:
rPreviousIdentifier[in] : The identifier for the preceeding link
rBoxIdentifier[in] : The box identifier which the link should start from
Returns:
The identifier of the next link in case of success.
OV_UndefinedIdentifier on error.
Note:
Giving OV_UndefinedIdentifier as rPreviousIdentifier will cause this function to return the first link identifier.
virtual OpenViBE::CIdentifier getNextLinkIdentifierToBoxInput ( const OpenViBE::CIdentifier rPreviousIdentifier,
const OpenViBE::CIdentifier rBoxIdentifier,
const OpenViBE::uint32  ui32InputInex 
) const [pure virtual]

Gets next link identifier from fixed box input.

Parameters:
rPreviousIdentifier[in] : The identifier for the preceeding link
rBoxIdentifier[in] : The box identifier which the link should start from
ui32InputInex[in] : The input index which the link should start from
Returns:
The identifier of the next link in case of success.
OV_UndefinedIdentifier on error.
Note:
Giving OV_UndefinedIdentifier as rPreviousIdentifier will cause this function to return the first link identifier.
virtual OpenViBE::boolean isLink ( const OpenViBE::CIdentifier rIdentifier) const [pure virtual]

Tests whether a given identifier is a link or not.

Parameters:
rIdentifier[in] : the identifier to test
Returns:
true if the identified object is a link
false if the identified object is not a link
Note:
Requesting a bad identifier returns false
virtual const OpenViBE::Kernel::ILink* getLinkDetails ( const OpenViBE::CIdentifier rLinkIdentifier) const [pure virtual]

Gets the details for a specific link.

Parameters:
rLinkIdentifier[in] : The identifier of the link which details should be sent.
Returns:
The link details
virtual OpenViBE::Kernel::ILink* getLinkDetails ( const OpenViBE::CIdentifier rLinkIdentifier) [pure virtual]

Gets the details for a specific link.

Parameters:
rLinkIdentifier[in] : The identifier of the link which details should be sent.
Returns:
The link details
virtual OpenViBE::boolean connect ( const OpenViBE::CIdentifier rSourceBoxIdentifier,
const OpenViBE::uint32  ui32SourceBoxOutputIndex,
const OpenViBE::CIdentifier rTargetBoxIdentifier,
const OpenViBE::uint32  ui32TargetBoxInputIndex,
OpenViBE::CIdentifier rLinkIdentifier 
) [pure virtual]

Creates a connection between two boxes.

Parameters:
rSourceBoxIdentifier[in] : The source box identifier
ui32SourceBoxOutputIndex[in] : The output index for the given source box
rTargetBoxIdentifier[in] : The target box identifier
ui32TargetBoxInputIndex[in] : The input index for the given target box
rLinkIdentifier[out] : The created link identifier.
Returns:
true in case of success.
false in case of error. In such case, rLinkIdentifier remains unchanged.
virtual OpenViBE::boolean disconnect ( const OpenViBE::CIdentifier rSourceBoxIdentifier,
const OpenViBE::uint32  ui32SourceBoxOutputIndex,
const OpenViBE::CIdentifier rTargetBoxIdentifier,
const OpenViBE::uint32  ui32TargetBoxInputIndex 
) [pure virtual]

Deletes a connection between two boxes.

Parameters:
rSourceBoxIdentifier[in] : The source box identifier
ui32SourceBoxOutputIndex[in] : The output index for the given source box
rTargetBoxIdentifier[in] : The target box identifier
ui32TargetBoxInputIndex[in] : The input index for the given target box
Returns:
true in case of success.
false in case of error.
virtual OpenViBE::boolean disconnect ( const OpenViBE::CIdentifier rLinkIdentifier) [pure virtual]

Deletes a connection between two boxes.

Parameters:
rLinkIdentifier[out] : The identifier for the link to be deleted
Returns:
true in case of success.
false in case of error.
virtual OpenViBE::CIdentifier getNextCommentIdentifier ( const OpenViBE::CIdentifier rPreviousIdentifier) const [pure virtual]

Gets next comment identifier.

Parameters:
rPreviousIdentifier[in] : The identifier for the preceeding comment
Returns:
The identifier of the next comment in case of success.
OV_UndefinedIdentifier on error.
Note:
Giving OV_UndefinedIdentifier as rPreviousIdentifier will cause this function to return the first comment identifier.
virtual OpenViBE::boolean isComment ( const OpenViBE::CIdentifier rCommentIdentifier) const [pure virtual]

Tests whether a given identifier is a comment or not.

Parameters:
rCommentIdentifier[in] : the identifier to test
Returns:
true if the identified object is a comment
false if the identified object is not a comment
Note:
Requesting a bad identifier returns false
virtual const OpenViBE::Kernel::IComment* getCommentDetails ( const OpenViBE::CIdentifier rCommentIdentifier) const [pure virtual]

Gets the details for a specific comment.

Parameters:
rCommentIdentifier[in] : The identifier of the comment which details should be sent.
Returns:
The comment details
virtual OpenViBE::Kernel::IComment* getCommentDetails ( const OpenViBE::CIdentifier rCommentIdentifier) [pure virtual]

Gets the details for a specific comment.

Parameters:
rCommentIdentifier[in] : The identifier of the comment which details should be sent.
Returns:
The comment details
virtual OpenViBE::boolean addComment ( OpenViBE::CIdentifier rCommentIdentifier) [pure virtual]

Adds a new comment in the scenario.

Parameters:
rCommentIdentifier[out] : The identifier of the created comment
Returns:
true in case of success.
false in case of error. In such case, rCommentIdentifier remains unchanged.
Note:
This produces an empty and unconfigured comment !
virtual OpenViBE::boolean addComment ( const OpenViBE::Kernel::IComment rComment,
OpenViBE::CIdentifier rCommentIdentifier 
) [pure virtual]

Adds a new comment in the scenario based on an existing comment.

Parameters:
rComment[in] : the comment to copy in this scenario
rCommentIdentifier[out] : The identifier of the created comment
Returns:
true in case of success.
false in case of error. In such case, rCommentIdentifier remains unchanged.
virtual OpenViBE::boolean removeComment ( const OpenViBE::CIdentifier rCommentIdentifier) [pure virtual]

Removes a comment of the scenario.

Parameters:
rCommentIdentifier[in] : The comment identifier
Returns:
true in case of success.
false in case of error.
virtual OpenViBE::CIdentifier getNextProcessingUnitIdentifier ( const OpenViBE::CIdentifier rPreviousIdentifier) const [pure virtual]

Gets next processing unit identifier.

Parameters:
rPreviousIdentifier[in] : The identifier for the preceeding processing unit
Returns:
The identifier of the next processing unit in case of success.
OV_UndefinedIdentifier on error.
Note:
Giving OV_UndefinedIdentifier as rPreviousIdentifier will cause this function to return the first processing unit identifier.
virtual OpenViBE::boolean isProcessingUnit ( const OpenViBE::CIdentifier rIdentifier) const [pure virtual]

Tests if a processing unit exists.

Parameters:
rIdentifier[in] : the identifier which should be tested
Returns:
true if the provided identifier is a processing unit identifier.
false in other cases.
virtual const OpenViBE::Kernel::IProcessingUnit* getProcessingUnitDetails ( const OpenViBE::CIdentifier rProcessingUnitIdentifier) const [pure virtual]

Gets processing unit details.

Parameters:
rProcessingUnitIdentifier[in] : the identifier of the processing unit which details should be returned
Returns:
the details for the identifier processing unit in case of success.
NULL in case of error.
virtual OpenViBE::Kernel::IProcessingUnit* getProcessingUnitDetails ( const OpenViBE::CIdentifier rProcessingUnitIdentifier) [pure virtual]

Gets processing unit details.

Parameters:
rProcessingUnitIdentifier[in] : the identifier of the processing unit which details should be returned
Returns:
the details for the identifier processing unit in case of success.
NULL in case of error.
virtual OpenViBE::boolean addProcessingUnit ( OpenViBE::CIdentifier rProcessingUnitIdentifier) [pure virtual]

Adds a new processing unit in the scenario.

Parameters:
rProcessingUnitIdentifier[out] : the newly created identifier
Returns:
true in case of success.
false in case of error.
virtual OpenViBE::boolean removeProcessingUnit ( const OpenViBE::CIdentifier rProcessingUnitIdentifier) [pure virtual]

Removes a processing unit in the scenario.

Parameters:
rProcessingUnitIdentifier[in] : the identifier of the processing unit to remove
Returns:
true in case of success.
false in case of error.