Changeset 168 for XMLIO_V2/dev/dev_rv/src/xmlio/node/field.hpp
- Timestamp:
- 04/07/11 15:04:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XMLIO_V2/dev/dev_rv/src/xmlio/node/field.hpp
r157 r168 11 11 #include "declare_group.hpp" 12 12 13 namespace xmlioserver 14 { 15 namespace tree 13 namespace xmlioserver { 14 namespace tree { 15 16 /// ////////////////////// Déclarations ////////////////////// /// 17 18 class CFieldGroup; 19 class CFieldAttributes; 20 class CField; 21 22 class CFile; 23 class CGrid; 24 25 ///-------------------------------------------------------------- 26 27 // Declare/Define CFieldAttribute 28 BEGIN_DECLARE_ATTRIBUTE_MAP(CField) 29 #include "field_attribute.conf" 30 END_DECLARE_ATTRIBUTE_MAP(CField) 31 32 ///-------------------------------------------------------------- 33 class CField 34 : public CObjectTemplate<CField> 35 , public CFieldAttributes 16 36 { 17 /// ////////////////////// Déclarations ////////////////////// /// 37 /// friend /// 38 friend class CFile; 18 39 19 class CFieldGroup;20 class CFieldAttributes;21 class CField;40 /// typedef /// 41 typedef CObjectTemplate<CField> SuperClass; 42 typedef CFieldAttributes SuperClassAttribute; 22 43 23 class CFile; 24 class CGrid; 44 public : 25 45 26 ///-------------------------------------------------------------- 46 typedef CFieldAttributes RelAttributes; 47 typedef CFieldGroup RelGroup; 27 48 28 // Declare/Define CFieldAttribute 29 BEGIN_DECLARE_ATTRIBUTE_MAP(CField) 30 #include "field_attribute.conf" 31 END_DECLARE_ATTRIBUTE_MAP(CField) 49 /// Constructeurs /// 50 CField(void); 51 explicit CField(const StdString & id); 52 CField(const CField & field); // Not implemented yet. 53 CField(const CField * const field); // Not implemented yet. 32 54 33 ///-------------------------------------------------------------- 34 class CField 35 : public CObjectTemplate<CField> 36 , public CFieldAttributes 37 { 38 /// friend /// 39 friend class CFile; 55 /// Accesseurs /// 56 boost::shared_ptr<CField> getDirectFieldReference(void) const; 57 const boost::shared_ptr<CField> getBaseFieldReference(void) const; 58 const std::vector<boost::shared_ptr<CField> > & getAllReference(void) const; 40 59 41 /// typedef /// 42 typedef CObjectTemplate<CField> SuperClass; 43 typedef CFieldAttributes SuperClassAttribute; 60 boost::shared_ptr<CGrid> getRelGrid(void) const ; 61 boost::shared_ptr<CFile> getRelFile(void) const ; 44 62 45 public :63 const StdString & getBaseFieldId(void) const; 46 64 47 typedef CFieldAttributes RelAttributes;48 typedef CFieldGroup RelGroup;65 /// Mutateur /// 66 void setRelFile(const boost::shared_ptr<CFile> _file); 49 67 50 /// Constructeurs /// 51 CField(void); 52 explicit CField(const StdString & id); 53 CField(const CField & field); // Not implemented yet. 54 CField(const CField * const field); // Not implemented yet. 68 public : 55 69 56 /// Accesseurs /// 57 boost::shared_ptr<CField> getDirectFieldReference(void) const; 58 const boost::shared_ptr<CField> getBaseFieldReference(void) const; 59 const std::vector<boost::shared_ptr<CField> > & getAllReference(void) const; 70 /// Test /// 71 bool hasDirectFieldReference(void) const; 60 72 61 boost::shared_ptr<CGrid> getRelGrid(void) const ; 62 boost::shared_ptr<CFile> getRelFile(void) const ; 73 /// Traitements /// 74 void solveRefInheritance(void); 75 void solveGridReference(void); 76 void solveOperation(void); 63 77 64 const StdString & getBaseFieldId(void) const; 78 /// Destructeur /// 79 virtual ~CField(void); 65 80 66 /// Mutateur /// 67 void setRelFile(const boost::shared_ptr<CFile> _file); 81 /// Accesseurs statiques /// 82 static StdString GetName(void); 83 static StdString GetDefName(void); 84 85 static ENodeType GetType(void); 68 86 69 public:87 private : 70 88 71 /// Test /// 72 bool hasDirectFieldReference(void) const; 89 /// Propriétés privées /// 90 boost::shared_ptr<CField> baseRefObject; 91 std::vector<boost::shared_ptr<CField> > refObject; 73 92 74 /// Traitements /// 75 void solveRefInheritance(void); 76 void solveGridReference(void); 77 void solveOperation(void); 93 boost::shared_ptr<CGrid> grid ; 94 boost::shared_ptr<CFile> file; 78 95 79 /// Destructeur /// 80 virtual ~CField(void); 96 func::CFunctor * foperation; 81 97 82 /// Accesseurs statiques /// 83 static StdString GetName(void); 84 static StdString GetDefName(void); 98 }; // class CField 85 99 86 private :100 ///-------------------------------------------------------------- 87 101 88 /// Propriétés privées /// 89 boost::shared_ptr<CField> baseRefObject; 90 std::vector<boost::shared_ptr<CField> > refObject; 91 92 boost::shared_ptr<CGrid> grid ; 93 boost::shared_ptr<CFile> file; 94 95 func::CFunctor * foperation; 96 97 }; // class CField 98 99 ///-------------------------------------------------------------- 100 101 // Declare/Define CFieldGroup and CFieldDefinition 102 DECLARE_GROUP(CField); 102 // Declare/Define CFieldGroup and CFieldDefinition 103 DECLARE_GROUP(CField); 103 104 104 105 } // namespace tree
Note: See TracChangeset
for help on using the changeset viewer.