![]() |
MAK RTIspy API Documentation for HLA 1.3
|
Stores the cached MAK_RTIDIR's that a user has selected through the rtiChooser. More...
Collaboration diagram for DtRtiChooserCache: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. | |
| DtRtiChooserCache & | operator= (const DtRtiChooserCache &) |
Stores the cached MAK_RTIDIR's that a user has selected through the rtiChooser.
| 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.
| DtRtiChooserCache::~DtRtiChooserCache | ( | ) | [virtual] |
Destructor.
| DtRtiChooserCache::DtRtiChooserCache | ( | const DtRtiChooserCache & | ) | [private] |
Copy and assignment not allowed.
| void DtRtiChooserCache::addMAK_RTIDIR | ( | const DtInstalledRTIInformation & | installed | ) | [virtual] |
Add a MAK_RTIDIR to the configuration file.
References defaultRidString, myEnvironment, DtRtiChooserCache::DtInstalledRTIInformation::myPathOfInstalledRTI, DtRtiChooserCache::DtInstalledRTIInformation::myRidToUseWithInstalledRTI, myUpdatedSinceWrite, DtRtiChooserCache::DtInstalledRTIInformation::myUseDefaultRidFile, DtRtiChooserCache::DtInstalledRTIInformation::myVersion, ridPathString, rtiPathString, stringifyInfoContents(), and versionString.
Referenced by addMAK_RTIDIRs().
| void DtRtiChooserCache::addMAK_RTIDIRs | ( | const std::set< DtInstalledRTIInformation > & | installed | ) | [virtual] |
References addMAK_RTIDIR().
| void DtRtiChooserCache::clearMAK_RTIDIRs | ( | ) | [virtual] |
Clears the list of MAK_RTIDIRs.
References myEnvironment, and myUpdatedSinceWrite.
| bool DtRtiChooserCache::getMAK_RTIDIR | ( | DtInstalledRTIInformation | info | ) | [virtual] |
Retrieve the MAK_RTIDIRs.
Returns the first if more than one is cached.
References defaultRidString, myEnvironment, DtRtiChooserCache::DtInstalledRTIInformation::myPathOfInstalledRTI, DtRtiChooserCache::DtInstalledRTIInformation::myRidToUseWithInstalledRTI, DtRtiChooserCache::DtInstalledRTIInformation::myUseDefaultRidFile, DtRtiChooserCache::DtInstalledRTIInformation::myVersion, ridPathString, rtiPathString, and versionString.
| 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] |
| DtString DtRtiChooserCache::stringifyInfoContents | ( | const DtInstalledRTIInformation & | info | ) | const [private, virtual] |
Generate a string from contents of info.
References DtRtiChooserCache::DtInstalledRTIInformation::myPathOfInstalledRTI, DtRtiChooserCache::DtInstalledRTIInformation::myRidToUseWithInstalledRTI, DtRtiChooserCache::DtInstalledRTIInformation::myUseDefaultRidFile, and DtRtiChooserCache::DtInstalledRTIInformation::myVersion.
Referenced by addMAK_RTIDIR().
| 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.
const DtString DtRtiChooserCache::defaultRidString = "defaultRid" [static, protected] |
Referenced by addMAK_RTIDIR(), getMAK_RTIDIR(), and getMAK_RTIDIRs().
MAKRti::DtEnvironment DtRtiChooserCache::myEnvironment [protected] |
The cached rtiChooser environment.
Referenced by addMAK_RTIDIR(), clearMAK_RTIDIRs(), getMAK_RTIDIR(), getMAK_RTIDIRs(), and print().
bool DtRtiChooserCache::myUpdatedSinceWrite [protected] |
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] |
Referenced by addMAK_RTIDIR(), getMAK_RTIDIR(), and getMAK_RTIDIRs().
const DtString DtRtiChooserCache::rtiPathString = "rtiPath" [static, protected] |
Referenced by addMAK_RTIDIR(), getMAK_RTIDIR(), and getMAK_RTIDIRs().
const DtString DtRtiChooserCache::versionString = "version" [static, protected] |
Referenced by addMAK_RTIDIR(), getMAK_RTIDIR(), and getMAK_RTIDIRs().