VR-Forces 4.0.4 Class Documentation
include/makArchives/DtGenericTerrainRecord.h
Go to the documentation of this file.
00001 /******************************************************************************* 
00002 ** Copyright (c) 2010 MAK Technologies, Inc. 
00003 ** All rights reserved. 
00004 *******************************************************************************/ 
00005  
00009  
00010 #ifndef DtGenericTerrainRecord_H_ 
00011 #define DtGenericTerrainRecord_H_ 
00012  
00013 #include <makArchives/makArchives.h>
00014 #include <makArchives/DtSerialize.h>
00015 
00016 #include <boost/serialization/version.hpp>
00017 #include <boost/serialization/set.hpp>
00018 #include <boost/serialization/map.hpp>
00019 #include <boost/config.hpp>
00020 #include <map>
00021 #include <string>
00022 #include <set>
00023 
00024 namespace makArchives 
00025 {
00031    class DT_DLL_MAKARCHIVES DtGenericTerrainRecord
00032    {
00033    public:
00034 
00035       //Global public empty string.
00036       static const std::string theEmptyString;
00037 
00038       typedef std::map<std::string,std::string> ParameterMap;
00039 
00044       DtGenericTerrainRecord(const std::string& modelName = "");
00045       
00047       DtGenericTerrainRecord(const DtGenericTerrainRecord& copy);
00048 
00050       DtGenericTerrainRecord(const std::string& modelName,const DtGenericTerrainRecord& copy);
00051       
00053       ~DtGenericTerrainRecord();
00054 
00056       DtGenericTerrainRecord& operator=(const DtGenericTerrainRecord&);
00057       
00068       DT_DECLARE_ALL_serialize_FUNCTIONS
00069 
00075       void setParameter(const std::string& parameterName,
00076          const std::string& parameterValue);
00077 
00082       bool clearParameter(const std::string& parameterName);
00083 
00088       const std::string& parameter(const std::string& parameterName) const;
00089 
00096       const std::string* findParameter(const std::string& parameterName) const;
00097 
00101       std::string* findParameter(const std::string& parameterName);
00102 
00104       const ParameterMap& parameters() const;
00105 
00107       const std::string& type() const;
00108       
00109    protected:
00110 
00111       static std::string cleanName(const std::string& name);
00112       
00113       class SerializableParameterMap : public ParameterMap
00114       {
00115       public:
00116          template <typename Archive>
00117          void serialize(Archive& ar,unsigned int version)
00118          {
00119             ar & DT_SERIALIZE_BASE(ParameterMap);
00120          }
00121       };
00122 
00123       template <typename Archive>
00124       void _serialize(Archive& ar,unsigned int version)
00125       {
00126          ar & DT_SERIALIZE_MEMBER(myType);
00127          ar & DT_SERIALIZE_MEMBER(myParameters);
00128       }
00129      
00130       std::string myType;
00131       SerializableParameterMap myParameters;      
00132 
00133    };
00134 }
00135 
00136 BOOST_CLASS_VERSION(makArchives::DtGenericTerrainRecord,1)
00137  
00138 #endif 

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)