"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/metgm/MetGmCDMWriterImpl.h" between
fimex-1.4.1.tar.gz and fimex-1.4.2.tar.gz

About: Fimex is a the File Interpolation, Manipulation and EXtraction library for gridded geospatial data. It converts between different, extensible dataformats (currently netcdf, NcML, grib1/2 and felt).

MetGmCDMWriterImpl.h  (fimex-1.4.1):MetGmCDMWriterImpl.h  (fimex-1.4.2)
/* /*
* Fimex * Fimex
* *
* (C) Copyright 2011, met.no * (C) Copyright 2011-2019, met.no
* *
* Project Info: https://wiki.met.no/fimex/start * Project Info: https://wiki.met.no/fimex/start
* *
* This library is free software; you can redistribute it and/or modify it * This library is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by * under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or * the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This library is distributed in the hope that it will be useful, but * This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
skipping to change at line 29 skipping to change at line 29
* License along with this library; if not, write to the Free Software * License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
* USA. * USA.
*/ */
#ifndef METGM_CDMWRITERIMPL_HPP #ifndef METGM_CDMWRITERIMPL_HPP
#define METGM_CDMWRITERIMPL_HPP #define METGM_CDMWRITERIMPL_HPP
// implementation stuff // implementation stuff
// //
#include "MetGmTimeTag.h"
#include "MetGmCDMVariableProfile.h" #include "MetGmCDMVariableProfile.h"
#include "MetGmConfigurationMappings.h" #include "MetGmConfigurationMappings.h"
// fimex // fimex
#include "fimex/CDMWriter.h" #include "fimex/CDMWriter.h"
#include "fimex/CDM.h"
#include "fimex/XMLDoc.h"
// standard // standard
// //
#include <map> #include <map>
#include <memory> #include <memory>
#include <set> #include <set>
#include <string> #include <string>
#include <vector> #include <vector>
namespace MetNoFimex { namespace MetNoFimex {
/* forwrd decelarations */ class CDMAttribute;
class MetGmVersion; class CDMVariable;
class MetGmHandlePtr; class XMLDoc;
class MetGmGroup3Ptr;
class MetGmFileHandlePtr; /* forwrd decelarations */
class MetGmTimeTag; class MetGmVersion;
class MetGmXTag; class MetGmHandlePtr;
class MetGmYTag; class MetGmGroup3Ptr;
class MetGmTags; class MetGmFileHandlePtr;
class MetGmTags;
class MetGmCDMWriterImpl : public CDMWriter class MetGmTimeTag;
{ class MetGmXTag;
public: class MetGmYTag;
/** class MetGmTags;
* @param cdmReader dataSource
* @param outputFile file-name to write to class MetGmCDMWriterImpl : public CDMWriter
* @param configFile xml-configuration {
*/ public:
explicit MetGmCDMWriterImpl /**
( * @param cdmReader dataSource
CDMReader_p cdmReader, * @param outputFile file-name to write to
const std::string& outputFile, * @param configFile xml-configuration
const std::string& configFile */
); explicit MetGmCDMWriterImpl(CDMReader_p cdmReader, const std::string& output
File, const std::string& configFile);
virtual ~MetGmCDMWriterImpl();
~MetGmCDMWriterImpl();
/**
* @warning only public for testing virtual void configureAndWrite();
* @return the new name of a variable, eventually changed by the writers
config /**
*/ * @warning only public for testing
const std::string& getVariableName(const std::string& varName) const; * @return the new name of a variable, eventually changed by the writers con
/** fig
* @warning only public for testing */
* @return the new name of a dimension, eventually changed by the writer const std::string& getVariableName(const std::string& varName) const;
s config /**
*/ * @warning only public for testing
const std::string& getDimensionName(const std::string& dimName) const; * @return the new name of a dimension, eventually changed by the writers co
/** nfig
* @warning only public for testing */
* @param varName original variable name (before config: newname) const std::string& getDimensionName(const std::string& dimName) const;
* @param attName original attribute name (before config: newname) /**
* @return an attribute contained in the writers attribute, possibly add * @warning only public for testing
ed by config * @param varName original variable name (before config: newname)
*/ * @param attName original attribute name (before config: newname)
const CDMAttribute& getAttribute(const std::string& varName, const std:: * @return an attribute contained in the writers attribute, possibly added b
string& attName) const; y config
*/
protected: const CDMAttribute& getAttribute(const std::string& varName, const std::stri
ng& attName) const;
explicit MetGmCDMWriterImpl(CDMReader_p cdmReader, const std::string& ou
tputFile); protected:
typedef std::shared_ptr<MetGmTags> MetGmTagsPtr;
void configure(const std::unique_ptr<XMLDoc>& doc);
explicit MetGmCDMWriterImpl(CDMReader_p cdmReader, const std::string& output
void writeGroup0Data(); File);
void writeGroup1Data();
void writeGroup2Data(); virtual void configure(const std::unique_ptr<XMLDoc>& doc);
void writeHeader(); virtual void init();
virtual void write();
void writeGroup3Data(const CDMVariable* pVar);
void writeGroup3VerticalAxis(const CDMVariable* pVar); void writeGroup0Data();
void writeGroup3TimeAxis(const CDMVariable* pVar); void writeGroup1Data();
void writeGroup3HorizontalAxis(const CDMVariable* pVar); void writeGroup2Data();
void writeHeader();
void writeGroup4Data(const CDMVariable* pVar);
void writeGroup3Data(const MetGmCDMVariableProfile& profile);
virtual void init(); void writeGroup3VerticalAxis(const MetGmTagsPtr& tags);
virtual void writeGroup5Data(const CDMVariable* pVar); void writeGroup3TimeAxis(const MetGmTagsPtr& tags);
void writeGroup3HorizontalAxis(const MetGmTagsPtr& tags);
typedef std::shared_ptr<MetGmTags> MetGmTagsPtr;
void writeGroup4Data(const MetGmCDMVariableProfile& profile);
std::string configFileName_;
virtual void writeGroup5Data(const MetGmCDMVariableProfile& profile, const C
std::shared_ptr<MetGmVersion> metgmVersion_; DMVariable* pVar);
std::shared_ptr<MetGmHandlePtr> metgmHandle_;
std::shared_ptr<MetGmFileHandlePtr> metgmFileHandle_; protected:
std::shared_ptr<MetGmTimeTag> metgmTimeTag_; std::unique_ptr<XMLDoc> xmlConfig_;
time_point analysisTime_; std::shared_ptr<MetGmVersion> metgmVersion_;
std::shared_ptr<MetGmHandlePtr> metgmHandle_;
xml_configuration xmlConfiguration_; std::shared_ptr<MetGmFileHandlePtr> metgmFileHandle_;
cdm_configuration cdmConfiguration_; std::shared_ptr<MetGmTimeTag> metgmTimeTag_;
};
xml_configuration xmlConfiguration_;
cdm_configuration cdmConfiguration_;
};
} } // namespace MetNoFimex
#endif // METGM_CDMWRITERIMPL_HPP #endif // METGM_CDMWRITERIMPL_HPP
 End of changes. 5 change blocks. 
90 lines changed or deleted 90 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)