libcomps ..

Loading...
Searching...
No Matches
Data Structures | Functions
comps_doc.h File Reference

COMPS_Doc header file. More...

`#include "comps_obj.h"`
`#include "comps_objdict.h"`
`#include "comps_objlist.h"`
`#include "comps_log.h"`
`#include "comps_types.h"`
`#include "comps_docgroup.h"`
`#include "comps_doccategory.h"`
`#include "comps_docenv.h"`
`#include "comps_validate.h"`
`#include "comps_default.h"`

Go to the source code of this file.

## Data Structures
struct | COMPS_Doc

## Functions
void | comps_doc_create (COMPS_Doc *doc, COMPS_Object **args)
void | comps_doc_copy (COMPS_Doc *doc_dst, COMPS_Doc *doc_src)
void | comps_doc_destroy (COMPS_Doc *doc)
signed char | comps_doc_cmp_u (COMPS_Object *obj1, COMPS_Object *obj2)
signed char | comps2xml_f (COMPS_Doc *doc, char *filename, char stdoutredirect, COMPS_XMLOptions *xml_options, COMPS_DefaultsOptions *def_options)
char * | comps2xml_str (COMPS_Doc *doc, COMPS_XMLOptions *options, COMPS_DefaultsOptions *def_options)
COMPS_Doc * | comps_doc_union (COMPS_Doc *c1, COMPS_Doc *c2)

## Detailed Description

COMPS_Doc header file.

COMPS_Doc object support union operation. Read more about Libcomps objects unioning

See also
  COMPS_Doc getters
  COMPS_Doc setters
  COMPS_Doc adders

## Function Documentation

## ◆ comps2xml_f()

signed char comps2xml_f | ( | COMPS_Doc * | doc,
|  | char * | filename,
|  | char | stdoutredirect,
|  | COMPS_XMLOptions * | xml_options,
|  | COMPS_DefaultsOptions * | def_options )

Write XML representation to file

Parameters

  doc | COMPS_Doc object
  filename | filename where to write
  stdoutredirect | in non-zero all warning and error messages will be redirected to stdout, otherwise will be stored in doc->log only

Returns
  0 if there wasn't any errors, 1 if there was non-fatal errors -1 if fatal error emerge during xml generation

## ◆ comps2xml_str()

char * comps2xml_str | ( | COMPS_Doc * | doc,
|  | COMPS_XMLOptions * | options,
|  | COMPS_DefaultsOptions * | def_options )

Generate XML string representating COMPS_Doc structure

Parameters

  doc | COMPS_Doc object

Returns
  XML string

## ◆ comps_doc_cmp_u()

signed char comps_doc_cmp_u | ( | COMPS_Object * | obj1,
|  | COMPS_Object * | obj2 )

comparator callback for COMPS_Doc object

## ◆ comps_doc_copy()

void comps_doc_copy | ( | COMPS_Doc * | doc_dst,
|  | COMPS_Doc * | doc_src )

copy callback for COMPS_Doc object

## ◆ comps_doc_create()

void comps_doc_create | ( | COMPS_Doc * | doc,
|  | COMPS_Object ** | args )

constructor callback for COMPS_Doc object. COMPS_Doc is COMPS_Object derivate. Use comps_object_create() or COMPS_OBJECT_CREATE for construction instead

Parameters

  doc | allocated COMPS_Doc object
  args | array of constructor arguments. COMPS_Doc constructor accepts encoding argument as COMPS_Str object only so array need not end with sentinel item

## ◆ comps_doc_destroy()

void comps_doc_destroy | ( | COMPS_Doc * | doc | ) |

destructor callback for COMPS_Doc object. COMPS_Doc is COMPS_Object derivate. Use comps_object_create() for construction instead

## ◆ comps_doc_union()

COMPS_Doc * comps_doc_union | ( | COMPS_Doc * | c1,
|  | COMPS_Doc * | c2 )

Union two COMPS_Doc structures COMPS_Doc structures are unioned as unioning it's subparts (group, categories, environments). Object with same 'id' attribute are regarded as equal and unioned by with each other

Parameters

  c1 | COMPS_Doc object
  c2 | COMPS_Doc object