MetaAttribute.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_MetaAttribute_h__
00021 #define __OpenKarto_MetaAttribute_h__
00022 
00023 #include <OpenKarto/String.h>
00024 #include <OpenKarto/Any.h>
00025 
00026 namespace karto
00027 {
00028 
00030 
00031 
00035 
00036   template <typename T> class MetaClassHelper;
00037 
00038   struct MetaAttributePrivate;
00039 
00043 
00047   class KARTO_EXPORT MetaAttribute
00048   {
00049   public:
00053     virtual ~MetaAttribute();
00054 
00055   public:
00061     kt_bool HasAttribute(const karto::String& rId) const;
00062 
00068     const Any& GetAttribute(const karto::String& rId) const;
00069 
00070   protected:
00074     MetaAttribute();
00075 
00081     void AddAttribute(const karto::String& rId, const Any& rValue) const;
00082 
00083   private:
00084     template <typename T> friend class MetaClassHelper;
00085 
00086     MetaAttributePrivate* m_pPrivate;
00087   };
00088 
00090 
00091 }
00092 
00093 #endif // __OpenKarto_MetaAttribute_h__


nav2d_karto
Author(s): Sebastian Kasperski
autogenerated on Sun Apr 2 2017 04:05:23