prefs.h

Go to the documentation of this file.
00001 /*
00002  *  Copyright (C) 2004-2005 Alo Sarv <madcat_@users.sourceforge.net>
00003  *
00004  *  This program is free software; you can redistribute it and/or modify
00005  *  it under the terms of the GNU General Public License as published by
00006  *  the Free Software Foundation; either version 2 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 General Public License for more details.
00013  *
00014  *  You should have received a copy of the GNU General Public License
00015  *  along with this program; if not, write to the Free Software
00016  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00017  */
00018 
00019 #ifndef __PREFS_H__
00020 #define __PREFS_H__
00021 
00022 #include <hn/config.h>
00023 #include <hn/object.h>
00024 
00025 /**
00026  * Singleton preferences class which is used for storing the actual config
00027  * data in HydraNode core
00028  */
00029 class DLLEXPORT Prefs : public Config, public Object {
00030 public:
00031         static Prefs& instance();
00032 
00033         //! @name Describe us to Object system
00034         //@{
00035         //! Retrieve the number of data fields within this object
00036         virtual uint8_t getDataCount() const;
00037         //! Retrieve the data at specific field
00038         virtual std::string getData(uint8_t num) const;
00039         //! Retrieve the data field name
00040         virtual std::string getFieldName(uint8_t num) const;
00041         //@}
00042 
00043 private:
00044         Prefs();                     //!< Default constructor
00045         Prefs(const Prefs&);         //!< Copy constructor forbidden
00046         Prefs& operator=(Prefs&);    //!< Assignment operator forbidden
00047         ~Prefs();                    //!< Destructor
00048 };
00049 
00050 #endif