NSCL DDAS  1.0
Support for XIA DDAS at the NSCL
 All Classes Namespaces Files Functions Variables Macros Pages
XMLSettingsReader.h
Go to the documentation of this file.
1 /*
2  This software is Copyright by the Board of Trustees of Michigan
3  State University (c) Copyright 2017.
4 
5  You may use this software under the terms of the GNU public license
6  (GPL). The terms of this license are described at:
7 
8  http://www.gnu.org/licenses/gpl.txt
9 
10  Authors:
11  Ron Fox
12  Giordano Cerriza
13  NSCL
14  Michigan State University
15  East Lansing, MI 48824-1321
16 */
17 
21 #ifndef XMLSETTINGSREADER_H
22 # define XMLSETTINGSREADER_H
23 #include "SettingsReader.h"
24 #include "ModuleSettings.h"
25 
26 #include <vector>
27 #include <tinyxml2.h>
28 
29 
30 namespace DDAS {
56  {
57  private:
58  std::string m_filename;
59  public:
60  XMLSettingsReader(const char* filename);
61  virtual ~XMLSettingsReader();
62 
63  virtual DDAS::ModuleSettings get();
64 private:
65 
66  tinyxml2::XMLDocument* loadModuleFile(const char* filename);
67 
68  ModuleSettings getModule(tinyxml2::XMLDocument& doc);
69  void getModuleSettings(
70  ModuleSettings& settings, tinyxml2::XMLElement& root);
71  void getChannelSettings(
72  ModuleSettings& settings, tinyxml2::XMLElement& channel
73  );
74 
75  };
76 } // namespace DDAS
77 #endif
: Define the abstract base class SettingsReader
Definition: tinyxml2.h:1258
Definition: ModuleSettings.h:36
: Capture the settings for a module in a nice struct of a package.
Definition: tinyxml2.h:1691
Definition: SettingsReader.h:38
virtual ~XMLSettingsReader()
Definition: XMLSettingsReader.cpp:45
Definition: XMLSettingsReader.h:55
XMLSettingsReader(const char *filename)
Definition: XMLSettingsReader.cpp:36
Definition: functions.h:26