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 <list>
29#include <string>
30
32{
33public:
34 /** Reference list. */
35 typedef std::list<std::pair<std::string, std::string>> RefList;
36
37 InterfacePseudoMap(std::string name, std::string type, std::string keytype, std::string comment);
38
39 void valid();
40
41 std::string getName() const;
42 std::string getComment() const;
43 std::string getType() const;
44 std::string getKeyType() const;
45
46 void addRef(std::string fieldname, std::string key);
47
49
50private:
51 std::string name_;
52 std::string type_;
53 std::string comment_;
54 std::string keytype_;
55
56 RefList parefs_;
57};
58
59#endif
Interface generator internal representation of a pseudo map as parsed from the XML template file.
Definition: pseudomap.h:32
std::list< std::pair< std::string, std::string > > RefList
Reference list.
Definition: pseudomap.h:35
std::string getName() const
Get name of field.
Definition: pseudomap.cpp:56
InterfacePseudoMap(std::string name, std::string type, std::string keytype, std::string comment)
Constructor.
Definition: pseudomap.cpp:41
std::string getType() const
Get type of field.
Definition: pseudomap.cpp:65
std::string getKeyType() const
Get type of key value.
Definition: pseudomap.cpp:83
void addRef(std::string fieldname, std::string key)
Add reference.
Definition: pseudomap.cpp:127
std::string getComment() const
Get comment of field.
Definition: pseudomap.cpp:74
RefList & getRefList()
Get reference list.
Definition: pseudomap.cpp:136
void valid()
Assert validity.
Definition: pseudomap.cpp:98