MetaEnumManager.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2006-2011, SRI International (R)
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public License
15  * along with this program. If not, see <http://www.gnu.org/licenses/>.
16  */
17 
18 #pragma once
19 
20 #ifndef __OpenKarto_MetaEnumManager_h__
21 #define __OpenKarto_MetaEnumManager_h__
22 
23 #include <OpenKarto/String.h>
24 
25 namespace karto
26 {
27 
29 
30 
31  //@cond EXCLUDE
32 
36 
37  class MetaEnum;
38 
39  struct MetaEnumManagerPrivate;
40 
44 
49  class KARTO_EXPORT MetaEnumManager
50  {
51  public:
55  static MetaEnumManager& GetInstance();
56 
57  public:
64  MetaEnum& RegisterNew(const karto::String& rName, const karto::String& rId);
65 
72  const MetaEnum& GetByName(const karto::String& rName) const;
73 
80  const MetaEnum& GetById(const karto::String& rId) const;
81 
87  kt_bool EnumExists(const karto::String& rId) const;
88 
93  kt_size_t GetSize() const;
94 
99  void Clear();
100 
101  public:
107  const MetaEnum& operator [] (kt_size_t index) const;
108 
109  private:
113  MetaEnumManager();
114 
118  ~MetaEnumManager();
119 
120  private:
124  MetaEnumManager(const MetaEnumManager&);
125 
129  const MetaEnumManager& operator=(const MetaEnumManager&);
130 
131  private:
132  MetaEnumManagerPrivate* m_pPrivate;
133  };
134 
135  // @endcond
136 
138 
139 }
140 
141 #endif // __OpenKarto_MetaEnumManager_h__
bool kt_bool
Definition: Types.h:145
std::size_t kt_size_t
Definition: Types.h:138
#define KARTO_EXPORT
Definition: Macros.h:78
Definition: Any.cpp:20


nav2d_karto
Author(s): Sebastian Kasperski
autogenerated on Tue Nov 7 2017 06:02:36