cp_cfg_element_t Struct Reference
Data structures

A configuration element contains configuration information for an extension. More...

`#include <cpluff.h>`

Collaboration diagram for cp_cfg_element_t:
[legend]

## Data Fields

char * | name
| The name of the configuration element.
unsigned int | num_atts
| Number of attribute name, value pairs in the atts array.
char ** | atts
| An array of pointers to alternating attribute names and values.
char * | value
| An optional value of this configuration element.
cp_cfg_element_t * | parent
| A pointer to the parent element or NULL if this is a root element.
unsigned int | index
| The index of this element among its siblings (0-based).
unsigned int | num_children
| Number of children in the children array.
cp_cfg_element_t * | children
| An array of num_children childrens of this element.

## Detailed Description

A configuration element contains configuration information for an extension.

Utility functions cp_lookup_cfg_element and cp_lookup_cfg_value can be used for traversing the tree of configuration elements. Pointer to the root configuration element is stored at cp_extension_t::configuration and others are contained as children of parent elements.

## Field Documentation

## name

char* name

The name of the configuration element.

This corresponds to the name of the element in a plug-in descriptor.

## num_atts

unsigned int num_atts

Number of attribute name, value pairs in the atts array.

## atts

char** atts

An array of pointers to alternating attribute names and values.

Attribute values can be localized.

## value

char* value

An optional value of this configuration element.

NULL if not available. The value can be localized. This corresponds to the text contents of the element in a plug-in descriptor.

## parent

cp_cfg_element_t* parent

A pointer to the parent element or NULL if this is a root element.

## index

unsigned int index

The index of this element among its siblings (0-based).

## num_children

unsigned int num_children

Number of children in the children array.

## children

cp_cfg_element_t* children

An array of num_children childrens of this element.

These correspond to child elements in a plug-in descriptor.

The documentation for this struct was generated from the following file:

- cpluff.h

Generated on Sun Mar 31 2024 17:56:45 for C-Pluff C API by 1.9.8