Configuration 4 GNU (CFG)


Property

PrevNext

Name

Property -- The base class of all Config4GNU properties.

Synopsis



#define     PROPERTY                        (obj)
#define     PROPERTY_CLASS                  (klass)
#define     IS_PROPERTY                     (obj)
#define     IS_PROPERTY_CLASS               (obj)
#define     PROPERTY_GET_CLASS              (obj)
GType       property_get_type               (void);
gchar*      property_get_name               (Property *me);
gchar*      property_get_value              (Property *me);
void        property_set_value              (Property *me,
                                             const char *value);
gchar*      property_get_default            (Property *me);
gchar*      property_get_description        (Property *me);

Object Hierarchy


  GObject
   +----Property

Description

The Property type is the base type for all properties in Config4GNU. A property is an association between a name and a value. Properties also have descriptions, data types, and default values. Properties are attached to a Node.

To create a property, use node_add_property(). The Property must be created using a Node because the type of Property created will depend on what type of Node it is for. The Property class described on this page is an abstract type. It defines methods and properties, but no implementation. For an implementation of Property that uses XML for storage, see XMLProperty.

Details

PROPERTY()

#define PROPERTY(obj)      (G_TYPE_CHECK_INSTANCE_CAST ((obj), property_get_type(), Property))

obj : 

PROPERTY_CLASS()

#define PROPERTY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), property_get_type(), PropertyClass))

klass : 

IS_PROPERTY()

#define IS_PROPERTY(obj)      (G_TYPE_CHECK_INSTANCE_TYPE ((obj), property_get_type()))

obj : 

IS_PROPERTY_CLASS()

#define IS_PROPERTY_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE ((klass), property_get_type()))

obj : 

PROPERTY_GET_CLASS()

#define PROPERTY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), property_get_type(), PropertyClass))

obj : 

property_get_type ()

GType       property_get_type               (void);

Registers the Property type if necessary.

Returns : The GObject type identifier for the Property class.

property_get_name ()

gchar*      property_get_name               (Property *me);

Accesses the name of a property. The Property class by itself does not implement this method. The XMLProperty class returns the value of the name attribute on the property element.

me : a Property
Returns : the name of the property.

property_get_value ()

gchar*      property_get_value              (Property *me);

Accesses the value of a property. The Property class by itself does not implement this method. The XMLProperty class returns the content of the child element <value> that exists in the <property> element.

me : a Property
Returns : the value of the property.

property_set_value ()

void        property_set_value              (Property *me,
                                             const char *value);

Changes the value of a property. The XMLProperty class implements this method by changing the content of the <value> element that exists in the <property> element.

me : a Property
value : the new value to assign to the property.

property_get_default ()

gchar*      property_get_default            (Property *me);

Accesses the default value of a property. This information is used when a property value is needed but no value is defined. This information is also used to display in a user front-end.

me : a Property
Returns : the property's default value.

property_get_description ()

gchar*      property_get_description        (Property *me);

Accesses the description for a property. The description is defined in the class definition file. The information is used to display in a user front-end, as the user is editing a property's value.

me : a Property
Returns : the property's description.

See Also

Node, XMLProperty

PrevHomeNext
NodeUpComputerNode

SourceForge Logo