token Class ReferenceCollaboration diagram for token:
[legend]List of all members.
Detailed Description
Definition at line 69 of file token.H.
|
Public Types |
| enum | tokenType {
UNDEFINED,
PUNCTUATION,
WORD,
STRING,
LABEL,
FLOAT_SCALAR,
DOUBLE_SCALAR,
COMPOUND,
ERROR
} |
| | Enumeration defining the types of token. More...
|
| enum | punctuationToken {
NULL_TOKEN = '\0',
SPACE = ' ',
TAB = '\t',
NL = '\n',
END_STATEMENT = ';',
BEGIN_LIST = '(',
END_LIST = ')',
BEGIN_SQR = '[',
END_SQR = ']',
BEGIN_BLOCK = '{',
END_BLOCK = '}',
COLON = ':',
COMMA = ',',
BEGIN_STRING = '"',
END_STRING = '"',
ASSIGN = '=',
ADD = '+',
SUBTRACT = '-',
MULTIPLY = '*',
DIVIDE = '/'
} |
| | Standard punctuation tokens. More...
|
Public Member Functions |
| | token () |
| | Construct null.
|
| | token (const token &) |
| | Construct as copy.
|
| | token (punctuationToken p, label lineNumber=0) |
| | Construct punctuation character token.
|
| | token (const word &w, label lineNumber=0) |
| | Construct word token.
|
| | token (const string &s, label lineNumber=0) |
| | Construct string token.
|
| | token (const label, label lineNumber=0) |
| | Construct label token.
|
| | token (const floatScalar s, label lineNumber=0) |
| | Construct floatScalar token.
|
| | token (const doubleScalar s, label lineNumber=0) |
| | Construct doubleScalar token.
|
| | token (Istream &) |
| | Construct from Istream.
|
| | ~token () |
| tokenType | type () const |
| bool | good () const |
| bool | undefined () const |
| bool | error () const |
| bool | isPunctuation () const |
| punctuationToken | pToken () const |
| bool | isWord () const |
| const word & | wordToken () const |
| bool | isString () const |
| const string & | stringToken () const |
| bool | isLabel () const |
| label | labelToken () const |
| bool | isFloatScalar () const |
| floatScalar | floatScalarToken () const |
| bool | isDoubleScalar () const |
| doubleScalar | doubleScalarToken () const |
| bool | isScalar () const |
| scalar | scalarToken () const |
| bool | isNumber () const |
| scalar | number () const |
| bool | isCompound () const |
| const compound & | compoundToken () const |
| compound & | transferCompoundToken () |
| label | lineNumber () const |
| label & | lineNumber () |
| void | setBad () |
| | Set bad.
|
| InfoProxy< token > | info () const |
| | Return info proxy.
|
| void | operator= (const token &) |
| void | operator= (const punctuationToken) |
| void | operator= (word *) |
| void | operator= (const word &) |
| void | operator= (string *) |
| void | operator= (const string &) |
| void | operator= (const label) |
| void | operator= (const floatScalar) |
| void | operator= (const doubleScalar) |
| void | operator= (compound *) |
| bool | operator== (const token &) const |
| bool | operator== (const punctuationToken) const |
| bool | operator== (const word &) const |
| bool | operator== (const string &) const |
| bool | operator== (const label) const |
| bool | operator== (const floatScalar) const |
| bool | operator== (const doubleScalar) const |
| bool | operator!= (const token &) const |
| bool | operator!= (const punctuationToken) const |
| bool | operator!= (const word &) const |
| bool | operator!= (const string &) const |
| bool | operator!= (const label) const |
| bool | operator!= (const floatScalar) const |
| bool | operator!= (const doubleScalar) const |
Static Public Attributes |
| static token | undefinedToken |
| | Static undefined token.
|
Friends |
| Istream & | operator>> (Istream &, token &) |
| Ostream & | operator<< (Ostream &, const token &) |
| Ostream & | operator<< (Ostream &, const punctuationToken &) |
| ostream & | operator<< (ostream &, const punctuationToken &) |
| ostream & | operator<< (ostream &, const InfoProxy< token > &) |
Classes |
| class | Compound |
| class | compound |
| | Abstract base class for complex tokens. More...
|
Member Enumeration Documentation
Enumeration defining the types of token.
- Enumerator:
-
| UNDEFINED |
|
| PUNCTUATION |
|
| WORD |
|
| STRING |
|
| LABEL |
|
| FLOAT_SCALAR |
|
| DOUBLE_SCALAR |
|
| COMPOUND |
|
| ERROR |
|
Definition at line 75 of file token.H.
Standard punctuation tokens.
- Enumerator:
-
| NULL_TOKEN |
|
| SPACE |
|
| TAB |
|
| NL |
|
| END_STATEMENT |
|
| BEGIN_LIST |
|
| END_LIST |
|
| BEGIN_SQR |
|
| END_SQR |
|
| BEGIN_BLOCK |
|
| END_BLOCK |
|
| COLON |
|
| COMMA |
|
| BEGIN_STRING |
|
| END_STRING |
|
| ASSIGN |
|
| ADD |
|
| SUBTRACT |
|
| MULTIPLY |
|
| DIVIDE |
|
Definition at line 92 of file token.H.
Constructor & Destructor Documentation
Construct null.
Definition at line 71 of file tokenI.H.
Construct as copy.
Definition at line 78 of file tokenI.H.
References token::COMPOUND, token::compoundTokenPtr_, token::DOUBLE_SCALAR, token::doubleScalarToken_, token::ERROR, token::FLOAT_SCALAR, token::floatScalarToken_, token::LABEL, token::labelToken_, token::PUNCTUATION, token::punctuationToken_, token::STRING, token::stringTokenPtr_, token::UNDEFINED, token::WORD, and token::wordTokenPtr_.
Construct punctuation character token.
Definition at line 123 of file tokenI.H.
Construct word token.
Definition at line 131 of file tokenI.H.
Construct string token.
Definition at line 139 of file tokenI.H.
| token |
( |
const |
label, |
|
|
label |
lineNumber = 0 | |
|
) |
| | [inline] |
Construct label token.
Definition at line 147 of file tokenI.H.
Construct floatScalar token.
Definition at line 155 of file tokenI.H.
Construct doubleScalar token.
Definition at line 163 of file tokenI.H.
Member Function Documentation
| bool good |
( |
|
) |
const [inline] |
| bool undefined |
( |
|
) |
const [inline] |
| bool error |
( |
|
) |
const [inline] |
| bool isPunctuation |
( |
|
) |
const [inline] |
| bool isWord |
( |
|
) |
const [inline] |
| const word & wordToken |
( |
|
) |
const [inline] |
| bool isString |
( |
|
) |
const [inline] |
| const string & stringToken |
( |
|
) |
const [inline] |
| bool isLabel |
( |
|
) |
const [inline] |
| label labelToken |
( |
|
) |
const [inline] |
| bool isFloatScalar |
( |
|
) |
const [inline] |
| bool isDoubleScalar |
( |
|
) |
const [inline] |
| bool isScalar |
( |
|
) |
const [inline] |
| scalar scalarToken |
( |
|
) |
const [inline] |
| bool isNumber |
( |
|
) |
const [inline] |
| scalar number |
( |
|
) |
const [inline] |
| bool isCompound |
( |
|
) |
const [inline] |
| label lineNumber |
( |
|
) |
const [inline] |
| label & lineNumber |
( |
|
) |
[inline] |
Return info proxy.
Used to print token information to a stream
Definition at line 365 of file token.H.
| void operator= |
( |
const token & |
|
) |
[inline] |
Definition at line 395 of file tokenI.H.
References token::COMPOUND, token::compoundTokenPtr_, token::DOUBLE_SCALAR, token::doubleScalarToken_, token::ERROR, token::FLOAT_SCALAR, token::floatScalarToken_, token::LABEL, token::labelToken_, token::PUNCTUATION, token::punctuationToken_, token::STRING, token::stringTokenPtr_, token::UNDEFINED, token::WORD, and token::wordTokenPtr_.
| void operator= |
( |
const |
punctuationToken |
) |
[inline] |
| void operator= |
( |
word * |
|
) |
[inline] |
| void operator= |
( |
const word & |
|
) |
[inline] |
| void operator= |
( |
string * |
|
) |
[inline] |
| void operator= |
( |
const string & |
|
) |
[inline] |
| void operator= |
( |
const |
label |
) |
[inline] |
| void operator= |
( |
const |
floatScalar |
) |
[inline] |
| void operator= |
( |
const |
doubleScalar |
) |
[inline] |
| bool operator== |
( |
const token & |
|
) |
const [inline] |
| bool operator== |
( |
const |
punctuationToken |
) |
const [inline] |
| bool operator== |
( |
const word & |
|
) |
const [inline] |
| bool operator== |
( |
const string & |
|
) |
const [inline] |
| bool operator== |
( |
const |
label |
) |
const [inline] |
| bool operator== |
( |
const |
floatScalar |
) |
const [inline] |
| bool operator== |
( |
const |
doubleScalar |
) |
const [inline] |
| bool operator!= |
( |
const token & |
|
) |
const [inline] |
| bool operator!= |
( |
const |
punctuationToken |
) |
const [inline] |
| bool operator!= |
( |
const word & |
|
) |
const [inline] |
| bool operator!= |
( |
const string & |
|
) |
const [inline] |
| bool operator!= |
( |
const |
label |
) |
const [inline] |
| bool operator!= |
( |
const |
floatScalar |
) |
const [inline] |
| bool operator!= |
( |
const |
doubleScalar |
) |
const [inline] |
Friends And Related Function Documentation
| ostream& operator<< |
( |
ostream & |
, |
|
|
const InfoProxy< token > & |
| |
|
) |
| | [friend] |
Member Data Documentation
Static undefined token.
Definition at line 239 of file token.H.
The documentation for this class was generated from the following files:
- src/OpenFOAM/db/IOstreams/token/token.H
- src/OpenFOAM/db/IOstreams/token/tokenI.H
Copyright © 2000-2007 OpenCFD Ltd
|