ATLAS Offline Software
Loading...
Searching...
No Matches
Value.h
Go to the documentation of this file.
1/* emacs: this is -*- c++ -*- */
19
20
21#ifndef READCARDS_VALUE_H
22#define READCARDS_VALUE_H
23
24
25#include <string>
26#include <vector>
27#include <iostream>
28
29
30
31// using namespace std;
32
38
39class Value {
40
41public:
42
43 Value() : m_Tag(""), m_Val(0) { }
44 Value(char* s, const std::vector<std::string>& v) : m_Tag(s), m_Val(v) { }
45 Value(char* s, const std::string& v) : m_Tag(s), m_Val(0) { m_Val.push_back(v); }
46 Value(const std::string& s, const std::vector<std::string>& v) : m_Tag(s), m_Val(v) { }
47 Value(const std::string& s, const std::string& v) : m_Tag(s), m_Val(0) { m_Val.push_back(v); }
48
49 const std::string& Tag() const { return m_Tag; }
50 const std::vector<std::string>& Val() const { return m_Val; }
51
52private:
53
54 std::string m_Tag;
55 std::vector<std::string> m_Val;
56
57};
58
59
60std::ostream& operator<<(std::ostream& s, const Value& v);
61
62
63#endif /* READCARDS_VALUE_H */
64
65
66
67
68
69
70
71
72
73
std::ostream & operator<<(std::ostream &s, const Value &v)
Definition Value.cxx:24
tag-value pair class.
Definition Value.h:39
Value(char *s, const std::string &v)
Definition Value.h:45
Value(const std::string &s, const std::string &v)
Definition Value.h:47
Value(char *s, const std::vector< std::string > &v)
Definition Value.h:44
std::string m_Tag
Definition Value.h:54
Value()
Definition Value.h:43
const std::string & Tag() const
Definition Value.h:49
std::vector< std::string > m_Val
Definition Value.h:55
Value(const std::string &s, const std::vector< std::string > &v)
Definition Value.h:46
const std::vector< std::string > & Val() const
Definition Value.h:50