Ignore:
Timestamp:
04/07/11 15:04:00 (13 years ago)
Author:
hozdoba
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • XMLIO_V2/dev/dev_rv/src/xmlio/node/field.hpp

    r157 r168  
    1111#include "declare_group.hpp" 
    1212 
    13 namespace xmlioserver 
    14 { 
    15    namespace tree 
     13namespace xmlioserver { 
     14namespace 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 
    1636   { 
    17       /// ////////////////////// Déclarations ////////////////////// /// 
     37         /// friend /// 
     38         friend class CFile; 
    1839 
    19       class CFieldGroup; 
    20       class CFieldAttributes; 
    21       class CField; 
     40         /// typedef /// 
     41         typedef CObjectTemplate<CField>   SuperClass; 
     42         typedef CFieldAttributes SuperClassAttribute; 
    2243 
    23       class CFile; 
    24       class CGrid; 
     44      public : 
    2545 
    26       ///-------------------------------------------------------------- 
     46         typedef CFieldAttributes RelAttributes; 
     47         typedef CFieldGroup      RelGroup; 
    2748 
    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. 
    3254 
    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; 
    4059 
    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 ; 
    4462 
    45          public : 
     63         const StdString & getBaseFieldId(void) const; 
    4664 
    47             typedef CFieldAttributes RelAttributes; 
    48             typedef CFieldGroup      RelGroup; 
     65         /// Mutateur /// 
     66         void setRelFile(const boost::shared_ptr<CFile> _file); 
    4967 
    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 : 
    5569 
    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; 
    6072 
    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); 
    6377 
    64             const StdString & getBaseFieldId(void) const; 
     78         /// Destructeur /// 
     79         virtual ~CField(void); 
    6580 
    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); 
    6886 
    69          public : 
     87      private : 
    7088 
    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; 
    7392 
    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; 
    7895 
    79             /// Destructeur /// 
    80             virtual ~CField(void); 
     96         func::CFunctor * foperation; 
    8197 
    82             /// Accesseurs statiques /// 
    83             static StdString GetName(void); 
    84             static StdString GetDefName(void); 
     98   }; // class CField 
    8599 
    86          private : 
     100   ///-------------------------------------------------------------- 
    87101 
    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); 
    103104 
    104105   } // namespace tree 
Note: See TracChangeset for help on using the changeset viewer.