MAK RTIspy API Documentation for HLA 1516
Classes | Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | Private Member Functions
DtRtiChooserCache Class Reference

Stores the cached MAK_RTIDIR's that a user has selected through the rtiChooser. More...

+ Collaboration diagram for DtRtiChooserCache:

List of all members.

Classes

struct  DtInstalledRTIInformation

Public Member Functions

 DtRtiChooserCache (const MAKRti::DtFilename &xmlFile=MAKRti::DtFilename::nullFilename())
 Constructor.
virtual ~DtRtiChooserCache ()
 Destructor.
virtual void writeToFile ()
 Writes the cache to the default XML file specified at creation.
virtual void writeToFile (const MAKRti::DtFilename &xmlFile)
 Writes the cache to the specified XML file.
virtual std::ostream & print (std::ostream &ostr) const
 Prints the cache to the given output stream.
virtual void getMAK_RTIDIRs (std::set< DtInstalledRTIInformation > &installedRTIs)
 Retrieve the set of all MAK_RTIDIRs from the configuration file.
virtual void addMAK_RTIDIR (const DtInstalledRTIInformation &installed)
 Add a MAK_RTIDIR to the configuration file.
virtual void addMAK_RTIDIRs (const std::set< DtInstalledRTIInformation > &installed)
virtual void clearMAK_RTIDIRs ()
 Clears the list of MAK_RTIDIRs.
virtual bool getMAK_RTIDIR (DtInstalledRTIInformation info)
 Retrieve the MAK_RTIDIRs.

Protected Member Functions

bool parseFile (const MAKRti::DtFilename &filename)
 Build document starting from existing file Non-virtual since this may be called from the constructor.

Protected Attributes

MAKRti::DtEnvironment myEnvironment
 The cached rtiChooser environment.
std::auto_ptr
< MAKRti::DtEnvXMLWriter > 
myXmlWriter
 Document writer - used to convert the document to XML in memory or file myXmlWriter is persistent so that the XML memory buffer does not re-allocate as often.
MAKRti::DtFilename myXmlFile
 The name of the default XML file to read from and write to.
bool myUpdatedSinceWrite
 Flag indicating if the environment has changed since the last time it was written to the default file.

Static Protected Attributes

static const MAKRti::DtString rtiPathString = "rtiPath"
static const MAKRti::DtString ridPathString = "ridPath"
static const MAKRti::DtString defaultRidString = "defaultRid"
static const MAKRti::DtString versionString = "version"

Private Member Functions

virtual MAKRti::DtString stringifyInfoContents (const DtInstalledRTIInformation &info) const
 Generate a string from contents of info.
 DtRtiChooserCache (const DtRtiChooserCache &)
 Copy and assignment not allowed.
DtRtiChooserCacheoperator= (const DtRtiChooserCache &)

Detailed Description

Stores the cached MAK_RTIDIR's that a user has selected through the rtiChooser.


Constructor & Destructor Documentation

DtRtiChooserCache::DtRtiChooserCache ( const MAKRti::DtFilename &  xmlFile = MAKRti::DtFilename::nullFilename())

Constructor.

Creates cache of MAK_RTIDIRs from the given XML file. If the file cannot be found, an empty cache is created. In this case the file name will be saved as the default file if the cache needs to be written later. If no filename is given the default will be used.

Destructor.

Copy and assignment not allowed.


Member Function Documentation

void DtRtiChooserCache::addMAK_RTIDIR ( const DtInstalledRTIInformation installed) [virtual]
void DtRtiChooserCache::addMAK_RTIDIRs ( const std::set< DtInstalledRTIInformation > &  installed) [virtual]

References addMAK_RTIDIR().

Clears the list of MAK_RTIDIRs.

References myEnvironment, and myUpdatedSinceWrite.

void DtRtiChooserCache::getMAK_RTIDIRs ( std::set< DtInstalledRTIInformation > &  installedRTIs) [virtual]

Retrieve the set of all MAK_RTIDIRs from the configuration file.

References defaultRidString, myEnvironment, ridPathString, rtiPathString, and versionString.

DtRtiChooserCache& DtRtiChooserCache::operator= ( const DtRtiChooserCache ) [private]
bool DtRtiChooserCache::parseFile ( const MAKRti::DtFilename &  filename) [protected]

Build document starting from existing file Non-virtual since this may be called from the constructor.

std::ostream & DtRtiChooserCache::print ( std::ostream &  ostr) const [virtual]

Prints the cache to the given output stream.

References myEnvironment.

Referenced by operator<<().

DtString DtRtiChooserCache::stringifyInfoContents ( const DtInstalledRTIInformation info) const [private, virtual]
void DtRtiChooserCache::writeToFile ( ) [virtual]

Writes the cache to the default XML file specified at creation.

References myUpdatedSinceWrite, and myXmlFile.

virtual void DtRtiChooserCache::writeToFile ( const MAKRti::DtFilename &  xmlFile) [virtual]

Writes the cache to the specified XML file.


Member Data Documentation

const DtString DtRtiChooserCache::defaultRidString = "defaultRid" [static, protected]
MAKRti::DtEnvironment DtRtiChooserCache::myEnvironment [protected]

The cached rtiChooser environment.

Referenced by addMAK_RTIDIR(), clearMAK_RTIDIRs(), getMAK_RTIDIR(), getMAK_RTIDIRs(), and print().

Flag indicating if the environment has changed since the last time it was written to the default file.

Referenced by addMAK_RTIDIR(), clearMAK_RTIDIRs(), and writeToFile().

MAKRti::DtFilename DtRtiChooserCache::myXmlFile [protected]

The name of the default XML file to read from and write to.

Referenced by writeToFile().

std::auto_ptr< MAKRti::DtEnvXMLWriter > DtRtiChooserCache::myXmlWriter [protected]

Document writer - used to convert the document to XML in memory or file myXmlWriter is persistent so that the XML memory buffer does not re-allocate as often.

const DtString DtRtiChooserCache::ridPathString = "ridPath" [static, protected]
const DtString DtRtiChooserCache::rtiPathString = "rtiPath" [static, protected]
const DtString DtRtiChooserCache::versionString = "version" [static, protected]

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

Document ID: Generated on Thu Jun 14 14:15:04 EDT 2012 from SVN revision 116116
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)