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

Settings class for reading and writing settings to/from files. More...

Inheritance diagram for makVrv::DtDeSettings:
Inheritance graph
[legend]

Public Member Functions

virtual ~DtDeSettings ()
 DTOR. More...
 
const std::string & name () const
 Get the settings name. More...
 
const std::string & extension () const
 Get the extension for this settings type. More...
 
template<typename RecordType >
bool readDefaultRecord (RecordType &r)
 Read a record from the default settings. More...
 
template<typename RecordType >
bool readDefaultRecordAndName (RecordType &r, std::string &fName)
 Read a record and file name from the default settings. More...
 
template<typename RecordType >
bool readBackupRecord (RecordType &r)
 Read a record from the backup settings. More...
 
template<typename RecordType >
bool readFactoryDefaultRecord (RecordType &r)
 
template<typename RecordType >
bool writeDefaultRecord (const RecordType &r)
 Write a record as the default settings. More...
 
template<typename RecordType >
bool writeBackupRecord (const RecordType &r)
 Write a record as the default settings. More...
 
template<typename RecordType >
bool readRecordsFrom (std::map< std::string, RecordType > &r, const std::string &importFileName)
 Reads records from a specific location. More...
 
template<typename RecordType >
bool readRecordFrom (RecordType &r, const std::string &importFileName)
 Read a record from a specific location. More...
 
template<typename RecordType >
bool readRecordFromBinary (RecordType &r, const std::string &importFileName)
 Read a record from a specific location. More...
 
template<typename RecordType >
bool writeRecordTo (const RecordType &r, const std::string &exportFileName) const
 Write a record to a specific location. More...
 
template<typename RecordType >
bool writeRecordToBinary (const RecordType &r, const std::string &exportFileName) const
 Write a record to a specific location. More...
 
void setAutoSave (bool b)
 Save the record after each change in the GUI (as opposed to hitting the export button to save) More...
 
bool autoSave () const
 
template<typename RecordType >
bool readDefaultRecords (std::map< std::string, RecordType > &recordMap)
 Read a records from a default directory Map key is the filename that the record came from. More...
 
template<typename RecordType >
bool readRecordFromFile (RecordType &record, const std::string &importFileName)
 Read a records from a file. More...
 
template<typename RecordType >
bool readRecordsFromDir (std::map< std::string, RecordType > &recordMap, const std::string &importDirName)
 Read a records from a directory Map key is the filename that the record came from. More...
 
Default settings file existence & path accessors.
bool defaultFileExists () const
 
virtual std::string defaultFilePath () const
 
bool defaultBinaryFileExists () const
 
virtual std::string defaultBinaryFilePath () const
 
Factory settings file existence & path accessors.
bool factoryFileExists () const
 
virtual std::string factoryFilePath () const
 
Backup settings file existence & path accessors.
bool backupFileExists () const
 
virtual std::string backupFilePath () const
 
Default settings directory existence & path accessors.
bool defaultDirExists () const
 
virtual std::string defaultDirPath () const
 
Factory settings directory existence & path accessors.
bool factoryDirExists () const
 
virtual std::string factoryDirPath () const
 
Backup settings directory existence & path accessors.
bool backupDirExists () const
 
virtual std::string backupDirPath () const
 
Merged file paths to help with listing the right files in the ui.
bool mergedFilesExist () const
 
virtual const std::vector
< std::string > & 
mergedFiles () const
 
virtual void addMergedFile (std::string fileName)
 
User definition settings directory existence & path accessors.
bool userEntityElementDefinitionDirExists () const
 
virtual std::string userEntityElementDefinitionDirPath () const
 

Static Public Member Functions

static std::string binaryFileExtension (void)
 

Protected Member Functions

 DtDeSettings (DtDe &de, const std::string &name, const std::string &ext)
 

Protected Attributes

DtDemyDe
 
std::string myName
 
std::string myExtension
 
bool myAutoSave
 
std::vector< std::string > myMergedFiles
 

Static Protected Attributes

static const std::string myBinaryFileExtension
 

Private Member Functions

 DtDeSettings (const DtDeSettings &copy)
 Copy constructor. More...
 
 DtDeSettings ()
 Copy Constructor Not implemented. More...
 
DtDeSettingsoperator= (const DtDeSettings &)
 Assignment Operator Not implemented. More...
 

Friends

class DtDeSettingsManager
 

Detailed Description

Settings class for reading and writing settings to/from files.

Constructor & Destructor Documentation

virtual makVrv::DtDeSettings::~DtDeSettings ( )
virtual

DTOR.

makVrv::DtDeSettings::DtDeSettings ( const DtDeSettings copy)
private

Copy constructor.

makVrv::DtDeSettings::DtDeSettings ( )
private

Copy Constructor Not implemented.

makVrv::DtDeSettings::DtDeSettings ( DtDe de,
const std::string &  name,
const std::string &  ext 
)
protected

Member Function Documentation

DtDeSettings& makVrv::DtDeSettings::operator= ( const DtDeSettings )
private

Assignment Operator Not implemented.

const std::string& makVrv::DtDeSettings::name ( ) const

Get the settings name.

const std::string& makVrv::DtDeSettings::extension ( ) const

Get the extension for this settings type.

template<typename RecordType >
bool makVrv::DtDeSettings::readDefaultRecord ( RecordType &  r)
template<typename RecordType >
bool makVrv::DtDeSettings::readDefaultRecordAndName ( RecordType &  r,
std::string &  fName 
)

Read a record and file name from the default settings.

fName is output from the function and is the filename of the file that the record was read from.

template<typename RecordType >
bool makVrv::DtDeSettings::readBackupRecord ( RecordType &  r)

Read a record from the backup settings.

template<typename RecordType >
bool makVrv::DtDeSettings::readFactoryDefaultRecord ( RecordType &  r)
template<typename RecordType >
bool makVrv::DtDeSettings::writeDefaultRecord ( const RecordType &  r)
template<typename RecordType >
bool makVrv::DtDeSettings::writeBackupRecord ( const RecordType &  r)

Write a record as the default settings.

template<typename RecordType >
bool makVrv::DtDeSettings::readRecordsFrom ( std::map< std::string, RecordType > &  r,
const std::string &  importFileName 
)

Reads records from a specific location.

Map key is the filename that the record came from.

template<typename RecordType >
bool makVrv::DtDeSettings::readRecordFrom ( RecordType &  r,
const std::string &  importFileName 
)

Read a record from a specific location.

template<typename RecordType >
bool makVrv::DtDeSettings::readRecordFromBinary ( RecordType &  r,
const std::string &  importFileName 
)

Read a record from a specific location.

template<typename RecordType >
bool makVrv::DtDeSettings::writeRecordTo ( const RecordType &  r,
const std::string &  exportFileName 
) const
template<typename RecordType >
bool makVrv::DtDeSettings::writeRecordToBinary ( const RecordType &  r,
const std::string &  exportFileName 
) const

Write a record to a specific location.

void makVrv::DtDeSettings::setAutoSave ( bool  b)
inline

Save the record after each change in the GUI (as opposed to hitting the export button to save)

bool makVrv::DtDeSettings::autoSave ( ) const
inline
bool makVrv::DtDeSettings::defaultFileExists ( ) const
virtual std::string makVrv::DtDeSettings::defaultFilePath ( ) const
virtual
bool makVrv::DtDeSettings::defaultBinaryFileExists ( ) const
virtual std::string makVrv::DtDeSettings::defaultBinaryFilePath ( ) const
virtual
bool makVrv::DtDeSettings::factoryFileExists ( ) const
virtual std::string makVrv::DtDeSettings::factoryFilePath ( ) const
virtual
bool makVrv::DtDeSettings::backupFileExists ( ) const
virtual std::string makVrv::DtDeSettings::backupFilePath ( ) const
virtual
static std::string makVrv::DtDeSettings::binaryFileExtension ( void  )
static
bool makVrv::DtDeSettings::defaultDirExists ( ) const
virtual std::string makVrv::DtDeSettings::defaultDirPath ( ) const
virtual
bool makVrv::DtDeSettings::factoryDirExists ( ) const
virtual std::string makVrv::DtDeSettings::factoryDirPath ( ) const
virtual
bool makVrv::DtDeSettings::backupDirExists ( ) const
virtual std::string makVrv::DtDeSettings::backupDirPath ( ) const
virtual
bool makVrv::DtDeSettings::mergedFilesExist ( ) const
virtual const std::vector<std::string>& makVrv::DtDeSettings::mergedFiles ( ) const
virtual
virtual void makVrv::DtDeSettings::addMergedFile ( std::string  fileName)
virtual
bool makVrv::DtDeSettings::userEntityElementDefinitionDirExists ( ) const
virtual std::string makVrv::DtDeSettings::userEntityElementDefinitionDirPath ( ) const
virtual
template<typename RecordType >
bool makVrv::DtDeSettings::readDefaultRecords ( std::map< std::string, RecordType > &  recordMap)

Read a records from a default directory Map key is the filename that the record came from.

template<typename RecordType >
bool makVrv::DtDeSettings::readRecordFromFile ( RecordType &  record,
const std::string &  importFileName 
)

Read a records from a file.

template<typename RecordType >
bool makVrv::DtDeSettings::readRecordsFromDir ( std::map< std::string, RecordType > &  recordMap,
const std::string &  importDirName 
)

Read a records from a directory Map key is the filename that the record came from.

Friends And Related Function Documentation

friend class DtDeSettingsManager
friend

Member Data Documentation

DtDe& makVrv::DtDeSettings::myDe
protected
std::string makVrv::DtDeSettings::myName
protected
std::string makVrv::DtDeSettings::myExtension
protected
bool makVrv::DtDeSettings::myAutoSave
protected
std::vector<std::string> makVrv::DtDeSettings::myMergedFiles
protected
const std::string makVrv::DtDeSettings::myBinaryFileExtension
staticprotected

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

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)