VR-Forces 4.3 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Friends
makVrv::DtVisualizerSchemaManager Class Reference
Inheritance diagram for makVrv::DtVisualizerSchemaManager:
Inheritance graph
[legend]

Public Types

typedef boost::unordered_map
< std::string, const
DtVisualizerSchema * > 
SchemaMap
 Maps schema name to schema.
typedef boost::unordered_map
< unsigned int, SchemaMap
TypeSchemaMap
 Get a map of schema entries.

Public Member Functions

virtual ~DtVisualizerSchemaManager ()
 DTOR.
void registerVisualizerSchema (DtStateVisualizer::Type type, const DtVisualizerSchema *entry)
 Register a schema which is used by a type of state visualizers.
const DtVisualizerSchemafindSchemaEntry (DtStateVisualizer::Type type, const std::string &schemaName) const
 Find a schema by it's name assuming it is needed for a specific type.
const DtVisualizerSchemafindSchemaEntry (const std::string &schemaName) const
 Find a schema by it's name only.
void getSchemaEntriesForType (DtStateVisualizer::Type type, std::vector< const DtVisualizerSchema * > &entries) const
 Get all of the schema entries for a given type.
void loadDefaults ()
 Load the default values (NoOp).
- Public Member Functions inherited from makVrv::DtVirtualBaseClass
 DtVirtualBaseClass ()
 Do nothing constructor.
virtual ~DtVirtualBaseClass ()
 Virtual do nothing destructor.

Static Public Member Functions

static DtVisualizerSchemaManagerinstance (DtDe &)
 Get the instance of the schema manager.
static std::string newSchemaNameFromOld (const std::string &oldSchemaName)
 Map an old schema name to a new one (generally old schemas end in "Visualizer" and new ones end in "Schema".

Protected Member Functions

 DtVisualizerSchemaManager (DtDe &)
 CTOR.

Protected Attributes

TypeSchemaMap mySchemaMap
DtSignalConnectionManager myConnections

Friends

template<typename ManagerClass >
ManagerClass & defaultManagerInstanceFunction (DtDe &, bool)
 Befriend the manager instance functions for instance retreival/creation.
template<typename ManagerClass >
void defaultManagerRegisterInstanceFunction (DtDe &, ManagerClass *)
 Befriend the manager instance functions for instance retreival/creation.

Member Typedef Documentation

typedef boost::unordered_map<std::string, const DtVisualizerSchema*> makVrv::DtVisualizerSchemaManager::SchemaMap

Maps schema name to schema.

typedef boost::unordered_map<unsigned int, SchemaMap> makVrv::DtVisualizerSchemaManager::TypeSchemaMap

Get a map of schema entries.

Constructor & Destructor Documentation

virtual makVrv::DtVisualizerSchemaManager::~DtVisualizerSchemaManager ( )
virtual

DTOR.

makVrv::DtVisualizerSchemaManager::DtVisualizerSchemaManager ( DtDe )
protected

CTOR.

Member Function Documentation

static DtVisualizerSchemaManager& makVrv::DtVisualizerSchemaManager::instance ( DtDe )
static

Get the instance of the schema manager.

void makVrv::DtVisualizerSchemaManager::registerVisualizerSchema ( DtStateVisualizer::Type  type,
const DtVisualizerSchema entry 
)

Register a schema which is used by a type of state visualizers.

const DtVisualizerSchema* makVrv::DtVisualizerSchemaManager::findSchemaEntry ( DtStateVisualizer::Type  type,
const std::string &  schemaName 
) const

Find a schema by it's name assuming it is needed for a specific type.

This is faster than findSchemaEntry without a type.

Returns
0 if the schema is not found.
const DtVisualizerSchema* makVrv::DtVisualizerSchemaManager::findSchemaEntry ( const std::string &  schemaName) const

Find a schema by it's name only.

Returns
0 if the schema is not found.
void makVrv::DtVisualizerSchemaManager::getSchemaEntriesForType ( DtStateVisualizer::Type  type,
std::vector< const DtVisualizerSchema * > &  entries 
) const

Get all of the schema entries for a given type.

void makVrv::DtVisualizerSchemaManager::loadDefaults ( )

Load the default values (NoOp).

static std::string makVrv::DtVisualizerSchemaManager::newSchemaNameFromOld ( const std::string &  oldSchemaName)
static

Map an old schema name to a new one (generally old schemas end in "Visualizer" and new ones end in "Schema".

Friends And Related Function Documentation

template<typename ManagerClass >
ManagerClass& defaultManagerInstanceFunction ( DtDe de,
bool  allowedInSlave 
)
friend

Befriend the manager instance functions for instance retreival/creation.

Befriend the manager instance functions for instance retrieval and creation.

Befriend the manager instance functions for instance retreival/creation.

Befriend the manager instance functions for instance retrieval/creation.

  Manager requirements:
  1) Static instance function
  2) Protected DtSignalConnectionManager named myConnections.
  3) Member functioned called loadDefaults which takes no arguments.
     and loads the default settings of the manager or factory from disk.
  4) define defaultManagerInstanceFunction as friend.
  5) define defaultManagerRegisterInstanceFunction as friend (see below).
  5) Protected Constructor which only takes a DtDe reference.
  @code 

class Manager { public: static Manager& instance(DtDe& de); void loadDefaults(); protected: template <typename managerclass>=""> friend ManagerClass& defaultManagerInstanceFunction(DtDe& de, bool); template <typename managerclass>=""> friend void defaultManagerRegisterInstanceFunction(DtDe& de, ManagerClass* mgr) Manager(DtDe&); DtSignalConnectionManager myConnections; };

  Then simply in the implementation of instance call 
  defaultManagerInstanceFunction with the de object and return the return
  value.
  @code 

Manager& Manager::instance(DtDe& de) { return defaultManagerInstanceFunction<Manager>(de); }

template<typename ManagerClass >
void defaultManagerRegisterInstanceFunction ( DtDe de,
ManagerClass *  mgr 
)
friend

Befriend the manager instance functions for instance retreival/creation.

Befriend the manager instance functions for instance retrieval and creation.

Befriend the manager instance functions for instance retreival/creation.

Befriend the manager instance functions for instance retrieval/creation.

  @code 

static void Manager::registerInstance(DtDe& de, Manager* mgr) { defaultManagerRegisterInstanceFunction(de,mgr); } ...else where call. // Assuming class NewManager : public Manager Manager::registerInstance(de,new NewManager(de));

Member Data Documentation

TypeSchemaMap makVrv::DtVisualizerSchemaManager::mySchemaMap
protected
DtSignalConnectionManager makVrv::DtVisualizerSchemaManager::myConnections
protected

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

Document ID: Generated on Wed Mar 11 21:20:57 EDT 2015 from SVN revision 150940
Copyright © 2005-2014 VT MÄK. All Rights Reserved (www.mak.com)