VR-Forces Developer's Guide
 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.

Public Member Functions

 DtEnvironmentList (DtDe &de)
 
virtual ~DtEnvironmentList ()
 
void getRecord (makArchives::DtEnvironmentListRecord &record) const
 
void setFromRecord (const makArchives::DtEnvironmentListRecord &record)
 
void getEnvironmentNames (std::vector< std::string > &names, bool includeLocalOnlyEnvironment=false) const
 
void setEnvironmentNames (const std::vector< std::string > &names)
 
const
makArchives::DtEnvironmentRecord & 
getEnvironment (const std::string &name) const
 
makArchives::DtEnvironmentRecord & getEnvironment (const std::string &name)
 
void addOrReplaceEnvironment (const makArchives::DtEnvironmentRecord &environment)
 
void removeEnvironment (const std::string &name)
 
void renameEnvironment (const std::string &oldName, const std::string &newName)
 
const
makArchives::DtEnvironmentRecord & 
getDefaultEnvironment () const
 
void setDefaultEnvironment (const makArchives::DtEnvironmentRecord &environment)
 
const std::string & getDefaultEnvironmentName () const
 
void setDefaultEnvironment (const std::string &name)
 
void loadDefaults (bool loadOnlyFactorySettings=false)
 
void restore ()
 
void saveAsDefaults ()
 
void exportSettings (const std::string &filename)
 
void importSettings (const std::string &filename)
 
const DtSettingsBackup * settingsBackup () const
 
DtSettingsBackup * settingsBackup ()
 

Protected Types

typedef std::list
< makArchives::DtEnvironmentRecord > 
SettingsList
 

Protected Member Functions

 DtEnvironmentList ()
 
virtual void saveEnvironmentList ()
 

Protected Attributes

DtDe & myDe
 
DtRecordSettingsBackupInterface * mySettingsBackup
 
SettingsList mySettingsList
 
std::string myDefaultConditionName
 

Static Protected Attributes

static const std::string myFileName
 

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) const

Put the current environment conditions into a list-record.

Parameters
[out]recordis the list-record to be populated with data.
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,
bool  includeLocalOnlyEnvironment = false 
) const

Get a list of names of all the environment entries.

Parameters
[in]includeLocalOnlyEnvironmentdictates whether or not to include the names of 'local-only' environment configurations.
[out]namesis a list to be populated with key-names. The includeLocalOnlyEnvironment flag is used by VR-Forces to get all the global and local environment conditions to be listed by their local weather area editor panel.
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.
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)

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

const DtSettingsBackup* makVrv::DtEnvironmentList::settingsBackup ( ) const

Accessors to the settings-backup.

DtSettingsBackup* makVrv::DtEnvironmentList::settingsBackup ( )

Accessors to the settings-backup.

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 Oct 15 21:27:02 EDT 2026 from SVN revision 296421
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)