STK++ 1.0
STK_IPropertySource.h
Go to the documentation of this file.
00001 /*--------------------------------------------------------------------*/
00002 /*     Copyright (C) 2004-2007  Serge Iovleff
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
00006  published by the Free Software Foundation; either version 2 of the
00007  License, or (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
00015  License along with this program; if not, write to the
00016  Free Software Foundation, Inc.,
00017  59 Temple Place,
00018  Suite 330,
00019  Boston, MA 02111-1307
00020  USA
00021 
00022  Contact : Serge.Iovleff@stkpp.org
00023  */
00024 /*--------------------------------------------------------------------*/
00025 /* $Id: STK_IPropertySource.h,v 1.2 2009/10/26 22:08:01 siovleff Exp $
00026  *
00027  * Project:  stkpp::gui::model
00028  * created on: 2 oct. 2009
00029  * Purpose:  Define an Interface class for handling properties of the
00030  * objects in the model.
00031  * Author:   iovleff, serge.iovleff@stkpp.org
00032  *
00033  * $Log: STK_IPropertySource.h,v $
00034  * Revision 1.2  2009/10/26 22:08:01  siovleff
00035  * Creating GProgram class
00036  *
00037  * Revision 1.1  2009/10/13 20:50:57  siovleff
00038  * Initial import of the model project
00039  *
00040  **/
00041 /*--------------------------------------------------------------------*/
00048 #ifndef STK_IPROPERTYSOURCE_H
00049 #define STK_IPROPERTYSOURCE_H
00050 
00051 #include <list>
00052 
00053 #include "../../../projects/STKernel/include/STK_String.h"
00054 
00055 #include "STK_PropertyDescriptor.h"
00056 
00057 namespace STK
00058 {
00059 
00073 class IPropertySource
00074 {
00075   protected:
00077     static std::list<PropertyDescriptor> descriptors_;
00078 
00080     IPropertySource();
00081 
00082   public:
00084     virtual ~IPropertySource();
00085 
00095     inline static const std::list<PropertyDescriptor>& getPropertyDescriptors()
00096     { return descriptors_;}
00097 
00113     virtual bool isPropertySet(String const& id) const =0;
00114 
00123     virtual const String* getPropertyValue(String const& id) const =0;
00124 };
00125 
00126 }
00127 
00128 #endif /* STK_IPROPERTYSOURCE_H */