"Fossies" - the Fresh Open Source Software Archive

Member "fimex-1.4.1/src/ProradXMLIoFactory.cc" (30 Oct 2019, 1674 Bytes) of package /linux/privat/fimex-1.4.1.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "ProradXMLIoFactory.cc" see the Fossies "Dox" file reference documentation.

    1 /*
    2   Fimex, src/ProradXMLIoFactory.cc
    3 
    4   Copyright (C) 2019 met.no
    5 
    6   Contact information:
    7   Norwegian Meteorological Institute
    8   Box 43 Blindern
    9   0313 OSLO
   10   NORWAY
   11   email: diana@met.no
   12 
   13   Project Info:  https://wiki.met.no/fimex/start
   14 
   15   This library is free software; you can redistribute it and/or modify it
   16   under the terms of the GNU Lesser General Public License as published by
   17   the Free Software Foundation; either version 2.1 of the License, or
   18   (at your option) any later version.
   19 
   20   This library is distributed in the hope that it will be useful, but
   21   WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
   22   or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
   23   License for more details.
   24 
   25   You should have received a copy of the GNU Lesser General Public
   26   License along with this library; if not, write to the Free Software
   27   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301,
   28   USA.
   29 */
   30 
   31 
   32 #include "ProradXMLIoFactory.h"
   33 
   34 #define MIFI_IO_READER_SUPPRESS_DEPRECATED
   35 #include "ProradXMLCDMReader.h"
   36 #undef MIFI_IO_READER_SUPPRESS_DEPRECATED
   37 
   38 namespace MetNoFimex {
   39 
   40 static const bool installed = IoFactory::install("proradxml", std::make_shared<ProradXMLIoFactory>());
   41 
   42 int ProradXMLIoFactory::matchFileName(const std::string&)
   43 {
   44     return 0;
   45 }
   46 
   47 int ProradXMLIoFactory::matchFileTypeName(const std::string& type)
   48 {
   49     return (type == "prorad") ? 1 : 0;
   50 }
   51 
   52 CDMReader_p ProradXMLIoFactory::createReader(const std::string&, const std::string& fileName, const XMLInput&, const std::vector<std::string>&)
   53 {
   54     return std::make_shared<ProradXMLCDMReader>(fileName);
   55 }
   56 
   57 } // namespace MetNoFimex