MetaEnumManager.h
Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 2006-2011, SRI International (R)
00003  *
00004  * This program is free software: you can redistribute it and/or modify
00005  * it under the terms of the GNU Lesser General Public License as published by
00006  * the Free Software Foundation, either version 3 of the License, or
00007  * (at your option) any later version.
00008  *
00009  * This program is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  * GNU Lesser General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU Lesser General Public License
00015  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
00016  */
00017 
00018 #pragma once
00019 
00020 #ifndef __OpenKarto_MetaEnumManager_h__
00021 #define __OpenKarto_MetaEnumManager_h__
00022 
00023 #include <OpenKarto/String.h>
00024 
00025 namespace karto
00026 {
00027 
00029 
00030 
00031   //@cond EXCLUDE
00032 
00036 
00037   class MetaEnum;
00038 
00039   struct MetaEnumManagerPrivate;
00040 
00044 
00049   class KARTO_EXPORT MetaEnumManager
00050   {
00051   public:
00055     static MetaEnumManager& GetInstance();
00056 
00057   public:
00064     MetaEnum& RegisterNew(const karto::String& rName, const karto::String& rId);
00065 
00072     const MetaEnum& GetByName(const karto::String& rName) const;
00073 
00080     const MetaEnum& GetById(const karto::String& rId) const;
00081 
00087     kt_bool EnumExists(const karto::String& rId) const;
00088 
00093     kt_size_t GetSize() const;
00094 
00099     void Clear();
00100 
00101   public:
00107     const MetaEnum& operator [] (kt_size_t index) const;
00108 
00109   private:
00113     MetaEnumManager();
00114 
00118     ~MetaEnumManager();
00119 
00120   private:
00124     MetaEnumManager(const MetaEnumManager&);
00125 
00129     const MetaEnumManager& operator=(const MetaEnumManager&);
00130 
00131   private:
00132     MetaEnumManagerPrivate* m_pPrivate;
00133   };
00134 
00135   // @endcond
00136 
00138 
00139 }
00140 
00141 #endif // __OpenKarto_MetaEnumManager_h__


nav2d_karto
Author(s): Sebastian Kasperski
autogenerated on Thu Aug 27 2015 14:07:25