IODA Bundle
Parser.h
Go to the documentation of this file.
1 /*
2  * (C) Copyright 2020 NOAA/NWS/NCEP/EMC
3  *
4  * This software is licensed under the terms of the Apache Licence Version 2.0
5  * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
6  */
7 
8 #pragma once
9 
10 #include "eckit/config/LocalConfiguration.h"
11 
12 #include "DataContainer.h"
13 
14 namespace Ingester
15 {
16  /// \brief Base class for all input Parsers
17  class Parser
18  {
19  public:
20  Parser() = default;
21  explicit Parser(const eckit::Configuration& conf);
22 
23  virtual ~Parser() = default;
24 
25  /// \brief Parse the input.
26  /// \param maxMsgsToParse Messages to parse (0 for everything)
27  virtual std::shared_ptr<DataContainer> parse(const size_t maxMsgsToParse = 0) = 0;
28 
29  /// \brief Start over from the beginning
30  virtual void reset() = 0;
31  };
32 } // namespace Ingester
Base class for all input Parsers.
Definition: Parser.h:18
Parser(const eckit::Configuration &conf)
virtual ~Parser()=default
virtual std::shared_ptr< DataContainer > parse(const size_t maxMsgsToParse=0)=0
Parse the input.
virtual void reset()=0
Start over from the beginning.
Parser()=default