inlib  1.2.0
/Users/barrand/private/dev/softinex/old/inexlib-1.2/inlib/inlib/sg/infos
Go to the documentation of this file.
00001 // Copyright (C) 2010, Guy Barrand. All rights reserved.
00002 // See the file inlib.license for terms.
00003 
00004 #ifndef inlib_sg_infos
00005 #define inlib_sg_infos
00006 
00007 // inheritance :
00008 #include "node"
00009 
00010 #include "mf"
00011 
00012 namespace inlib {
00013 namespace sg {
00014 
00015 class infos : public inlib::sg::node {
00016 public:
00017   static const std::string& s_class() {
00018     static const std::string s_v("inlib::sg::infos");
00019     return s_v;
00020   }
00021 public:
00022   virtual void* cast(const std::string& a_class) const {
00023     if(void* p = inlib::cmp_cast<infos>(this,a_class)) {return p;}
00024     return node::cast(a_class);
00025   }
00026 public:
00027   inlib::sg::mf_string strings;
00028 private:
00029   void add_fields(){
00030     add_field(&strings);
00031   }
00032 public: //node
00033   virtual node* copy() const {return new infos(*this);}
00034   virtual const std::string& s_cls() const {return s_class();}
00035 public:
00036   infos()
00037   : inlib::sg::node()
00038   {  
00039     add_fields();
00040   }
00041   virtual ~infos(){}
00042 public:
00043   infos(const infos& a_from)
00044   : inlib::sg::node(a_from)
00045   ,strings(a_from.strings)
00046   {
00047     add_fields();
00048   }
00049   infos& operator=(const infos& a_from){
00050     inlib::sg::node::operator=(a_from);
00051     strings = a_from.strings;
00052     return *this;
00053   }
00054 };
00055 
00056 }}
00057 
00058 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines