setinterface.h

Go to the documentation of this file.
00001 // -*- Mode: C++; c-basic-offset: 4  -*-
00002 
00003 /* setinterface.h
00004  * 
00005  * Copyright (C) 2000-2002 GConfmm Development Team
00006  *
00007  * This library is free software; you can redistribute it and/or
00008  * modify it under the terms of the GNU Library General Public
00009  * License as published by the Free Software Foundation; either
00010  * version 2 of the License, or (at your option) any later version.
00011  *
00012  * This library is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015  * Library General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU Library General Public
00018  * License along with this library; if not, write to the Free
00019  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00020  */
00021 #ifndef GCONFMM_SET_INTERFACE_H
00022 #define GCONFMM_SET_INTERFACE_H
00023 #include <gconfmm/value.h>
00024 
00025 namespace Gnome
00026 {
00027 namespace Conf
00028 {
00029 
00041 class SetInterface
00042 {
00043 public:
00044     //TODO: Add a virtual destructor, to avoid warnings, when we can break ABI.
00045 
00046     #ifdef GLIBMM_EXCEPTIONS_ENABLED
00047     virtual void set(const Glib::ustring& key, const Value& value) = 0;
00048     virtual void set(const Glib::ustring& key, bool what) = 0;
00049     virtual void set(const Glib::ustring& key, int what) = 0;
00050     virtual void set(const Glib::ustring& key, double what) = 0;
00051     virtual void set(const Glib::ustring& key, const Glib::ustring& what) = 0;
00052     virtual void set(const Glib::ustring& key, const Schema& what) = 0;
00053 
00054     void set(const Glib::ustring& key,const ValuePair& pair);
00055 
00056     void set_int_list(const Glib::ustring& key, const SListHandle_ValueInt& list);
00057     void set_bool_list(const Glib::ustring& key, const SListHandle_ValueBool& list);
00058     void set_float_list(const Glib::ustring& key, const SListHandle_ValueFloat& list);
00059     void set_string_list(const Glib::ustring& key, const SListHandle_ValueString& list);
00060     void set_schema_list(const Glib::ustring& key, const SListHandle_ValueSchema& list);
00061 
00062     #else //GLIBMM_EXCEPTIONS_ENABLED
00063 
00064     virtual void set(const Glib::ustring& key, const Value& value, std::auto_ptr<Glib::Error>& error) = 0;
00065     virtual void set(const Glib::ustring& key, bool what, std::auto_ptr<Glib::Error>& error) = 0;
00066     virtual void set(const Glib::ustring& key, int what, std::auto_ptr<Glib::Error>& error) = 0;
00067     virtual void set(const Glib::ustring& key, double what, std::auto_ptr<Glib::Error>& error) = 0;
00068     virtual void set(const Glib::ustring& key, const Glib::ustring& what, std::auto_ptr<Glib::Error>& error) = 0;
00069     virtual void set(const Glib::ustring& key, const Schema& what, std::auto_ptr<Glib::Error>& error) = 0;
00070 
00071     void set(const Glib::ustring& key,const ValuePair& pair, std::auto_ptr<Glib::Error>& error);
00072 
00073     void set_int_list(const Glib::ustring& key, const SListHandle_ValueInt& list, std::auto_ptr<Glib::Error>& error);
00074     void set_bool_list(const Glib::ustring& key, const SListHandle_ValueBool& list, std::auto_ptr<Glib::Error>& error);
00075     void set_float_list(const Glib::ustring& key, const SListHandle_ValueFloat& list, std::auto_ptr<Glib::Error>& error);
00076     void set_string_list(const Glib::ustring& key, const SListHandle_ValueString& list, std::auto_ptr<Glib::Error>& error);
00077     void set_schema_list(const Glib::ustring& key, const SListHandle_ValueSchema& list, std::auto_ptr<Glib::Error>& error);
00078     #endif //GLIBMM_EXCEPTIONS_ENABLED
00079 };
00080 
00081 } /* namespace Conf */
00082 } /* namespace Gnome */
00083 
00084 #endif

Generated on Fri Aug 11 09:35:40 2006 for gconfmm by  doxygen 1.4.7