X11workbench Toolkit  1.0

Descriptor for parsed XML entry. More...

#include <conf_help.h>

Data Fields

int iNextIndex
 0-based index for next item at this level; <= 0 for none. 0 marks "end of list" for top level
 
int iContainer
 0-based index for container; <= 0 for none.
 
int iContentsIndex
 0-based first array index for 'contents' for this entry; <= 0 for none
 
int nLabelOffset
 BYTE offset to label (zero-byte-terminated) string (from beginning of array) for this entry; <= 0 for 'no label'.
 
int nDataOffset
 BYTE offset to data (zero-byte-terminated) string (from beginning of array) for the entry data; <= 0 for 'no data'.
 

Detailed Description

Descriptor for parsed XML entry.

This structure describes an XML entry. It is expected to be a part of an array of such structures, in which the next element will be referenced by 'iNextIndex', and the first contents referenced by 'iContentsIndex', with respect to the beginning of that array.

You can construct an array of CHXMLEntry structures from XML data using CHParseXML()

This structure deliberately uses integer offsets instead of pointers. The offsets refer to the starting pointer of the CHXMLEntry array, so you'll always need to pass the index along with the origin pointer to refer to a particular element. The basic reason for doing this is to allow the array to be relocateable without any pointer fixups.

If you want to create a C++ object to wrap it, you could return pointers by using 'GetXXX()' methods, particularly those that can operate on const objects. Then you would store the origin pointer along with the index inside of the C++ object, and calculate the correct addresses in the 'GetXXX()' methods as required by the application.

typedef struct _CHXMLEntry_
{
int iNextIndex; // 0-based index for next item at this level; <= 0 for none. 0 marks "end of list" for top level
int iContainer; // 0-based index for container; <= 0 for none.
int iContentsIndex; // 0-based first array index for 'contents' for this entry; <= 0 for none
int nLabelOffset; // BYTE offset to label (zero-byte-terminated) string (from beginning of array)
// for this entry; <= 0 for 'no label'
int nDataOffset; // BYTE offset to data (zero-byte-terminated) string (from beginning of array)
// for the entry data; <= 0 for 'no data'

Definition at line 605 of file conf_help.h.


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