GdaReportItem

GdaReportItem

Functions

Types and Values

Description

Functions

gda_report_item_new ()

GdaReportItem *
gda_report_item_new (GdaReportValid *valid,
                     const gchar *name);

Creates a new item with the given name, and using the given GdaReportValid object

Parameters

valid

a GdaReportValid object

 

name

name of the item to be created

 

Returns

the new GdaReportItem or NULL if there is some problem


gda_report_item_new_from_dom ()

GdaReportItem *
gda_report_item_new_from_dom (xmlNodePtr node);

Creates a new item from a given xml node

Parameters

node

a xmlNodePtr, assumed to be a valid gda-report element

 

Returns

the new GdaReportItem or NULL if there is some problem


gda_report_item_remove ()

gboolean
gda_report_item_remove (GdaReportItem *item);

Remove the current item from the report

Parameters

item

the GdaReportItem to be removed

 

Returns

TRUE if all is ok, FALSE otherwise


gda_report_item_add_previous ()

gboolean
gda_report_item_add_previous (GdaReportItem *item,
                              GdaReportItem *new_item);

Sets new_item as the previous sibling of item

Parameters

item

the referential GdaReportItem

 

new_item

the GdaReportItem to be added

 

Returns

TRUE if all is ok, FALSE otherwise


gda_report_item_add_next ()

gboolean
gda_report_item_add_next (GdaReportItem *item,
                          GdaReportItem *new_item);

Sets new_item as the next sibling of item

Parameters

item

the referential GdaReportItem

 

new_item

the GdaReportItem to be added

 

Returns

TRUE if all is ok, FALSE otherwise


gda_report_item_add_child ()

gboolean
gda_report_item_add_child (GdaReportItem *parent,
                           GdaReportItem *child);

Sets child item as a child of parent item

Parameters

parent

a GdaReportItem

 

child

an already created GdaReportItem

 

Returns

TRUE if all is ok, FALSE otherwise


gda_report_item_replace ()

gboolean
gda_report_item_replace (GdaReportItem *item,
                         GdaReportItem *new_item);

Replace item for new_item

Parameters

item

the GdaReportItem to be replaced

 

new_item

the new GdaReportItem

 

Returns

TRUE if all is ok, FALSE otherwise


gda_report_item_to_dom ()

xmlNodePtr
gda_report_item_to_dom (GdaReportItem *item);

Parameters

item

a GdaReportItem

 

Returns

the xml representation of the item, or NULL if there is some problem


gda_report_item_get_item_type ()

gchar *
gda_report_item_get_item_type (GdaReportItem *item);

Parameters

item

a GdaReportItem object

 

Returns

the type of the item


gda_report_item_set_attribute ()

gboolean
gda_report_item_set_attribute (GdaReportItem *item,
                               const gchar *name,
                               const gchar *value);

Validates the attribute and the value and, if all is right, sets the given value to the attribute of given item

Parameters

item

a GdaReportItem object

 

name

name of the attribute to be set

 

value

value to be set

 

Returns

TRUE if all is ok, FALSE otherwise


gda_report_item_get_attribute ()

gchar *
gda_report_item_get_attribute (GdaReportItem *item,
                               const gchar *name);

Parameters

item

a GdaReportItem object

 

name

an attribute name

 

Returns

the value of given attribute in given item. If attribute is not set, but a default value is defined in the DTD, this defaults value is returned. If there is some problem, or attribute is not defined and there is no default value, NULL is returned


gda_report_item_get_inherit_attribute ()

gchar *
gda_report_item_get_inherit_attribute (GdaReportItem *item,
                                       const gchar *name);

Searches for the attribute in all ancestors of the item

Parameters

item

a GdaReportItem object

 

name

an attribute name

 

Returns

the value of the attribute in the first ancestor where found, or NULL if not found or there is some problem


gda_report_item_get_child_by_id ()

GdaReportItem *
gda_report_item_get_child_by_id (GdaReportItem *parent,
                                 const gchar *id);

Searches recursively for a child item with the given Id

Parameters

parent

a GdaReportItem object

 

id

the id of the searched child item

 

Returns

the child item if found, or NULL otherwise


gda_report_item_get_first_child ()

GdaReportItem *
gda_report_item_get_first_child (GdaReportItem *parent);

Parameters

parent

a GdaReportItem object

 

Returns

the first child item found, or NULL if no child exists


gda_report_item_get_next_child ()

GdaReportItem *
gda_report_item_get_next_child (GdaReportItem *parent,
                                GdaReportItem *item);

Parameters

parent

a GdaReportItem object

 

item

the previous item to the searched one

 

Returns

next child item to the given child item


gda_report_item_set_content ()

gboolean
gda_report_item_set_content (GdaReportItem *item,
                             const gchar *content);

gda_report_item_get_content ()

gchar *
gda_report_item_get_content (GdaReportItem *item);

gda_report_item_belongs_to_report_document ()

gboolean
gda_report_item_belongs_to_report_document
                               (GdaReportItem *item);


gda_report_item_get_report ()

GdaReportItem *
gda_report_item_get_report (GdaReportItem *item);

Parameters

item

a GdaReportItem object

 

Returns

The report to which current item is assigned to, or NULL if it is not assigned yet

Types and Values

struct GdaReportItemPrivate

struct GdaReportItemPrivate {
	xmlNodePtr node;
	GdaReportValid *valid;
};