00001
00011 #ifndef SIMOBJECTATTRIBUTES_H
00012 #define SIMOBJECTATTRIBUTES_H
00013
00014 #include <boost/shared_ptr.hpp>
00015 using boost::shared_ptr;
00016
00017 #include "SimObjectAttributesDefinition.h"
00018
00020
00023 class SimObjectAttributes {
00024
00025 public:
00026
00027 SimObjectAttributes() {}
00028 ;
00029
00030 SimObjectAttributes( shared_ptr<SimObjectAttributesDefinition> attrDef );
00031
00032 SimObjectAttributes( SimObjectAttributes const& attr);
00033
00034 ~SimObjectAttributes();
00035
00036 template< typename T >
00037 T get( string name ) const;
00038
00039 template< typename T >
00040 void set( string name, T value );
00041
00042 double getDouble(string name) const
00043 {
00044 return get<double>(name);
00045 }
00046
00047 private:
00048 shared_ptr<SimObjectAttributesDefinition> attrDef;
00049 char* mem;
00050 };
00051
00052 #endif
00053