libcomps  ..
 All Data Structures Files Functions Variables Enumerations Macros Groups Pages
Data Structures | Functions
comps_doc.h File Reference

COMPS_Doc header file. More...

#include "comps_obj.h"
#include "comps_objdict.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)
 
COMPS_DocGroup HEAD_COMPS_DOC_ADDOBJLIST (category, COMPS_DocCategory) HEAD_COMPS_DOC_ADDOBJLIST(environment
 
COMPS_DocGroup COMPS_DocEnv HEAD_COMPS_DOC_ADDOBJDICT (langpack) HEAD_COMPS_DOC_ADDOBJMDICT(blacklist) HEAD_COMPS_DOC_ADDOBJMDICT(whiteout) HEAD_COMPS_DOC_SETPROP(lang
 
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_Doccomps_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

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
docCOMPS_Doc object
filenamefilename where to write
stdoutredirectin 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
char* comps2xml_str ( COMPS_Doc doc,
COMPS_XMLOptions *  options,
COMPS_DefaultsOptions *  def_options 
)

Generate XML string representating COMPS_Doc structure

Parameters
docCOMPS_Doc object
Returns
XML string
signed char comps_doc_cmp_u ( COMPS_Object obj1,
COMPS_Object obj2 
)

comparator callback for COMPS_Doc object

void comps_doc_copy ( COMPS_Doc doc_dst,
COMPS_Doc doc_src 
)

copy callback for COMPS_Doc object

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
docallocated COMPS_Doc object
argsarray of constructor arguments. COMPS_Doc constructor accepts encoding argument as COMPS_Str object only so array need not end with sentinel item
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* 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
c1COMPS_Doc object
c2COMPS_Doc object