TransformationManager Class Reference
#include <TransformationManager.h>

Classes | |
| class | ConverterToV1_0a4 |
Static Public Member Functions | |
| static bool | init () |
| static void | cleanup () |
| static TransformationPipe * | getPipe (unsigned srcId, unsigned dstId, unsigned pipeType, unsigned objectClass, unsigned objectType, unsigned objectId, unsigned priority, bool fromNetwork, User *user=NULL) |
| static bool | loadConfig (std::string configFile) |
| static void | step (float dt, unsigned interruptAt=0) |
| static void | execute (float dt, unsigned interruptAt=0) |
| static TransformationPipe * | openPipe (unsigned srcId, unsigned dstId, unsigned pipeType, unsigned objectClass, unsigned objectType, unsigned objectId, unsigned priority, bool fromNetwork, User *user=NULL) |
| static TransformationPipe * | openMTPipe (unsigned srcId, unsigned dstId, unsigned pipeType, unsigned objectClass, unsigned objectType, unsigned objectId, unsigned priority, bool fromNetwork, User *user=NULL) |
| static void | closePipe (TransformationPipe *pipe) |
| static void | closeAllPipesFromUser (User *user) |
| static OSG::UInt64 | packPipeId (unsigned srcId, unsigned dstId, unsigned pipeType, unsigned objectClass, unsigned objectType, unsigned objectId, bool fromNetwork) |
| static void | unpackPipeId (OSG::UInt64 id, unsigned *srcId, unsigned *dstId, unsigned *pipeType, unsigned *objectClass, unsigned *objectType, unsigned *objectId, bool *fromNetwork) |
| static void | registerModifierFactory (TransformationModifierFactory *factory) |
| static void | registerMergerFactory (TransformationMergerFactory *factory) |
| static void | removeMerger (TransformationMerger *merger) |
Static Public Attributes | |
| static const unsigned | ANYPIPE = 0x01000000 |
| marks a field of the pipeId an "don't care" | |
| static const unsigned | EQUALPIPE = 0x02000000 |
| XXX. | |
Static Private Member Functions | |
| static void | getAllPipesFromUser (User *user, std::vector< TransformationPipe * > *dst) |
| static unsigned & | getValueFromAttribute (const XmlElement *xml, std::string name, unsigned &dst) |
| static void | executeEvents () |
| static void | handleNetworkMessages () |
| static void | registerMerger (int mergerId, unsigned srcId, unsigned dstId, unsigned pipeType, unsigned objectClass, unsigned objectType, unsigned objectId, unsigned bFromNetwork, unsigned addBeforeIdx) |
| static void | decodeNetMsg (NetMessage *msg, TransformationData *transf, unsigned *userId, OSG::UInt64 *pipeId) |
| static TransformationMerger * | createMerger (std::string name, ArgumentVector *attributes) |
| static void | addMergerToPipe (MergerData *data, TransformationPipe *pipe) |
| static void | readPipeMask (const XmlElement *xml, TransformationPipe::MASK *mask) |
| static OSG::UInt64 | generateAnyPipeMask (unsigned &srcId, unsigned &dstId, unsigned &pipeType, unsigned &objectClass, unsigned &objectType, unsigned &objectId, unsigned &bFromNetwork) |
| static TransformationPipe * | openPipeInternal (unsigned srcId, unsigned dstId, unsigned pipeType, unsigned objectClass, unsigned objectType, unsigned objectId, unsigned priority, bool fromNetwork, User *user, bool useMTPipe=false) |
| 2008-04-21 ZaJ: | |
| static TransformationModifierFactory * | findFactory (std::string className) |
| static bool | parseTransformationMergers (const std::auto_ptr< const XmlDocument > &document) |
| static bool | parseTransformationPipes (const std::auto_ptr< const XmlDocument > &document) |
| static bool | parseTransformationModifier (const XmlElement *modifierElement, TransformationPipe::MASK *pipeMask, PipeConfiguration *newPipeConfiguration) |
Static Private Attributes | |
| static bool | firstRun = true |
| static bool | initialized = false |
| static NetworkInterface * | network = NULL |
| static User * | localUser = NULL |
| static OSG::Lock * | pipeListLock = NULL |
| static std::vector < TransformationPipe * > | pipes |
| static std::vector < TransformationModifierFactory * > | modifierFactories |
| static std::vector < TransformationMergerFactory * > | mergerFactories |
| static std::vector < MergerTemplate * > | mergerTemplates |
| static std::vector< MergerData * > | mergerOrderList |
| static std::vector < TransformationMerger * > | existingMerger |
| static std::vector < PipeConfiguration * > | pipeConfigurationsList |
| static EventPipe * | eventPipe = NULL |
| static TransformationLoggerModifierFactory * | loggerModifierFactory = NULL |
| static unsigned | interruptedPipePriority = 0 |
| static XmlConfigurationLoader | xmlConfigLoader |
Detailed Description
The TransformationManager- Todo:
- write this class documentation ... step ... ControllerManager connection ... NetworkInterface
Member Function Documentation
| void TransformationManager::addMergerToPipe | ( | MergerData * | data, | |
| TransformationPipe * | pipe | |||
| ) | [static, private] |
| void TransformationManager::cleanup | ( | ) | [static] |
Delete and clear all TransformationPipes, and Factories. Also, send a UserDatabaseRemoveUserEvent.
- Note:
- Call this method before EventManager::stop()!
- Todo:
- RemoveUserEvent should not be sent from TransformationManager!
| void TransformationManager::closeAllPipesFromUser | ( | User * | user | ) | [static] |
Close all TransformationPipes belonging to the given User.
| void TransformationManager::closePipe | ( | TransformationPipe * | pipe | ) | [static] |
Close and delete the given TransformationPipe.
| TransformationMerger * TransformationManager::createMerger | ( | std::string | name, | |
| ArgumentVector * | attributes | |||
| ) | [static, private] |
| static void TransformationManager::decodeNetMsg | ( | NetMessage * | msg, | |
| TransformationData * | transf, | |||
| unsigned * | userId, | |||
| OSG::UInt64 * | pipeId | |||
| ) | [static, private] |
| void TransformationManager::execute | ( | float | dt, | |
| unsigned | interruptAt = 0 | |||
| ) | [static] |
| void TransformationManager::executeEvents | ( | ) | [static, private] |
| TransformationModifierFactory * TransformationManager::findFactory | ( | std::string | className | ) | [static, private] |
| UInt64 TransformationManager::generateAnyPipeMask | ( | unsigned & | srcId, | |
| unsigned & | dstId, | |||
| unsigned & | pipeType, | |||
| unsigned & | objectClass, | |||
| unsigned & | objectType, | |||
| unsigned & | objectId, | |||
| unsigned & | bFromNetwork | |||
| ) | [static, private] |
| void TransformationManager::getAllPipesFromUser | ( | User * | user, | |
| std::vector< TransformationPipe * > * | dst | |||
| ) | [static, private] |
| TransformationPipe * TransformationManager::getPipe | ( | unsigned | srcId, | |
| unsigned | dstId, | |||
| unsigned | pipeType, | |||
| unsigned | objectClass, | |||
| unsigned | objectType, | |||
| unsigned | objectId, | |||
| unsigned | priority, | |||
| bool | fromNetwork, | |||
| User * | user = NULL | |||
| ) | [static] |
Find an already existing TransformationPipe matching the parameters.
- Returns:
- the matching TransformationPipe, or
NULL, if none is found.
- See also:
- TransformationManager::openPipe()
| unsigned & TransformationManager::getValueFromAttribute | ( | const XmlElement * | xml, | |
| std::string | name, | |||
| unsigned & | dst | |||
| ) | [static, private] |
| void TransformationManager::handleNetworkMessages | ( | ) | [static, private] |
| bool TransformationManager::init | ( | ) | [static] |
Initialize the TransformationManager. This method registers the standard TransformationModifiersFactories and TransformationMergersFactories of the TransformationManager. Furthermore it creates the connection to the EventManager and (if available) to the ControllerManager and Network modules.
- Note:
- Call this method after EventManager::init(), but before EventManager::start()!
| bool TransformationManager::loadConfig | ( | std::string | configFile | ) | [static] |
Load the pipe configuration. This method parses an XML configuration file and sets up the pipes, modifiers and mergers accordingly.
| TransformationPipe * TransformationManager::openMTPipe | ( | unsigned | srcId, | |
| unsigned | dstId, | |||
| unsigned | pipeType, | |||
| unsigned | objectClass, | |||
| unsigned | objectType, | |||
| unsigned | objectId, | |||
| unsigned | priority, | |||
| bool | fromNetwork, | |||
| User * | user = NULL | |||
| ) | [static] |
Create and open a threadsafe TransformationPipe matching the parameters. Behaves exactly like openPipe(), but the resulting pipe is of type TransformationPipeMT.
- See also:
- TransformationManager::openPipe()
| TransformationPipe * TransformationManager::openPipe | ( | unsigned | srcId, | |
| unsigned | dstId, | |||
| unsigned | pipeType, | |||
| unsigned | objectClass, | |||
| unsigned | objectType, | |||
| unsigned | objectId, | |||
| unsigned | priority, | |||
| bool | fromNetwork, | |||
| User * | user = NULL | |||
| ) | [static] |
Create and open a TransformationPipe matching the parameters.
- Returns:
- a matching TransformationPipe
NULL, if the same pipe has already been opened.NULL, if no matching TransformationPipe is found.
- Parameters:
-
srcId source module, as defined in ModuleIds.h dstId destination module, as defined in ModuleIds.h pipeType can be used to discriminate between otherwise identical pipes (e.g. HeadSensor vs. HandSensor) objectClass specifies Entity, Tile, etc. (currently always 0 for Entity) objectType With an objectClass of 0 (=Entity), use EntityType::getId(). objectId With an objectClass of 0 (=Entity), use Entity::getId(). priority Minimum priority of the pipe (higher value == higher priority). Use different priorities to define the execution-order. fromNetwork Distinguishes local ( false) and remote (true) end of the pipe. Iftrue, the source of the pipe is the Network.user (set to NULLfor localUser; defaults toNULL)
| TransformationPipe * TransformationManager::openPipeInternal | ( | unsigned | srcId, | |
| unsigned | dstId, | |||
| unsigned | pipeType, | |||
| unsigned | objectClass, | |||
| unsigned | objectType, | |||
| unsigned | objectId, | |||
| unsigned | priority, | |||
| bool | fromNetwork, | |||
| User * | user, | |||
| bool | useMTPipe = false | |||
| ) | [static, private] |
| UInt64 TransformationManager::packPipeId | ( | unsigned | srcId, | |
| unsigned | dstId, | |||
| unsigned | pipeType, | |||
| unsigned | objectClass, | |||
| unsigned | objectType, | |||
| unsigned | objectId, | |||
| bool | fromNetwork | |||
| ) | [static] |
Encode the parameters of a TransformationPipe into a 64-bit unsigned integer.
- See also:
- TransformationManager::openPipe()
- Todo:
- move this into TransformationPipe?
| bool TransformationManager::parseTransformationMergers | ( | const std::auto_ptr< const XmlDocument > & | document | ) | [static, private] |
| bool TransformationManager::parseTransformationModifier | ( | const XmlElement * | modifierElement, | |
| TransformationPipe::MASK * | pipeMask, | |||
| PipeConfiguration * | newPipeConfiguration | |||
| ) | [static, private] |
| bool TransformationManager::parseTransformationPipes | ( | const std::auto_ptr< const XmlDocument > & | document | ) | [static, private] |
| void TransformationManager::readPipeMask | ( | const XmlElement * | xml, | |
| TransformationPipe::MASK * | mask | |||
| ) | [static, private] |
| void TransformationManager::registerMerger | ( | int | mergerId, | |
| unsigned | srcId, | |||
| unsigned | dstId, | |||
| unsigned | pipeType, | |||
| unsigned | objectClass, | |||
| unsigned | objectType, | |||
| unsigned | objectId, | |||
| unsigned | bFromNetwork, | |||
| unsigned | addBeforeIdx | |||
| ) | [static, private] |
- Todo:
- check what this method does, maybe it's deprecated!
| void TransformationManager::registerMergerFactory | ( | TransformationMergerFactory * | factory | ) | [static] |
Register a factory for a new TransformationMerger-type.
| void TransformationManager::registerModifierFactory | ( | TransformationModifierFactory * | factory | ) | [static] |
Register a factory for a new TransformationModifier-type.
| void TransformationManager::removeMerger | ( | TransformationMerger * | merger | ) | [static] |
Remove and delete the given TransformationMerger.
- Todo:
- more info on this method? is it deprecated like registerMerger?
| void TransformationManager::step | ( | float | dt, | |
| unsigned | interruptAt = 0 | |||
| ) | [static] |
Handle Events and NetworkMessages, generate tracking input (if available), and call execute(dt,interruptAt).
| static void TransformationManager::unpackPipeId | ( | OSG::UInt64 | id, | |
| unsigned * | srcId, | |||
| unsigned * | dstId, | |||
| unsigned * | pipeType, | |||
| unsigned * | objectClass, | |||
| unsigned * | objectType, | |||
| unsigned * | objectId, | |||
| bool * | fromNetwork | |||
| ) | [static] |
Decode the parameters of a TransformationPipe from a 64-bit unsigned integer value generated by the method packPipeId().
- See also:
- TransformationManager::openPipe()
- Todo:
- move this into TransformationPipe?
Member Data Documentation
const unsigned TransformationManager::ANYPIPE = 0x01000000 [static] |
marks a field of the pipeId an "don't care"
const unsigned TransformationManager::EQUALPIPE = 0x02000000 [static] |
EventPipe * TransformationManager::eventPipe = NULL [static, private] |
std::vector< TransformationMerger * > TransformationManager::existingMerger [static, private] |
bool TransformationManager::firstRun = true [static, private] |
bool TransformationManager::initialized = false [static, private] |
unsigned TransformationManager::interruptedPipePriority = 0 [static, private] |
User * TransformationManager::localUser = NULL [static, private] |
TransformationLoggerModifierFactory * TransformationManager::loggerModifierFactory = NULL [static, private] |
std::vector< TransformationMergerFactory * > TransformationManager::mergerFactories [static, private] |
std::vector< MergerData * > TransformationManager::mergerOrderList [static, private] |
std::vector< MergerTemplate * > TransformationManager::mergerTemplates [static, private] |
std::vector< TransformationModifierFactory * > TransformationManager::modifierFactories [static, private] |
NetworkInterface * TransformationManager::network = NULL [static, private] |
std::vector< PipeConfiguration * > TransformationManager::pipeConfigurationsList [static, private] |
OSG_USING_NAMESPACE OSG::Lock * TransformationManager::pipeListLock = NULL [static, private] |
std::vector< TransformationPipe * > TransformationManager::pipes [static, private] |
XmlConfigurationLoader TransformationManager::xmlConfigLoader [static, private] |
The documentation for this class was generated from the following files:
- src/inVRs/SystemCore/TransformationManager/TransformationManager.h
- src/inVRs/SystemCore/TransformationManager/TransformationManager.cpp
Generated on Wed Oct 20 16:12:01 2010 for inVRs by
1.5.8