XMLIOSERVER 0.4
Serveur d'Entrées/Sorties parallèles
inetcdf4_adv.hpp
Aller à la documentation de ce fichier.
00001 /* ************************************************************************** *
00002  *      Copyright © IPSL/LSCE, XMLIOServer, Avril 2010 - Octobre 2011         *
00003  * ************************************************************************** */
00004 
00005 #ifndef __INETCDF4_ADV_HPP__
00006 #define __INETCDF4_ADV_HPP__
00007 
00016 #ifndef __XIOS_NO_EXTERN
00017 
00018 // C++ standard headers
00019 #  include <set>
00020 #  include <algorithm>
00021 
00022 #endif // __XIOS_NO_EXTERN
00023 
00024 // XMLIOServer headers
00025 #include "inetcdf4.hpp"
00026 
00027 // ////////////////////////////// Déclarations ///////////////////////////// //
00028 
00029 namespace xmlioserver
00030 {
00031    namespace io
00032    {
00033       class CINetCDF4Adv : public CINetCDF4
00034       {
00035             typedef CINetCDF4 SuperClass; 
00037          public : // Constructeurs
00038          
00040             CINetCDF4Adv(void); // NIY
00041             
00046             explicit CINetCDF4Adv(const std::string & _filename);
00047             
00052             CINetCDF4Adv(const CINetCDF4Adv & _inetcdfadv);// NIY
00053             
00058             CINetCDF4Adv(const CINetCDF4Adv * const _inetcdfadv); // NIY
00059             
00060          public : // Destructeur
00061          
00063             virtual ~CINetCDF4Adv(void);
00064             
00065          public : // Divers accesseurs
00066 
00067             std::string getLonCoordName (const std::string & _varname);
00068             std::string getLatCoordName (const std::string & _varname);
00069             std::string getVertCoordName(const std::string & _varname);
00070             std::string getTimeCoordName(const std::string & _varname);
00071              
00072             std::set<std::string> getCoordVariables(void);
00073             std::set<std::string> getBoundVariables(void);
00074             
00075             std::string getCoordinatesId(const std::string & _varname);
00076             std::string getBoundsId     (const std::string & _varname);
00077             
00078             template <class DataType>
00079                void getMissingValue(DataType & _value, const std::string & _varname);
00080             
00081             std::vector<std::string> getCoordinatesIdList(const std::string & _varname);
00082             
00083             std::vector<std::string> getDataVariables(bool _is3D       = true,
00084                                                       bool _isRecti    = true,
00085                                                       bool _isCurvi    = true,
00086                                                       bool _isUnstr    = true,
00087                                                       bool _isCellData = true,
00088                                                       bool _isTemporal = true);
00089             
00090 
00091             std::size_t getNbVertex(const std::string & _varname);
00092             
00093          public : // Divers mutateurs
00094              
00095              template <class DataType, std::size_t ndim>
00096                  bool replaceMissingValue(const std::string & _varname,
00097                                           boost::multi_array<DataType, ndim> & _data,
00098                                           const DataType & newValue);
00099             
00100          public : // Divers méthodes de tests           
00101 
00102             bool hasAttribute(const std::string & name,
00103                               const std::string * const _varname  = NULL);
00104 
00105             bool hasVariable    (const std::string & _varname);
00106             bool hasMissingValue(const std::string & _varname);
00107             bool hasCoordinates (const std::string & _varname);
00108             bool hasBounds      (const std::string & _varname);
00109 
00110             bool hasTemporalDim(void);
00111 
00112             bool isBound       (const std::string & _varname);
00113             bool isCoordinate  (const std::string & _varname);
00114             bool isRectilinear (const std::string & _varname);
00115             bool isCurvilinear (const std::string & _varname);
00116             bool isUnknown     (const std::string & _varname);
00117             bool isUnstructured(const std::string & _varname);
00118             bool isTemporal    (const std::string & _varname);
00119             bool is3Dim        (const std::string & _varname);
00120             bool isCellGrid    (const std::string & _varname);            
00121             
00122       }; // class CINetCDF4Adv
00123    } // namespace io
00124 } // namespace xmlioserver
00125 
00126 #endif  // __INETCDF4_ADV_HPP__ 
00127 
 Tout Classes Espaces de nommage Fichiers Fonctions Variables Définition de type Énumérations Valeurs énumérées Amis Macros