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 /* Suppress no virtual destructor warning so -Werror can be used.
00026  */
00027 #if (__GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96))
00028 #pragma GCC system_header
00029 #endif
00030 
00031 namespace Gnome
00032 {
00033 namespace Conf
00034 {
00035 
00047 class SetInterface
00048 {
00049 public:
00050     //TODO: Add a virtual destructor, to avoid warnings, when we can break ABI.
00051 
00052     #ifdef GLIBMM_EXCEPTIONS_ENABLED
00053     virtual void set(const Glib::ustring& key, const Value& value) = 0;
00054     virtual void set(const Glib::ustring& key, bool what) = 0;
00055     virtual void set(const Glib::ustring& key, int what) = 0;
00056     virtual void set(const Glib::ustring& key, double what) = 0;
00057     virtual void set(const Glib::ustring& key, const Glib::ustring& what) = 0;
00058     virtual void set(const Glib::ustring& key, const Schema& what) = 0;
00059 
00060     void set(const Glib::ustring& key,const ValuePair& pair);
00061 
00062     void set_int_list(const Glib::ustring& key, const SListHandle_ValueInt& list);
00063     void set_bool_list(const Glib::ustring& key, const SListHandle_ValueBool& list);
00064     void set_float_list(const Glib::ustring& key, const SListHandle_ValueFloat& list);
00065     void set_string_list(const Glib::ustring& key, const SListHandle_ValueString& list);
00066     void set_schema_list(const Glib::ustring& key, const SListHandle_ValueSchema& list);
00067 
00068     #else //GLIBMM_EXCEPTIONS_ENABLED
00069 
00070     virtual void set(const Glib::ustring& key, const Value& value, std::auto_ptr<Glib::Error>& error) = 0;
00071     virtual void set(const Glib::ustring& key, bool what, std::auto_ptr<Glib::Error>& error) = 0;
00072     virtual void set(const Glib::ustring& key, int what, std::auto_ptr<Glib::Error>& error) = 0;
00073     virtual void set(const Glib::ustring& key, double what, std::auto_ptr<Glib::Error>& error) = 0;
00074     virtual void set(const Glib::ustring& key, const Glib::ustring& what, std::auto_ptr<Glib::Error>& error) = 0;
00075     virtual void set(const Glib::ustring& key, const Schema& what, std::auto_ptr<Glib::Error>& error) = 0;
00076 
00077     void set(const Glib::ustring& key,const ValuePair& pair, std::auto_ptr<Glib::Error>& error);
00078 
00079     void set_int_list(const Glib::ustring& key, const SListHandle_ValueInt& list, std::auto_ptr<Glib::Error>& error);
00080     void set_bool_list(const Glib::ustring& key, const SListHandle_ValueBool& list, std::auto_ptr<Glib::Error>& error);
00081     void set_float_list(const Glib::ustring& key, const SListHandle_ValueFloat& list, std::auto_ptr<Glib::Error>& error);
00082     void set_string_list(const Glib::ustring& key, const SListHandle_ValueString& list, std::auto_ptr<Glib::Error>& error);
00083     void set_schema_list(const Glib::ustring& key, const SListHandle_ValueSchema& list, std::auto_ptr<Glib::Error>& error);
00084     #endif //GLIBMM_EXCEPTIONS_ENABLED
00085 };
00086 
00087 } /* namespace Conf */
00088 } /* namespace Gnome */
00089 
00090 #endif

Generated on Mon Sep 17 19:56:57 2007 for gconfmm by  doxygen 1.5.3