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

The DtEnvironmentList maintains a list of DtEnvironment records that can be looked up by the environment name. More...

Public Member Functions

 DtEnvironmentList (DtDe &de)
 CTOR. More...
 
virtual ~DtEnvironmentList ()
 DTOR. More...
 
void getRecord (makArchives::DtEnvironmentListRecord &record)
 
virtual void getSplitRecord (std::vector< makArchives::DtEnvironmentListRecord > &rec, std::vector< std::string > &fileNames)
 To support writing element definitions in folders as multiple files not implemented for DtEnvironmentList. More...
 
virtual void addRecords (makArchives::DtEnvironmentListRecord &recs, makArchives::DtEnvironmentListRecord &combinedRec)
 To support writing element definitions in folders as multiple files not implemented for DtEnvironmentList. More...
 
void setFromRecord (const makArchives::DtEnvironmentListRecord &record)
 Set (reset) the environment conditions from a list-record. More...
 
void getEnvironmentNames (std::vector< std::string > &names) const
 
void setEnvironmentNames (const std::vector< std::string > &names)
 Set the list of names of all the environment entries. More...
 
const
makArchives::DtEnvironmentRecord
getEnvironment (const std::string &name) const
 Get an environment record by name. More...
 
makArchives::DtEnvironmentRecordgetEnvironment (const std::string &name)
 Get an environment record by name. More...
 
void addOrReplaceEnvironment (const makArchives::DtEnvironmentRecord &environment)
 Add or replace an environment record. More...
 
void removeEnvironment (const std::string &name)
 Remove an environment record entry. More...
 
void renameEnvironment (const std::string &oldName, const std::string &newName)
 Rename an environment record entry. More...
 
const
makArchives::DtEnvironmentRecord
getDefaultEnvironment () const
 
void setDefaultEnvironment (const makArchives::DtEnvironmentRecord &environment)
 Set a default environment record. More...
 
const std::string & getDefaultEnvironmentName () const
 Get the name of the default environment record. More...
 
void setDefaultEnvironment (const std::string &name)
 Set environment record as default. More...
 
void loadDefaults (bool loadOnlyFactorySettings=false)
 
void restore ()
 Restores to backup environment from startup default. More...
 
void saveAsDefaults ()
 Save the current settings as the default settings. More...
 
void exportSettings (const std::string &filename)
 Import / export the list of named conditions (.enlx file) More...
 
void importSettings (const std::string &filename)
 
const DtSettingsBackupsettingsBackup () const
 
DtSettingsBackupsettingsBackup ()
 

Protected Types

typedef std::list
< makArchives::DtEnvironmentRecord
SettingsList
 

Protected Member Functions

 DtEnvironmentList ()
 Default constructor (not implemented) More...
 
virtual void saveEnvironmentList ()
 Saves all the current environment records to file. More...
 

Protected Attributes

DtDemyDe
 
DtRecordSettingsBackupInterfacemySettingsBackup
 
SettingsList mySettingsList
 
std::string myDefaultConditionName
 

Static Protected Attributes

static const std::string myFileName
 

Detailed Description

The DtEnvironmentList maintains a list of DtEnvironment records that can be looked up by the environment name.

Member Typedef Documentation

Constructor & Destructor Documentation

makVrv::DtEnvironmentList::DtEnvironmentList ( DtDe de)

CTOR.

virtual makVrv::DtEnvironmentList::~DtEnvironmentList ( )
virtual

DTOR.

makVrv::DtEnvironmentList::DtEnvironmentList ( )
protected

Default constructor (not implemented)

Member Function Documentation

void makVrv::DtEnvironmentList::getRecord ( makArchives::DtEnvironmentListRecord record)

Put the current environment conditions into a list-record.

Parameters
[out]recordis the list-record to be populated with data.
virtual void makVrv::DtEnvironmentList::getSplitRecord ( std::vector< makArchives::DtEnvironmentListRecord > &  rec,
std::vector< std::string > &  fileNames 
)
inlinevirtual

To support writing element definitions in folders as multiple files not implemented for DtEnvironmentList.

virtual void makVrv::DtEnvironmentList::addRecords ( makArchives::DtEnvironmentListRecord recs,
makArchives::DtEnvironmentListRecord combinedRec 
)
inlinevirtual

To support writing element definitions in folders as multiple files not implemented for DtEnvironmentList.

void makVrv::DtEnvironmentList::setFromRecord ( const makArchives::DtEnvironmentListRecord record)

Set (reset) the environment conditions from a list-record.

Parameters
[in]recordis the list-record to read the data from.
void makVrv::DtEnvironmentList::getEnvironmentNames ( std::vector< std::string > &  names) const

Get a list of names of all the environment entries.

Parameters
[out]namesis a list to be populated with key-names.
void makVrv::DtEnvironmentList::setEnvironmentNames ( const std::vector< std::string > &  names)

Set the list of names of all the environment entries.

Parameters
[in]namesis the list of names to order environment conditions.
Exceptions
DtExceptionif the given list does not contain the same number and values of the current environment order.
const makArchives::DtEnvironmentRecord& makVrv::DtEnvironmentList::getEnvironment ( const std::string &  name) const

Get an environment record by name.

Parameters
[in]nameis the name of the environment to return.
Exceptions
DtExceptionif record is not found.

Referenced by makVrf::DtDisabledEnvironment::setEnvironment().

makArchives::DtEnvironmentRecord& makVrv::DtEnvironmentList::getEnvironment ( const std::string &  name)

Get an environment record by name.

Parameters
[in]nameis the name of the environment to return.
Exceptions
DtExceptionif record is not found.
void makVrv::DtEnvironmentList::addOrReplaceEnvironment ( const makArchives::DtEnvironmentRecord environment)

Add or replace an environment record.

Parameters
[in]environmentis the environment-record to add.
Note
The environment is saved under the name found in the record. If the environment name already exists, the corresponding entry is changed to the given data. If the environment name does not exist a new entry is added.
void makVrv::DtEnvironmentList::removeEnvironment ( const std::string &  name)

Remove an environment record entry.

Parameters
[in]nameis the name of the environment to remove.
void makVrv::DtEnvironmentList::renameEnvironment ( const std::string &  oldName,
const std::string &  newName 
)

Rename an environment record entry.

Parameters
[in]oldNameis the name of the existing environment record.
[in]newNameis the name the environment record should have.
Exceptions
DtExceptionif record is not found.
const makArchives::DtEnvironmentRecord& makVrv::DtEnvironmentList::getDefaultEnvironment ( ) const

Get the default environment record.

Returns
The default environment record.
Exceptions
DtExceptionif default is not found.
void makVrv::DtEnvironmentList::setDefaultEnvironment ( const makArchives::DtEnvironmentRecord environment)

Set a default environment record.

Parameters
[in]environmentis the environment-record to set.
Note
The environment is saved under the name found in the record. If the environment name already exists, the corresponding entry is changed to the given data and saved as the default record. If the environment name does not exist a new entry is added and saved as the default record.
const std::string& makVrv::DtEnvironmentList::getDefaultEnvironmentName ( ) const

Get the name of the default environment record.

Returns
The name of the default environment record.
void makVrv::DtEnvironmentList::setDefaultEnvironment ( const std::string &  name)

Set environment record as default.

Parameters
[in]nameis the name of the environment set as default.
Exceptions
DtExceptionif not found.
Note
Locates the environment record by name and sets it as default.
void makVrv::DtEnvironmentList::loadDefaults ( bool  loadOnlyFactorySettings = false)

Load default settings.

Parameters
[in]loadOnlyFactorySettingsflag to load factory settings.
void makVrv::DtEnvironmentList::restore ( )

Restores to backup environment from startup default.

void makVrv::DtEnvironmentList::saveAsDefaults ( )

Save the current settings as the default settings.

void makVrv::DtEnvironmentList::exportSettings ( const std::string &  filename)

Import / export the list of named conditions (.enlx file)

void makVrv::DtEnvironmentList::importSettings ( const std::string &  filename)
const DtSettingsBackup* makVrv::DtEnvironmentList::settingsBackup ( ) const

Accessors to the settings-backup.

DtSettingsBackup* makVrv::DtEnvironmentList::settingsBackup ( )
virtual void makVrv::DtEnvironmentList::saveEnvironmentList ( )
protectedvirtual

Saves all the current environment records to file.

Member Data Documentation

const std::string makVrv::DtEnvironmentList::myFileName
staticprotected
DtDe& makVrv::DtEnvironmentList::myDe
protected
DtRecordSettingsBackupInterface* makVrv::DtEnvironmentList::mySettingsBackup
protected
SettingsList makVrv::DtEnvironmentList::mySettingsList
protected
std::string makVrv::DtEnvironmentList::myDefaultConditionName
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)