ZUtil_TBSpec Namespace Reference


Functions

bool sFromStrim (const ZStrimU &iStrimU, ZTBSpec &oTBSpec)
 Reads the text representation of a ZTBSpec from iStrimU, placing the result in oTBSpec.


Detailed Description

ZUtil_TBSpec holds functions that operate on and with ZTBSpec instances, but which should not be part of ZTBSpec itself because they would then create spurious dependencies.


Function Documentation

bool ZUtil_TBSpec::sFromStrim ( const ZStrimU iStrimU,
ZTBSpec oTBSpec 
)

Reads the text representation of a ZTBSpec from iStrimU, placing the result in oTBSpec.

Returns:
true if a valid ZTBSpec was found.

false if no ZTBSpec could be read, for example if the strim contains no text.

Exceptions:
ZUtil_Strim::ParseException if some text was read, but was syntactically invalid.
The syntax is very simple. An expression consists of criteria conjoined by infix '&' and '|' operators, precedence can be controlled by use of parentheses.
// Optional whitespace
ows = { whitespace, or C/C++ comment, as consumed by ZUtil_Strim::sSkip_WSAndCPlusPlusComments }

spec = intersection
spec = intersection ows '|' ows spec

intersection = criterion
intersection = criterion ows '&' ows intersection

criterion = '(' ows spec ows ')'
criterion = propertyName ows rel ows tupleValue

// A propertyName is a string wrapped in single or double quotes, or a
// string consumed by ZUtil_Tuple::sRead_Identifier.
propertyName = '"' [anyChar]* '"'
propertyName = '\'\ [anyChar]* '\''
propertyName = ['_' a-z A-Z 0-9]+

rel = '=='
rel = '<'
rel = '>'
rel = '<='
rel = '>='

tupleValue = { the syntax used by ZUtil_Tuple }


Generated on Thu Jul 26 11:22:09 2007 for ZooLib by  doxygen 1.4.7