Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
KEYPropertyMap.h
Go to the documentation of this file.
1
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2
/*
3
* This file is part of the libetonyek project.
4
*
5
* This Source Code Form is subject to the terms of the Mozilla Public
6
* License, v. 2.0. If a copy of the MPL was not distributed with this
7
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
8
*/
9
10
#ifndef KEYPROPERTYMAP_H_INCLUDED
11
#define KEYPROPERTYMAP_H_INCLUDED
12
13
#include <boost/any.hpp>
14
#include <boost/unordered_map.hpp>
15
16
namespace
libetonyek
17
{
18
21
class
KEYPropertyMap
22
{
23
typedef
boost::unordered_map<std::string, boost::any>
Map_t
;
24
25
public
:
28
KEYPropertyMap
();
29
34
explicit
KEYPropertyMap
(
const
KEYPropertyMap
*parent);
35
40
KEYPropertyMap
(
const
KEYPropertyMap
&other);
41
47
KEYPropertyMap
&
operator=
(
const
KEYPropertyMap
&other);
48
53
void
swap
(
KEYPropertyMap
&other);
54
59
void
setParent
(
const
KEYPropertyMap
*parent);
60
71
boost::any
get
(
const
std::string
&
key
,
bool
lookInParent =
false
)
const
;
72
78
void
set
(
const
std::string
&
key
,
const
boost::any &
value
);
79
80
private
:
81
Map_t
m_map
;
82
const
KEYPropertyMap
*
m_parent
;
83
};
84
85
}
86
87
#endif // KEYPROPERTYMAP_H_INCLUDED
88
89
/* vim:set shiftwidth=2 softtabstop=2 expandtab: */
Generated for libetonyek by
doxygen
1.8.3.1