#ifndef __XMLIO_CGrid__ #define __XMLIO_CGrid__ /// xmlioserver headers /// #include "xmlioserver_spl.hpp" #include "group_factory.hpp" #include "declare_group.hpp" #include "domain.hpp" #include "axis.hpp" namespace xmlioserver { namespace tree { /// ////////////////////// Déclarations ////////////////////// /// class CGridGroup; class CGridAttributes; class CGrid; ///-------------------------------------------------------------- // Declare/Define CGridAttribute BEGIN_DECLARE_ATTRIBUTE_MAP(CGrid) #include "grid_attribute.conf" END_DECLARE_ATTRIBUTE_MAP(CGrid) ///-------------------------------------------------------------- class CGrid : public CObjectTemplate , public CGridAttributes { /// typedef /// typedef CObjectTemplate SuperClass; typedef CGridAttributes SuperClassAttribute; public : typedef CGridAttributes RelAttributes; typedef CGridGroup RelGroup; /// Constructeurs /// CGrid(void); explicit CGrid(const StdString & id); CGrid(const CGrid & grid); // Not implemented yet. CGrid(const CGrid * const grid); // Not implemented yet. /// Traitements /// void solveReference(void); /// Tests /// bool hasAxis(void) const; public : /// Accesseurs /// const ARRAY(int, 1) & getStoreIndex(void) const; const ARRAY(int, 1) & getOutIIndex(void) const; const ARRAY(int, 1) & getOutJIndex(void) const; const ARRAY(int, 1) & getOutLIndex(void) const; const boost::shared_ptr getRelAxis (void) const; const boost::shared_ptr getRelDomain(void) const; /// Entrées-sorties de champs /// template void inputField(const ARRAY(double, n) field, ARRAY(double, 1) stored) const; template void outputField(const ARRAY(double, 1) stored, ARRAY(double, n) field) const; /// Destructeur /// virtual ~CGrid(void); public : /// Accesseurs statiques /// static StdString GetName(void); static StdString GetDefName(void); static ENodeType GetType(void); /// Instanciateurs Statiques /// static boost::shared_ptr CreateGrid(boost::shared_ptr domain); static boost::shared_ptr CreateGrid(boost::shared_ptr domain, boost::shared_ptr axis); protected : /// Entrées-sorties de champs (interne) /// void storeField_arr(const double * const data, ARRAY(double, 1) stored) const; /// Traitements protégés /// void computeIndex(void); void solveDomainRef(void); void solveAxisRef(void); public: /// Propriétés privées /// bool withAxis ; bool isChecked; boost::shared_ptr axis ; boost::shared_ptr domain ; ARRAY(int, 1) storeIndex ; ARRAY(int, 1) out_i_index ; ARRAY(int, 1) out_j_index ; ARRAY(int, 1) out_l_index ; }; // class CGrid ///-------------------------------------------------------------- template void CGrid::inputField(const ARRAY(double, n) field, ARRAY(double, 1) stored) const { this->storeField_arr(field.data(), stored) ; } ///-------------------------------------------------------------- // Declare/Define CGridGroup and CGridDefinition DECLARE_GROUP(CGrid); ///-------------------------------------------------------------- } // namespace tree } // namespace xmlioserver #endif // __XMLIO_CGrid__