![]() |
VR-Forces 4.0.4 Class Documentation
|
00001 /****************************************************************************** 00002 ** Copyright (c) 2008 MAK Technologies, Inc. 00003 ** All rights reserved. 00004 ******************************************************************************/ 00005 /****************************************************************************** 00006 ** $RCSfile: DtSchemaEntry.h,v $ $Revision: 1.10 $ $State: Exp $ 00007 ******************************************************************************/ 00008 00011 00012 #ifndef DtSchemaEntry_H_ 00013 #define DtSchemaEntry_H_ 00014 00015 #include <makArchives/makArchives.h> 00016 #include <makArchives/DtSchemaParameter.h> 00017 00018 namespace makArchives 00019 { 00023 class DT_DLL_MAKARCHIVES DtSchemaEntry 00024 { 00025 public: 00026 typedef std::vector<DtSchemaParameter> DtSchemaParameters; 00027 00029 DtSchemaEntry(); 00030 00032 DtSchemaEntry(const std::string& name); 00033 00035 DtSchemaEntry(const DtSchemaEntry& copy); 00036 00038 ~DtSchemaEntry(); 00039 00042 static const DtSchemaEntry& defaultInstance(); 00043 00045 DtSchemaEntry& operator=(const DtSchemaEntry& copy); 00046 00048 const std::string& name() const 00049 { 00050 return myName; 00051 } 00052 00054 void setName(const std::string& n) 00055 { 00056 myName = n; 00057 } 00059 virtual void addParameter(const DtSchemaParameter& parameter); 00060 00063 virtual bool removeSchemaParameter(const std::string name); 00064 00066 const DtSchemaParameters& schemaParameters() const 00067 { 00068 return myParameters; 00069 } 00070 00072 virtual bool renameParameter(const std::string& oldName, const std::string& newName); 00073 00076 DtSchemaParameter* findSchemaParameter(const std::string name); 00077 00080 const DtSchemaParameter* findSchemaParameter(const std::string name) const; 00081 00082 protected: 00083 00084 friend class boost::serialization::access; 00085 00089 00090 template <typename Archive> 00091 void serialize(Archive& ar,unsigned int version) 00092 { 00093 ar & BOOST_SERIALIZATION_NVP(myName); 00094 ar & BOOST_SERIALIZATION_NVP(myParameters); 00095 } 00096 00098 static bool findSchemaFunction(const DtSchemaParameter& parameter, const std::string& name); 00099 00100 protected: 00101 std::string myName; 00102 DtSchemaParameters myParameters; 00103 }; 00104 }; 00105 00106 BOOST_CLASS_VERSION(makArchives::DtSchemaEntry,1) 00107 00108 #endif