![]() |
UNIVERS
15.3
UNIVERS base processing software API
|
#include <SimSel.hpp>
Public Member Functions | |
| SimSel () | |
| SimSel (const UssExpr &ss) | |
| SimSel (const char *szTextRepr) | |
| virtual | ~SimSel () |
| SimSel & | operator= (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 |
| UssInclRule * | incl_rules |
| unsigned | uniq_rules_n |
| UssUniqRule * | uniq_rules |
| unsigned | sort_rules_n |
| UssSortRule * | sort_rules |
| unsigned | fetch_rules_n |
| UssFetchRule * | fetch_rules |
Simple selection expression engine for records.
| 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 |
Destroy selection expression.
| void SimSel::add_fetch_rule | ( | const char * | dname, |
| UssOperator | op | ||
| ) |
Add fetch rule.
| dname | "DomainName" |
| op | UssMin,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.
| dname | "DomainName" |
| op | Operator |
| void SimSel::add_sort_rule | ( | const char * | dname, |
| Compar | order | ||
| ) |
Add sort rule.
| dname | "DomainName" |
| order | ASCENT_,DESCENT_ |
| void SimSel::add_uniq_rule | ( | const char * | dname | ) |
Add unique rule.
| 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.
|
protected |
Basic initialization.
| bool SimSel::is_empty | ( | ) | const |
Check for empty selection (select nothing).
| 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().
1.8.5