CpgAttribute

CpgAttribute — Cpg format attribute

Synopsis

#define             CPG_ATTRIBUTE_CONST                 (obj)
struct              CpgAttribute;
struct              CpgAttributeClass;
CpgAttribute *      cpg_attribute_new                   (gchar const *id);
CpgAttribute *      cpg_attribute_newv                  (gchar const *id,
                                                         ...);
void                cpg_attribute_set_arguments         (CpgAttribute *attribute,
                                                         GSList *arguments);
gchar const *       cpg_attribute_get_id                (CpgAttribute *attribute);
GSList *            cpg_attribute_get_arguments         (CpgAttribute *attribute);
GObject *           cpg_attribute_get_argument          (CpgAttribute *attribute,
                                                         gint i);
gint                cpg_attribute_num_arguments         (CpgAttribute *attribute);
                    CpgAttributePrivate;

Object Hierarchy

  GObject
   +----CpgAttribute

Properties

  "id"                       gchar*                : Read / Write / Construct Only

Description

This object represents an attribute in the Cpg format.

Details

CPG_ATTRIBUTE_CONST()

#define CPG_ATTRIBUTE_CONST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CPG_TYPE_ATTRIBUTE, CpgAttribute const))


struct CpgAttribute

struct CpgAttribute;


struct CpgAttributeClass

struct CpgAttributeClass {
};


cpg_attribute_new ()

CpgAttribute *      cpg_attribute_new                   (gchar const *id);

Create a new attribute.

id :

attribute id

Returns :

A CpgAttribute

cpg_attribute_newv ()

CpgAttribute *      cpg_attribute_newv                  (gchar const *id,
                                                         ...);

Create a new attribute.

id :

the attribute id

Returns :

the new attribute. [transfer full]

cpg_attribute_set_arguments ()

void                cpg_attribute_set_arguments         (CpgAttribute *attribute,
                                                         GSList *arguments);

Set the arguments of the attribute.

attribute :

A CpgAttribute

arguments :

A list of GObject. [element-type GObject][transfer none]

cpg_attribute_get_id ()

gchar const *       cpg_attribute_get_id                (CpgAttribute *attribute);

Get the attribute id.

attribute :

A CpgAttribute

Returns :

the attribute id.

cpg_attribute_get_arguments ()

GSList *            cpg_attribute_get_arguments         (CpgAttribute *attribute);

Get the list of arguments of the attribute.

attribute :

A CpgAttribute

Returns :

A GSList of GObject. [element-type GObject][transfer none]

cpg_attribute_get_argument ()

GObject *           cpg_attribute_get_argument          (CpgAttribute *attribute,
                                                         gint i);

Get an argument.

attribute :

A CpgAttribute

i :

The index of the argument

Returns :

The argument. [transfer none]

cpg_attribute_num_arguments ()

gint                cpg_attribute_num_arguments         (CpgAttribute *attribute);

Get the number of arguments.

attribute :

A CpgAttribute

Returns :

the number of attribute arguments

CpgAttributePrivate

typedef struct _CpgAttributePrivate CpgAttributePrivate;

Property Details

The "id" property

  "id"                       gchar*                : Read / Write / Construct Only

Id.

Default value: NULL