00001
00002
00003
#ifndef _GCONFMM_ENTRY_H
00004
#define _GCONFMM_ENTRY_H
00005
00006
#include <glibmm.h>
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
#include <gconfmm/value.h>
00031
#include <gconfmm/schema.h>
00032
00033
00034
extern "C" {
00035 typedef struct _GConfEntry
GConfEntry;
00036 }
00037
00038
namespace Gnome
00039 {
00040
00041
namespace Conf
00042 {
00043
00049 class Entry
00050 {
00051
public:
00052
#ifndef DOXYGEN_SHOULD_SKIP_THIS
00053
typedef Entry CppObjectType;
00054
typedef GConfEntry BaseObjectType;
00055
#endif
00056
00057
Entry();
00058
00059
00060
explicit Entry(
GConfEntry* castitem,
bool make_a_copy =
false);
00061
00062
Entry(
const Entry& src);
00063
Entry&
operator=(
const Entry& src);
00064
00065
~Entry();
00066
00067 GConfEntry*
gobj() {
return gobject_; }
00068 const GConfEntry*
gobj()
const {
return gobject_; }
00069
00071
GConfEntry*
gobj_copy() const;
00072
00073 protected:
00074 GConfEntry* gobject_;
00075
00076 private:
00077
00078
00079 public:
00081
Entry(const Glib::ustring& key, const
Value& value);
00082
00085
void set_value(const
Value& val);
00086
00089
void set_schema_name(const Glib::ustring& val);
00090
00093
void set_is_default(
bool is_default = true);
00094
00097
void set_is_writable(
bool is_writable = true);
00098
00101
Value get_value() const;
00102
00103
00106 Glib::ustring get_schema_name() const;
00107
00108
00109
00110 Glib::ustring get_key() const;
00111
00112
00113
00114
bool get_is_default() const;
00115
00116
00117
00118
bool get_is_writable() const;
00119
00120 private:
00121 static
GConfEntry* entry_copy(const
GConfEntry*);
00122
00123
00124 };
00125
00126 }
00127 }
00128
00129
00130 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00131 namespace Glib
00132 {
00133
namespace Container_Helpers
00134 {
00135
00136
template<>
00137
struct TypeTraits<Gnome::Conf::
Entry>
00138 {
00139
typedef Gnome::Conf::Entry CppType;
00140
typedef const GConfEntry* CType;
00141
typedef GConfEntry* CTypeNonConst;
00142
00143
static CType to_c_type (
const CppType& item) {
return item.gobj(); }
00144
static CType to_c_type (
const CType& item) {
return item; }
00145
static CppType to_cpp_type (
const CType& item) {
return Gnome::Conf::Entry(const_cast<CTypeNonConst>(item)); }
00146
static void release_c_type (
const CType&) {}
00147 };
00148
00149 }
00150 }
00151
#endif // DOXYGEN_SHOULD_SKIP_THIS
00152
00153
00154
namespace Glib
00155 {
00156
00162
Gnome::Conf::Entry wrap(
GConfEntry* object,
bool take_copy =
false);
00163
00164 }
00165
00166
#endif
00167