Fawkes API  Fawkes Development Version
pseudomap.h
1 
2 /***************************************************************************
3  * pseudomap.h - Interface generator pseudo map representation
4  *
5  * Created: Thu Nov 20 15:06:39 2008
6  * Copyright 2006-2008 Tim Niemueller [www.niemueller.de]
7  *
8  ****************************************************************************/
9 
10 /* This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  * GNU Library General Public License for more details.
19  *
20  * Read the full text in the LICENSE.GPL file in the doc directory.
21  */
22 
23 #ifndef __INTERFACES_GENERATOR_PSEUDOMAP_H_
24 #define __INTERFACES_GENERATOR_PSEUDOMAP_H_
25 
26 #include <interfaces/generator/enum_constant.h>
27 
28 #include <string>
29 #include <list>
30 
32 {
33  public:
34  /** Reference list. */
35  typedef std::list<std::pair<std::string, std::string> > RefList;
36 
37  InterfacePseudoMap(std::string name, std::string type,
38  std::string keytype, std::string comment);
39 
40  void valid();
41 
42  std::string getName() const;
43  std::string getComment() const;
44  std::string getType() const;
45  std::string getKeyType() const;
46 
47  void addRef(std::string fieldname, std::string key);
48 
49  RefList & getRefList();
50 
51  private:
52  std::string __name;
53  std::string __type;
54  std::string __comment;
55  std::string __keytype;
56 
57  RefList __parefs;
58 };
59 
60 #endif
std::string getName() const
Get name of field.
Definition: pseudomap.cpp:57
std::string getComment() const
Get comment of field.
Definition: pseudomap.cpp:77
RefList & getRefList()
Get reference list.
Definition: pseudomap.cpp:139
std::list< std::pair< std::string, std::string > > RefList
Reference list.
Definition: pseudomap.h:35
Interface generator internal representation of a pseudo map as parsed from the XML template file...
Definition: pseudomap.h:31
std::string getKeyType() const
Get type of key value.
Definition: pseudomap.cpp:87
void addRef(std::string fieldname, std::string key)
Add reference.
Definition: pseudomap.cpp:129
void valid()
Assert validity.
Definition: pseudomap.cpp:104
InterfacePseudoMap(std::string name, std::string type, std::string keytype, std::string comment)
Constructor.
Definition: pseudomap.cpp:43
std::string getType() const
Get type of field.
Definition: pseudomap.cpp:67