cpe_testexpr Struct Reference
[Private membersCPE Language]

CPE language boolean expression. More...

#include <cpelang_priv.h>

Public Member Functions

Parse functions

Functions for parsing structures from XML.

Return value is new structure filled by content of XML file represented by XML reader or import source structure. Structure needs to be freed by the caller.



struct cpe_testexprcpe_testexpr_parse (xmlTextReaderPtr reader)
 Parse CPE test expression structure.
Export functions

Functions for export structures to XML by XML writer.

Exported structures need to be freed by the caller.



void cpe_testexpr_export (const struct cpe_testexpr *expr, xmlTextWriterPtr writer)
 Function for export CPE test expression element.
Get functions

Functions for getting attributes from CVE model structures.

Return value is pointer to structure's member. Do not free unless you null the pointer in the structure. Use remove function otherwise.



cpe_lang_oper_t cpe_testexpr_get_oper (const struct cpe_testexpr *item)
 cpe_testexpr functions to get variable members
struct cpe_testexpr_iteratorcpe_testexpr_get_meta_expr (const struct cpe_testexpr *item)
 Get CPE expression subexpression.
struct cpe_namecpe_testexpr_get_meta_cpe (const struct cpe_testexpr *item)
 Get CPE name to match against.
struct cpe_testexprcpe_testexpr_get_next (const struct cpe_testexpr *expr)
 Function to get next expr from array.
Add functions

Get XML namespace from CPE lang model

Functions to add member to list. Return value is true if added succesfuly or false in case of error.



bool cpe_testexpr_add_subexpression (struct cpe_testexpr *expr, struct cpe_testexpr *sub)
 Add XML namespace to CPE lang model.
New functions

Constructors of CVE model structures.

Free function returns new empty allocated structure. If returns non NULL it need to be freed by the caller.



struct cpe_testexprcpe_testexpr_new (void)
 Constructor of CPE test expression.
Set functions

Set functions assign values to members of structures except lists.

For lists use add functions. Parameters of set functions are duplicated in memory and need to be freed by caller.



bool cpe_testexpr_set_oper (struct cpe_testexpr *expr, cpe_lang_oper_t oper)
 Set CPE operation.
bool cpe_testexpr_set_name (struct cpe_testexpr *expr, struct cpe_name *name)
 Set CPE name.
Free functions

Destructors of CVE model structures.

Functions free structures with all members recursively. For simple deletion of entity use remove functions.



void cpe_testexpr_free (struct cpe_testexpr *expr)
 Free function of CPE test expression.

Data Fields

struct xml_metadata xml
cpe_lang_oper_t oper
 operator
union {
   struct oscap_list *   expr
 array of subexpressions for operators
   struct cpe_name *   cpe
 CPE for match operation.
meta
 operation metadata

Detailed Description

CPE language boolean expression.


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

Generated on 26 Feb 2010 for Open SCAP Library by  doxygen 1.6.1