![]() |
VR-Forces 4.1 Class Documentation
|
DtGenericTerrainRecords allow the VR-Forces terrainInterface library to instantiate and configure the proper type of terrain implementation. More...
Classes | |
| class | SerializableParameterMap |
Public Types | |
| typedef std::map< std::string, std::string > | ParameterMap |
Public Member Functions | |
| DtGenericTerrainRecord (const std::string &modelName="") | |
| CTOR. | |
| DtGenericTerrainRecord (const DtGenericTerrainRecord ©) | |
| CCTOR. | |
| DtGenericTerrainRecord (const std::string &modelName, const DtGenericTerrainRecord ©) | |
| Create a copy but with a new name. | |
| ~DtGenericTerrainRecord () | |
| DTOR. | |
| DtGenericTerrainRecord & | operator= (const DtGenericTerrainRecord &) |
| Assignment operator. | |
| DT_DECLARE_ALL_serialize_FUNCTIONS void | setParameter (const std::string ¶meterName, const std::string ¶meterValue) |
| Declare serialize functions Call via serialize(Archive ar, unsigned int version); Where Archive can be any of : xml_oarchive,xml_iarchive,binary_archive, portable_binary_oarchive binary_iarchive, portable_binary_iarchive,text_oarchive, or text_iarchive example: fstream fo("test.xml",std;:ios_base::out); xml_oarchive os(fo); DtGenericTerrainRecord aDef; aDef.serialize(os,0);. | |
| bool | clearParameter (const std::string ¶meterName) |
| Completely remove a parameter. | |
| const std::string & | parameter (const std::string ¶meterName) const |
| Helper function for getting a parameter, not that if the parameter is not found an empty string is returned which is does not indicate if the parameter is found or is simply not set. | |
| const std::string * | findParameter (const std::string ¶meterName) const |
| Find a parameter. | |
| std::string * | findParameter (const std::string ¶meterName) |
| Find a parameter The parameter name is NOT case sensitive, ie Param == PARAM == param. | |
| const ParameterMap & | parameters () const |
| Get the parameters. | |
| const std::string & | type () const |
| Get the record type. | |
Static Public Attributes | |
| static const std::string | theEmptyString |
Protected Member Functions | |
| template<typename Archive > | |
| void | _serialize (Archive &ar, unsigned int version) |
Static Protected Member Functions | |
| static std::string | cleanName (const std::string &name) |
Protected Attributes | |
| std::string | myType |
| SerializableParameterMap | myParameters |
DtGenericTerrainRecords allow the VR-Forces terrainInterface library to instantiate and configure the proper type of terrain implementation.
The generic nature of the name value pairs provided by this class also allow user-created terrain implementation plug-ins to be specific & configured.
| typedef std::map<std::string,std::string> makArchives::DtGenericTerrainRecord::ParameterMap |
| makArchives::DtGenericTerrainRecord::DtGenericTerrainRecord | ( | const std::string & | modelName = "" | ) |
CTOR.
| makArchives::DtGenericTerrainRecord::DtGenericTerrainRecord | ( | const DtGenericTerrainRecord & | copy | ) |
CCTOR.
| makArchives::DtGenericTerrainRecord::DtGenericTerrainRecord | ( | const std::string & | modelName, |
| const DtGenericTerrainRecord & | copy | ||
| ) |
Create a copy but with a new name.
| makArchives::DtGenericTerrainRecord::~DtGenericTerrainRecord | ( | ) |
DTOR.
| DtGenericTerrainRecord& makArchives::DtGenericTerrainRecord::operator= | ( | const DtGenericTerrainRecord & | ) |
Assignment operator.
| DT_DECLARE_ALL_serialize_FUNCTIONS void makArchives::DtGenericTerrainRecord::setParameter | ( | const std::string & | parameterName, |
| const std::string & | parameterValue | ||
| ) |
Declare serialize functions Call via serialize(Archive ar, unsigned int version); Where Archive can be any of : xml_oarchive,xml_iarchive,binary_archive, portable_binary_oarchive binary_iarchive, portable_binary_iarchive,text_oarchive, or text_iarchive example: fstream fo("test.xml",std;:ios_base::out); xml_oarchive os(fo); DtGenericTerrainRecord aDef; aDef.serialize(os,0);.
Set a parameter's value, if the parameter does not exist a new parameter will be created. The parameter name is NOT case sensitive, ie Param == PARAM == param. Setting a parameter to a null string does NOT remove the parameter all together i.e. calls to findParameter will return a valid pointer.
| bool makArchives::DtGenericTerrainRecord::clearParameter | ( | const std::string & | parameterName | ) |
Completely remove a parameter.
Calls to findParameter will return a null pointer. The parameter name is NOT case sensitive, ie Param == PARAM == param.
| const std::string& makArchives::DtGenericTerrainRecord::parameter | ( | const std::string & | parameterName | ) | const |
Helper function for getting a parameter, not that if the parameter is not found an empty string is returned which is does not indicate if the parameter is found or is simply not set.
The parameter name is NOT case sensitive, ie Param == PARAM == param.
| const std::string* makArchives::DtGenericTerrainRecord::findParameter | ( | const std::string & | parameterName | ) | const |
Find a parameter.
The parameter name is NOT case sensitive, ie Param == PARAM == param.
| 0 | if the parameter is not found. |
| std::string* makArchives::DtGenericTerrainRecord::findParameter | ( | const std::string & | parameterName | ) |
Find a parameter The parameter name is NOT case sensitive, ie Param == PARAM == param.
| 0 | if the parameter is not found. |
| const ParameterMap& makArchives::DtGenericTerrainRecord::parameters | ( | ) | const |
Get the parameters.
| const std::string& makArchives::DtGenericTerrainRecord::type | ( | ) | const |
Get the record type.
|
staticprotected |
|
inlineprotected |
References DT_SERIALIZE_MEMBER.
|
static |
|
protected |
|
protected |