UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Protected Member Functions | List of all members
SimSel Class Reference

#include <SimSel.hpp>

Inheritance diagram for SimSel:
UssExpr

Public Member Functions

 SimSel ()
 
 SimSel (const UssExpr &ss)
 
 SimSel (const char *szTextRepr)
 
virtual ~SimSel ()
 
SimSeloperator= (const UssExpr &ss)
 
void clean ()
 
bool is_empty () const
 
void select_all ()
 
bool check_select_all () const
 
void add_incl_rule (const char *dname, UssOperator op,...)
 
void add_sort_rule (const char *dname, Compar order)
 
void add_uniq_rule (const char *dname)
 
void add_fetch_rule (const char *dname, UssOperator op)
 
char * to_string () const
 
ErrCode from_string (const char *str)
 
void print_self (FILE *fp=NULL) const
 

Protected Member Functions

void init ()
 

Additional Inherited Members

- Public Attributes inherited from UssExpr
unsigned incl_rules_n
 
UssInclRuleincl_rules
 
unsigned uniq_rules_n
 
UssUniqRuleuniq_rules
 
unsigned sort_rules_n
 
UssSortRulesort_rules
 
unsigned fetch_rules_n
 
UssFetchRulefetch_rules
 

Detailed Description

Simple selection expression engine for records.

Constructor & Destructor Documentation

SimSel::SimSel ( )

Create empty selection expression which means "select nothing". It's possible to add more selection rules futher.

SimSel::SimSel ( const UssExpr ss)

Create copy of the selection expression.

SimSel::SimSel ( const char *  szTextRepr)

Create selection expression from given text representation.

virtual SimSel::~SimSel ( )
virtual

Destroy selection expression.

Member Function Documentation

void SimSel::add_fetch_rule ( const char *  dname,
UssOperator  op 
)

Add fetch rule.

Parameters
dname"DomainName"
opUssMin,UssMax
void SimSel::add_incl_rule ( const char *  dname,
UssOperator  op,
  ... 
)

Add include rule in format: "DomainName", UssOperator, AtomType, Dim, Value

Usage of macro UssInt(x), UssInt8(x), UssReal(x), UssChar(x), UssString(x) is welcome. Dim=0 for scalar (immediate) values. Dim>1 means vector and pointer to the vector must be set in Value field.

Parameters
dname"DomainName"
opOperator
void SimSel::add_sort_rule ( const char *  dname,
Compar  order 
)

Add sort rule.

Parameters
dname"DomainName"
orderASCENT_,DESCENT_
void SimSel::add_uniq_rule ( const char *  dname)

Add unique rule.

Parameters
dname"DomainName"
bool SimSel::check_select_all ( ) const

Check for select all expression.

void SimSel::clean ( )

Remove all selection expressions. The selection will be empty.

ErrCode SimSel::from_string ( const char *  str)

Parse text representation. In case of errors returns an error and leaves the object in the same state.

void SimSel::init ( )
protected

Basic initialization.

bool SimSel::is_empty ( ) const

Check for empty selection (select nothing).

SimSel& SimSel::operator= ( const UssExpr ss)

Copy given selection expression.

void SimSel::print_self ( FILE *  fp = NULL) const

Print simple selection expression in human readable form to given file stream or via wePutMsg(EL_INFO,...) facility.

void SimSel::select_all ( )

Setup select all expression.

char* SimSel::to_string ( ) const

Convert to text representation. String is allocted dynamically by malloc() and can be released by free().


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