gconfmm  2.28.0
setinterface.h
Go to the documentation of this file.
1 // -*- Mode: C++; c-basic-offset: 4 -*-
2 
3 /* setinterface.h
4  *
5  * Copyright (C) 2000-2002 GConfmm Development Team
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2.1 of the License, or (at your option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with this library; if not, write to the Free
19  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20  */
21 #ifndef GCONFMM_SET_INTERFACE_H
22 #define GCONFMM_SET_INTERFACE_H
23 #include <gconfmm/value.h>
24 
25 /* Suppress no virtual destructor warning so -Werror can be used.
26  */
27 #if (__GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96))
28 #pragma GCC system_header
29 #endif
30 
31 namespace Gnome
32 {
33 namespace Conf
34 {
35 
48 {
49 public:
50  //TODO: Add a virtual destructor, to avoid warnings, when we can break ABI.
51 
52  #ifdef GLIBMM_EXCEPTIONS_ENABLED
53  virtual void set(const Glib::ustring& key, const Value& value) = 0;
54  virtual void set(const Glib::ustring& key, bool what) = 0;
55  virtual void set(const Glib::ustring& key, int what) = 0;
56  virtual void set(const Glib::ustring& key, double what) = 0;
57  virtual void set(const Glib::ustring& key, const Glib::ustring& what) = 0;
58  virtual void set(const Glib::ustring& key, const Schema& what) = 0;
59 
60  void set(const Glib::ustring& key,const ValuePair& pair);
61 
62  void set_int_list(const Glib::ustring& key, const SListHandle_ValueInt& list);
63  void set_bool_list(const Glib::ustring& key, const SListHandle_ValueBool& list);
64  void set_float_list(const Glib::ustring& key, const SListHandle_ValueFloat& list);
65  void set_string_list(const Glib::ustring& key, const SListHandle_ValueString& list);
66  void set_schema_list(const Glib::ustring& key, const SListHandle_ValueSchema& list);
67 
68  #else //GLIBMM_EXCEPTIONS_ENABLED
69 
70  virtual void set(const Glib::ustring& key, const Value& value, std::auto_ptr<Glib::Error>& error) = 0;
71  virtual void set(const Glib::ustring& key, bool what, std::auto_ptr<Glib::Error>& error) = 0;
72  virtual void set(const Glib::ustring& key, int what, std::auto_ptr<Glib::Error>& error) = 0;
73  virtual void set(const Glib::ustring& key, double what, std::auto_ptr<Glib::Error>& error) = 0;
74  virtual void set(const Glib::ustring& key, const Glib::ustring& what, std::auto_ptr<Glib::Error>& error) = 0;
75  virtual void set(const Glib::ustring& key, const Schema& what, std::auto_ptr<Glib::Error>& error) = 0;
76 
77  void set(const Glib::ustring& key,const ValuePair& pair, std::auto_ptr<Glib::Error>& error);
78 
79  void set_int_list(const Glib::ustring& key, const SListHandle_ValueInt& list, std::auto_ptr<Glib::Error>& error);
80  void set_bool_list(const Glib::ustring& key, const SListHandle_ValueBool& list, std::auto_ptr<Glib::Error>& error);
81  void set_float_list(const Glib::ustring& key, const SListHandle_ValueFloat& list, std::auto_ptr<Glib::Error>& error);
82  void set_string_list(const Glib::ustring& key, const SListHandle_ValueString& list, std::auto_ptr<Glib::Error>& error);
83  void set_schema_list(const Glib::ustring& key, const SListHandle_ValueSchema& list, std::auto_ptr<Glib::Error>& error);
84  #endif //GLIBMM_EXCEPTIONS_ENABLED
85 };
86 
87 } /* namespace Conf */
88 } /* namespace Gnome */
89 
90 #endif