VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Classes | Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | Friends
makVrv::DtMetaFileManager Class Reference

Handles the set up and processing of .meta files. More...

Classes

struct  NodeLinkage
 NodeLinkage structure contains the name and annotation strings for a node. More...
 

Public Types

typedef std::map< std::string,
rapidjson::Document * > 
FileDocumentMap
 ex. FileDocumentMap["Makland.meta"] = <parsed json="" data>=""> More...
 
typedef std::pair< NodeLinkage,
std::vector< const
rapidjson::Value * > > 
LinkageValuePair
 ex. (node name/annotation, node JSON data*) More...
 
typedef std::vector
< LinkageValuePair
LinkageValueVec
 ex. More...
 

Public Member Functions

virtual ~DtMetaFileManager ()
 DTOR. More...
 
std::string convertPathToMeta (const std::string &inPath)
 Convert a path (chop off extension, replace with .meta) More...
 
std::string convertModelDefToMeta (const DtModelDefinition *modelDef)
 Look in a model definition file for .meta info or use the filename path in the model definition to get .meta file path. More...
 
bool pathHasMeta (const std::string &inPath)
 Does this string end with '.meta'? More...
 
bool convertLoadAndParse (const DtModelDefinition *modelDef)
 Take a model definition (ex. More...
 
bool convertLoadAndParse (const std::string &fileName)
 Take a file (ex. More...
 
rapidjson::Document * retrieveFileData (const std::string &fileName)
 Retrieve the parsed JSON data for the .meta file. More...
 
LinkageValueVec makeLinkagesAndFeaturesArray (rapidjson::Document *linkagesFeaturesDocument)
 Given the parsed data for a file, convert it to an array as [ {node1 name or annotation , JSON data for node2 } ... More...
 

Static Public Attributes

static const chartheTagFeatureName
 Strings to get the different parts of the meta file Use these instead of hardcoded strings. More...
 
static const chartheTagFeatureData
 
static const chartheTagNodeFeaturesTag
 
static const chartheTagTextureFeature
 
static const chartheTagComment
 
static const chartheTagLinkage
 
static const chartheTagLinkageNodeName
 
static const chartheTagLinkageAnnotationTag
 

Protected Member Functions

bool parseMetaFile (const std::string &fileName)
 Load .meta file. More...
 
 DtMetaFileManager (DtDe &de)
 Protected CTOR. Must be called by creator. More...
 

Protected Attributes

FileDocumentMap myDocumentMap
 
DtDemyDe
 
boost::mutex myMapMutex
 

Friends

class DtMetaFileManagerCreator
 This allows the protected constructor to be called by the DtMetaFileManagerCreator. More...
 

Detailed Description

Handles the set up and processing of .meta files.

Meta files contain extra information about nodes in a scene graph. As the scene graph is traversed, the nodes are matched based on annotation or node name. Then the specific settings to use during processing of the node are extracted from the parsed .meta file. .meta files are in JSON format

Member Typedef Documentation

typedef std::map<std::string, rapidjson::Document*> makVrv::DtMetaFileManager::FileDocumentMap

ex. FileDocumentMap["Makland.meta"] = <parsed json="" data>="">

typedef std::pair<NodeLinkage, std::vector<const rapidjson::Value*> > makVrv::DtMetaFileManager::LinkageValuePair

ex. (node name/annotation, node JSON data*)

ex.

vector of node names/annotations and JSON data for those node names/annotations

Constructor & Destructor Documentation

virtual makVrv::DtMetaFileManager::~DtMetaFileManager ( )
virtual

DTOR.

makVrv::DtMetaFileManager::DtMetaFileManager ( DtDe de)
protected

Protected CTOR. Must be called by creator.

Member Function Documentation

std::string makVrv::DtMetaFileManager::convertPathToMeta ( const std::string &  inPath)

Convert a path (chop off extension, replace with .meta)

std::string makVrv::DtMetaFileManager::convertModelDefToMeta ( const DtModelDefinition modelDef)

Look in a model definition file for .meta info or use the filename path in the model definition to get .meta file path.

bool makVrv::DtMetaFileManager::pathHasMeta ( const std::string &  inPath)

Does this string end with '.meta'?

bool makVrv::DtMetaFileManager::convertLoadAndParse ( const DtModelDefinition modelDef)

Take a model definition (ex.

PolesWindsock), look for 'metaFileName', read .meta file contents as string and store the string, then parse the string into a rapidjson Document* return false if any of those steps fail

bool makVrv::DtMetaFileManager::convertLoadAndParse ( const std::string &  fileName)

Take a file (ex.

makland.medf), convert to makland.meta read .meta file contents as string and store the string, then parse the string into a rapidjson Document* return false if any of those steps fail

rapidjson::Document* makVrv::DtMetaFileManager::retrieveFileData ( const std::string &  fileName)

Retrieve the parsed JSON data for the .meta file.

LinkageValueVec makVrv::DtMetaFileManager::makeLinkagesAndFeaturesArray ( rapidjson::Document *  linkagesFeaturesDocument)

Given the parsed data for a file, convert it to an array as [ {node1 name or annotation , JSON data for node2 } ...

{ node2 nane or annotation, JSON data for node2 }

bool makVrv::DtMetaFileManager::parseMetaFile ( const std::string &  fileName)
protected

Load .meta file.

Friends And Related Function Documentation

friend class DtMetaFileManagerCreator
friend

This allows the protected constructor to be called by the DtMetaFileManagerCreator.

Member Data Documentation

const char* makVrv::DtMetaFileManager::theTagFeatureName
static

Strings to get the different parts of the meta file Use these instead of hardcoded strings.

const char* makVrv::DtMetaFileManager::theTagFeatureData
static
const char* makVrv::DtMetaFileManager::theTagNodeFeaturesTag
static
const char* makVrv::DtMetaFileManager::theTagTextureFeature
static
const char* makVrv::DtMetaFileManager::theTagComment
static
const char* makVrv::DtMetaFileManager::theTagLinkage
static
const char* makVrv::DtMetaFileManager::theTagLinkageNodeName
static
const char* makVrv::DtMetaFileManager::theTagLinkageAnnotationTag
static
FileDocumentMap makVrv::DtMetaFileManager::myDocumentMap
protected
DtDe& makVrv::DtMetaFileManager::myDe
protected
boost::mutex makVrv::DtMetaFileManager::myMapMutex
protected

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

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)