00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef NCMLCDMREADER_H_
00028 #define NCMLCDMREADER_H_
00029
00030 #include "CDMReader.h"
00031 #include "boost/noncopyable.hpp"
00032
00033 namespace MetNoFimex
00034 {
00035
00036 class XMLDoc;
00037
00051 class NcmlCDMReader: public MetNoFimex::CDMReader,boost::noncopyable
00052 {
00053
00054 public:
00059 NcmlCDMReader(std::string configFile) throw(CDMException);
00065 NcmlCDMReader(const boost::shared_ptr<CDMReader> dataReader, std::string configFile) throw(CDMException);
00066 virtual ~NcmlCDMReader();
00070 virtual const boost::shared_ptr<Data> getDataSlice(const std::string& varName, size_t unLimDimPos = 0) throw(CDMException);
00071
00072
00073 private:
00077 void init() throw(CDMException);
00078
00079 void initRemove();
00080 void warnUnsupported(std::string xpath, std::string msg);
00081 void initWarnUnsupported();
00082 void initVariableNameChange();
00083 void initVariableTypeChange();
00084 void initDimensionNameChange();
00085 void initAttributeNameChange();
00086 void initAddReassignAttribute();
00087
00088 std::string configFile;
00089 XMLDoc* doc;
00090 boost::shared_ptr<CDMReader> dataReader;
00091
00092
00093
00094
00095 std::map<std::string, std::string> variableNameChanges;
00096 std::map<std::string, CDMDataType> variableTypeChanges;
00097
00098
00099 };
00100
00101 }
00102
00103 #endif