NSCL DDAS  1.0
Support for XIA DDAS at the NSCL
 All Classes Namespaces Files Functions Variables Macros Pages
DescriptionParser.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  Jeromy Tompkins
13  NSCL
14  Michigan State University
15  East Lansing, MI 48824-1321
16 */
17 
22 #ifndef DESCRIPTIONPARSER_H
23 #define DESCRIPTIONPARSER_H
24 
25 #include <iostream>
26 #include <cstdint>
27 #include <vector>
28 #include <string>
29 
31 {
32  // Public types:
33 
34 public:
35  // Contains information about a single DSP Parameter:
36  // Note
37  typedef struct _DSPParameter {
38  std::uint32_t s_offset; // Offset in data block to parameter.
39  unsigned s_qty; // Number of elements making up parameter.
40  std::string s_name; // Name of element.
42 
43  // Attributes:
44 
45 private:
46  std::vector<DSPParameter> m_vars;
47 
48  // Methods:
49 
50 public:
51  void parseFile(std::istream& f); // Parse the description from a source.
52  std::vector<DSPParameter> getDescription();
53 };
54 
55 #endif // multi include guard.
Definition: DescriptionParser.h:30
void parseFile(std::istream &f)
Definition: DescriptionParser.cpp:32
std::vector< DSPParameter > getDescription()
Definition: DescriptionParser.cpp:68
Definition: DescriptionParser.h:37