token Class Reference

A token holds an item read from Istream. More...

Collaboration diagram for token:
[legend]

Classes

class  Compound
 A templated class for holding compound tokens. More...
 
class  compound
 Abstract base class for complex tokens. More...
 

Public Types

enum  tokenType {
  UNDEFINED = 0, FLAG, PUNCTUATION, BOOL,
  LABEL, FLOAT_SCALAR, DOUBLE_SCALAR, WORD,
  STRING, VARIABLE, VERBATIMSTRING, COMPOUND,
  ERROR
}
 Enumeration defining the types of token. More...
 
enum  flagType { NO_FLAG = 0, ASCII = 1, BINARY = 2 }
 Stream or output control flags (1-byte width) More...
 
enum  punctuationToken : char {
  NULL_TOKEN = '\0', SPACE = ' ', TAB = '\t', NL = '\n',
  END_STATEMENT = ';', BEGIN_LIST = '(', END_LIST = ')', BEGIN_SQR = '[',
  END_SQR = ']', BEGIN_BLOCK = '{', END_BLOCK = '}', COLON = ':',
  COMMA = ',', HASH = '#', DOLLAR = '$', ATSYM = '@',
  SQUOTE = '\'', DQUOTE = '"', ASSIGN = '=', ADD = '+',
  SUBTRACT = '-', MULTIPLY = '*', DIVIDE = '/', BEGIN_STRING = DQUOTE,
  END_STRING = DQUOTE
}
 Standard punctuation tokens (a character) More...
 

Public Member Functions

constexpr token () noexcept
 Construct null, initialized to an UNDEFINED token. More...
 
 token (const token &t)
 Copy construct. More...
 
 token (token &&t)
 Move construct. The original token is left as UNDEFINED. More...
 
 token (punctuationToken p, label lineNumber=0)
 Construct punctuation character token. More...
 
 token (const label val, label lineNumber=0)
 Construct label token. More...
 
 token (const floatScalar val, label lineNumber=0)
 Construct float token. More...
 
 token (const doubleScalar val, label lineNumber=0)
 Construct double token. More...
 
 token (const word &w, label lineNumber=0)
 Copy construct word token. More...
 
 token (const string &str, label lineNumber=0)
 Copy construct string token. More...
 
 token (word &&w, label lineNumber=0)
 Move construct word token. More...
 
 token (string &&str, label lineNumber=0)
 Move construct string token. More...
 
 token (Istream &is)
 Construct from Istream. More...
 
 ~token ()
 Destructor. More...
 
word name () const
 Return the name of the token type. More...
 
tokenType type () const
 Return the token type. More...
 
bool setType (const tokenType variant)
 Change the token type, for similar types. More...
 
label lineNumber () const
 The line number for the token. More...
 
labellineNumber ()
 The line number for the token. More...
 
bool good () const
 True if token is not UNDEFINED or ERROR. More...
 
bool undefined () const
 Token is UNDEFINED. More...
 
bool error () const
 Token is ERROR. More...
 
bool isBool () const
 Token is BOOL. More...
 
bool isFlag () const
 Token is FLAG. More...
 
bool isPunctuation () const
 Token is PUNCTUATION. More...
 
bool isSeparator () const
 Token is PUNCTUATION and isseparator. More...
 
bool isLabel () const
 Token is LABEL. More...
 
bool isFloatScalar () const
 Token is FLOAT_SCALAR. More...
 
bool isDoubleScalar () const
 Token is DOUBLE_SCALAR. More...
 
bool isScalar () const
 Token is FLOAT_SCALAR or DOUBLE_SCALAR. More...
 
bool isNumber () const
 Token is LABEL, FLOAT_SCALAR or DOUBLE_SCALAR. More...
 
bool isWord () const
 Token is WORD. More...
 
bool isString () const
 Token is STRING, VARIABLE or VERBATIM string. More...
 
bool isVariable () const
 Token is VARIABLE. More...
 
bool isVerbatim () const
 Token is VERBATIM string. More...
 
bool isStringType () const
 Token is WORD, STRING, VARIABLE or VERBATIM. More...
 
bool isCompound () const
 Token is COMPOUND. More...
 
bool boolToken () const
 Return boolean token value. More...
 
int flagToken () const
 Return flag bitmask value. More...
 
punctuationToken pToken () const
 Return punctuation character. More...
 
label labelToken () const
 Return label value. More...
 
floatScalar floatScalarToken () const
 Return float value. More...
 
doubleScalar doubleScalarToken () const
 Return double value. More...
 
scalar scalarToken () const
 Return float or double value. More...
 
scalar number () const
 Return label, float or double value. More...
 
const wordwordToken () const
 Return const reference to the word contents. More...
 
const stringstringToken () const
 Return const reference to the string contents. More...
 
const compoundcompoundToken () const
 Read access for compound token. More...
 
compoundtransferCompoundToken (const Istream &is)
 
void reset ()
 Reset token to UNDEFINED and clear any allocated storage. More...
 
void setBad ()
 Clear token and set to be ERROR. More...
 
void swap (token &tok)
 Swap token contents: type, data, line-number. More...
 
InfoProxy< tokeninfo () const
 Return info proxy for printing token information to a stream. More...
 
void operator= (const token &tok)
 Copy assign. More...
 
void operator= (token &&tok)
 Move assign. More...
 
void operator= (const punctuationToken p)
 Copy assign from punctuation. More...
 
void operator= (const label val)
 Copy assign from label. More...
 
void operator= (const floatScalar val)
 Copy assign from float. More...
 
void operator= (const doubleScalar val)
 Copy assign from double. More...
 
void operator= (const word &w)
 Copy assign from word. More...
 
void operator= (const string &str)
 Copy assign from string. More...
 
void operator= (word &&w)
 Move assign from word. More...
 
void operator= (string &&str)
 Move assign from string. More...
 
void operator= (compound *compoundPtr)
 Assign compound with reference counting to token. More...
 
bool operator== (const token &tok) const
 
bool operator== (const punctuationToken p) const
 
bool operator== (const label val) const
 
bool operator== (const floatScalar val) const
 
bool operator== (const doubleScalar val) const
 
bool operator== (const std::string &s) const
 
bool operator!= (const token &tok) const
 
bool operator!= (const punctuationToken p) const
 
bool operator!= (const label val) const
 
bool operator!= (const floatScalar val) const
 
bool operator!= (const doubleScalar val) const
 
bool operator!= (const std::string &s) const
 
void operator= (word *)=delete
 Deprecated(2017-11) transfer word pointer to the token. More...
 
void operator= (string *)=delete
 Deprecated(2017-11) transfer string pointer to the token. More...
 

Static Public Member Functions

static token boolean (bool on)
 Create a bool token. More...
 
static token flag (int bitmask)
 Create a token with stream flags, no sanity check. More...
 
static bool isseparator (int c)
 True if the character is a punctuation separator (eg, in ISstream). More...
 

Static Public Attributes

static const token undefinedToken
 An undefined token. More...
 
static constexpr const char *const typeName = "token"
 The type name is "token". More...
 

Friends

Ostreamoperator<< (Ostream &os, const token &tok)
 
Ostreamoperator<< (Ostream &os, const punctuationToken &pt)
 
ostream & operator<< (ostream &os, const punctuationToken &pt)
 
ostream & operator<< (ostream &os, const InfoProxy< token > &ct)
 

Detailed Description

A token holds an item read from Istream.

Source files

Definition at line 69 of file token.H.

Member Enumeration Documentation

◆ tokenType

enum tokenType

Enumeration defining the types of token.

Since these values are also used to tag content in Pstream, the maximum number of types is limited to 30.

Enumerator
UNDEFINED 

An undefined token-type.

FLAG 

stream flag (1-byte bitmask)

PUNCTUATION 

single character punctuation

BOOL 

boolean type

LABEL 

label (integer) type

FLOAT_SCALAR 

float (single-precision) type

DOUBLE_SCALAR 

double (double-precision) type

WORD 

A Foam::word.

STRING 

A string.

VARIABLE 

A dictionary $variable (string variant)

VERBATIMSTRING 

Verbatim string content.

COMPOUND 

Compound type such as List<label> etc.

ERROR 

A token error encountered.

Definition at line 76 of file token.H.

◆ flagType

enum flagType

Stream or output control flags (1-byte width)

Enumerator
NO_FLAG 

No flags.

ASCII 

ASCII-mode stream.

BINARY 

BINARY-mode stream.

Definition at line 100 of file token.H.

◆ punctuationToken

enum punctuationToken : char

Standard punctuation tokens (a character)

Enumerator
NULL_TOKEN 

Nul character.

SPACE 

Space [isspace].

TAB 

Tab [isspace].

NL 

Newline [isspace].

END_STATEMENT 

End entry [isseparator].

BEGIN_LIST 

Begin list [isseparator].

END_LIST 

End list [isseparator].

BEGIN_SQR 

Begin dimensions [isseparator].

END_SQR 

End dimensions [isseparator].

BEGIN_BLOCK 

Begin block [isseparator].

END_BLOCK 

End block [isseparator].

COLON 

Colon [isseparator].

COMMA 

Comma [isseparator].

HASH 

Hash - directive or verbatim string.

DOLLAR 

Dollar - start variable.

ATSYM 

At.

SQUOTE 

Single quote.

DQUOTE 

Double quote.

ASSIGN 

Assignment/equals [isseparator].

ADD 

Addition [isseparator].

SUBTRACT 

Subtract or start of negative number.

MULTIPLY 

Multiply [isseparator].

DIVIDE 

Divide [isseparator].

BEGIN_STRING 

Begin string with double quote.

END_STRING 

End string with double quote.

Definition at line 109 of file token.H.

Constructor & Destructor Documentation

◆ token() [1/12]

constexpr token ( )
inlineconstexprnoexcept

Construct null, initialized to an UNDEFINED token.

Definition at line 95 of file tokenI.H.

◆ token() [2/12]

token ( const token t)
inline

Copy construct.

Definition at line 103 of file tokenI.H.

◆ token() [3/12]

token ( token &&  t)
inline

Move construct. The original token is left as UNDEFINED.

Definition at line 142 of file tokenI.H.

◆ token() [4/12]

token ( punctuationToken  p,
label  lineNumber = 0 
)
inlineexplicit

Construct punctuation character token.

Definition at line 153 of file tokenI.H.

References p.

◆ token() [5/12]

token ( const label  val,
label  lineNumber = 0 
)
inlineexplicit

Construct label token.

Definition at line 163 of file tokenI.H.

References Foam::val.

◆ token() [6/12]

token ( const floatScalar  val,
label  lineNumber = 0 
)
inlineexplicit

Construct float token.

Definition at line 173 of file tokenI.H.

References Foam::val.

◆ token() [7/12]

token ( const doubleScalar  val,
label  lineNumber = 0 
)
inlineexplicit

Construct double token.

Definition at line 183 of file tokenI.H.

References Foam::val.

◆ token() [8/12]

token ( const word w,
label  lineNumber = 0 
)
inlineexplicit

Copy construct word token.

Definition at line 193 of file tokenI.H.

◆ token() [9/12]

token ( const string str,
label  lineNumber = 0 
)
inlineexplicit

Copy construct string token.

Definition at line 203 of file tokenI.H.

◆ token() [10/12]

token ( word &&  w,
label  lineNumber = 0 
)
inlineexplicit

Move construct word token.

Definition at line 213 of file tokenI.H.

◆ token() [11/12]

token ( string &&  str,
label  lineNumber = 0 
)
inlineexplicit

Move construct string token.

Definition at line 223 of file tokenI.H.

◆ token() [12/12]

token ( Istream is)
explicit

Construct from Istream.

Definition at line 116 of file tokenIO.C.

References Istream::read().

Here is the call graph for this function:

◆ ~token()

~token ( )
inline

Destructor.

Definition at line 235 of file tokenI.H.

Member Function Documentation

◆ boolean()

Foam::token boolean ( bool  on)
inlinestatic

Create a bool token.

Definition at line 33 of file tokenI.H.

◆ flag()

Foam::token flag ( int  bitmask)
inlinestatic

Create a token with stream flags, no sanity check.

Parameters
bitmaskthe flags to set

Definition at line 43 of file tokenI.H.

◆ isseparator()

bool isseparator ( int  c)
inlinestatic

True if the character is a punctuation separator (eg, in ISstream).

Since it could also start a number, SUBTRACT is not included as a separator.

Parameters
cthe character to test, passed as int for consistency with isdigit, isspace etc.

Definition at line 53 of file tokenI.H.

References token::ADD, token::ASSIGN, token::BEGIN_BLOCK, token::BEGIN_LIST, token::BEGIN_SQR, Foam::constant::universal::c, token::COLON, token::COMMA, token::DIVIDE, token::END_BLOCK, token::END_LIST, token::END_SQR, token::END_STATEMENT, and token::MULTIPLY.

◆ name()

Foam::word name ( ) const

Return the name of the token type.

Definition at line 126 of file tokenIO.C.

◆ type()

Foam::token::tokenType type ( ) const
inline

Return the token type.

Definition at line 295 of file tokenI.H.

Referenced by ifeqEntry::equalToken(), Foam::exprTools::getList(), Foam::printTokenInfo(), prefixOSstream::write(), OSstream::write(), and UOPstream::write().

Here is the caller graph for this function:

◆ setType()

bool setType ( const tokenType  variant)
inline

Change the token type, for similar types.

This can be used to change between string-like variants (eg, STRING, VARIABLE, etc) To change types entirely (eg, STRING to DOUBLE_SCALAR), use the corresponding assignment operator.

Returns
true if the change was successful or no change was required

Definition at line 301 of file tokenI.H.

Referenced by ISstream::read(), and UIPstream::read().

Here is the caller graph for this function:

◆ lineNumber() [1/2]

Foam::label lineNumber ( ) const
inline

The line number for the token.

Definition at line 356 of file tokenI.H.

Referenced by ifeqEntry::expand(), Foam::printTokenInfo(), ISstream::read(), UIPstream::read(), and ITstream::read().

Here is the caller graph for this function:

◆ lineNumber() [2/2]

Foam::label & lineNumber ( )
inline

The line number for the token.

Definition at line 362 of file tokenI.H.

◆ good()

bool good ( ) const
inline

True if token is not UNDEFINED or ERROR.

Definition at line 368 of file tokenI.H.

Referenced by Foam::getToken(), Foam::operator>>(), primitiveEntry::read(), ifeqEntry::readToken(), and OTstream::write().

Here is the caller graph for this function:

◆ undefined()

bool undefined ( ) const
inline

Token is UNDEFINED.

Definition at line 374 of file tokenI.H.

◆ error()

bool error ( ) const
inline

Token is ERROR.

Definition at line 380 of file tokenI.H.

Referenced by dictionaryListEntry::dictionaryListEntry().

Here is the caller graph for this function:

◆ isBool()

bool isBool ( ) const
inline

Token is BOOL.

Definition at line 386 of file tokenI.H.

◆ isFlag()

bool isFlag ( ) const
inline

Token is FLAG.

Definition at line 404 of file tokenI.H.

Referenced by UIPstream::read().

Here is the caller graph for this function:

◆ isPunctuation()

◆ isSeparator()

bool isSeparator ( ) const
inline

Token is PUNCTUATION and isseparator.

Definition at line 440 of file tokenI.H.

◆ isLabel()

◆ isFloatScalar()

bool isFloatScalar ( ) const
inline

Token is FLOAT_SCALAR.

Definition at line 468 of file tokenI.H.

◆ isDoubleScalar()

bool isDoubleScalar ( ) const
inline

Token is DOUBLE_SCALAR.

Definition at line 486 of file tokenI.H.

◆ isScalar()

bool isScalar ( ) const
inline

Token is FLOAT_SCALAR or DOUBLE_SCALAR.

Definition at line 504 of file tokenI.H.

Referenced by ifeqEntry::equalToken().

Here is the caller graph for this function:

◆ isNumber()

bool isNumber ( ) const
inline

Token is LABEL, FLOAT_SCALAR or DOUBLE_SCALAR.

Definition at line 530 of file tokenI.H.

Referenced by CrankNicolsonDdtScheme< Type >::CrankNicolsonDdtScheme(), seriesWriter::load(), Foam::operator>>(), dimensionSet::read(), and Reaction< ReactionThermo >::specieCoeffs::specieCoeffs().

Here is the caller graph for this function:

◆ isWord()

◆ isString()

bool isString ( ) const
inline

Token is STRING, VARIABLE or VERBATIM string.

Definition at line 570 of file tokenI.H.

Referenced by ifeqEntry::equalToken(), ifeqEntry::expand(), Foam::exprTools::getList(), seriesWriter::load(), and Foam::operator>>().

Here is the caller graph for this function:

◆ isVariable()

bool isVariable ( ) const
inline

Token is VARIABLE.

Definition at line 581 of file tokenI.H.

Referenced by ifeqEntry::expand().

Here is the caller graph for this function:

◆ isVerbatim()

bool isVerbatim ( ) const
inline

Token is VERBATIM string.

Definition at line 587 of file tokenI.H.

◆ isStringType()

bool isStringType ( ) const
inline

Token is WORD, STRING, VARIABLE or VERBATIM.

Definition at line 593 of file tokenI.H.

Referenced by Foam::operator>>(), and functionEntry::readStringList().

Here is the caller graph for this function:

◆ isCompound()

bool isCompound ( ) const
inline

Token is COMPOUND.

Definition at line 621 of file tokenI.H.

Referenced by genericFaPatchField< Type >::genericFaPatchField(), genericFvPatchField< Type >::genericFvPatchField(), genericFvsPatchField< Type >::genericFvsPatchField(), and genericPointPatchField< Type >::genericPointPatchField().

Here is the caller graph for this function:

◆ boolToken()

bool boolToken ( ) const
inline

Return boolean token value.

Report FatalIOError and return false if token is not BOOL or LABEL

Definition at line 392 of file tokenI.H.

Referenced by ifeqEntry::equalToken(), and Foam::printTokenInfo().

Here is the caller graph for this function:

◆ flagToken()

int flagToken ( ) const
inline

Return flag bitmask value.

Report FatalIOError and return NO_FLAG if token is not FLAG

Definition at line 410 of file tokenI.H.

Referenced by ifeqEntry::equalToken(), Foam::printTokenInfo(), UIPstream::read(), and UOPstream::write().

Here is the caller graph for this function:

◆ pToken()

Foam::token::punctuationToken pToken ( ) const
inline

Return punctuation character.

Report FatalIOError and return \0 if token is not PUNCTUATION

Definition at line 428 of file tokenI.H.

Referenced by blockDescriptor::blockDescriptor(), dictionaryListEntry::dictionaryListEntry(), ifeqEntry::equalToken(), Foam::exprTools::getList(), Foam::getValueToken(), seriesWriter::load(), blockVertex::New(), entry::New(), Foam::operator>>(), Foam::printTokenInfo(), Foam::blockMeshTools::read(), primitiveEntry::read(), PackedList< 2 >::read(), Istream::readBeginList(), IOPosition< CloudType >::readData(), Istream::readEndList(), and PtrList< transferModel >::readIstream().

Here is the caller graph for this function:

◆ labelToken()

◆ floatScalarToken()

Foam::floatScalar floatScalarToken ( ) const
inline

Return float value.

Report FatalIOError and return 0 if token is not FLOAT_SCALAR

Definition at line 474 of file tokenI.H.

Referenced by ifeqEntry::equalToken(), and Foam::printTokenInfo().

Here is the caller graph for this function:

◆ doubleScalarToken()

Foam::doubleScalar doubleScalarToken ( ) const
inline

Return double value.

Report FatalIOError and return 0 if token is not DOUBLE_SCALAR

Definition at line 492 of file tokenI.H.

Referenced by ifeqEntry::equalToken(), and Foam::printTokenInfo().

Here is the caller graph for this function:

◆ scalarToken()

Foam::scalar scalarToken ( ) const
inline

Return float or double value.

Report FatalIOError and return 0 if token is not a FLOAT_SCALAR or DOUBLE_SCALAR

Definition at line 514 of file tokenI.H.

Referenced by ifeqEntry::equalToken().

Here is the caller graph for this function:

◆ number()

Foam::scalar number ( ) const
inline

Return label, float or double value.

Report FatalIOError and return 0 if token is not a LABEL, FLOAT_SCALAR or DOUBLE_SCALAR

Definition at line 536 of file tokenI.H.

Referenced by CrankNicolsonDdtScheme< Type >::CrankNicolsonDdtScheme(), genericFaPatchField< Type >::genericFaPatchField(), genericFvPatchField< Type >::genericFvPatchField(), genericFvsPatchField< Type >::genericFvsPatchField(), seriesWriter::load(), Foam::operator>>(), dimensionSet::read(), and Reaction< ReactionThermo >::specieCoeffs::specieCoeffs().

Here is the caller graph for this function:

◆ wordToken()

◆ stringToken()

const Foam::string & stringToken ( ) const
inline

Return const reference to the string contents.

Report FatalIOError and return "" if token is not a STRING, VARIABLE, VERBATIM or an upcast WORD

Definition at line 599 of file tokenI.H.

References string::null.

Referenced by ifeqEntry::equalToken(), ifeqEntry::expand(), Foam::exprTools::getList(), seriesWriter::load(), Foam::operator>>(), Foam::printTokenInfo(), prefixOSstream::write(), OSstream::write(), functionEntry::write(), and UOPstream::write().

Here is the caller graph for this function:

◆ compoundToken()

const Foam::token::compound & compoundToken ( ) const
inline

Read access for compound token.

Definition at line 627 of file tokenI.H.

Referenced by genericFaPatchField< Type >::genericFaPatchField(), genericFvPatchField< Type >::genericFvPatchField(), genericFvsPatchField< Type >::genericFvsPatchField(), genericPointPatchField< Type >::genericPointPatchField(), and Foam::printTokenInfo().

Here is the caller graph for this function:

◆ transferCompoundToken()

Foam::token::compound & transferCompoundToken ( const Istream is)

Return reference to compound token and decrease its internal refCound accordingly.

The Istream is used for reference error messages only.

Definition at line 90 of file token.C.

References Foam::abort(), Foam::FatalIOError, and FatalIOErrorInFunction.

Referenced by genericFaPatchField< Type >::genericFaPatchField(), genericFvPatchField< Type >::genericFvPatchField(), genericFvsPatchField< Type >::genericFvsPatchField(), and genericPointPatchField< Type >::genericPointPatchField().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ reset()

void reset ( )
inline

Reset token to UNDEFINED and clear any allocated storage.

Definition at line 243 of file tokenI.H.

Referenced by Foam::operator>>(), Istream::peekBack(), and ITstream::read().

Here is the caller graph for this function:

◆ setBad()

void setBad ( )
inline

Clear token and set to be ERROR.

Definition at line 639 of file tokenI.H.

Referenced by ISstream::read(), and UIPstream::read().

Here is the caller graph for this function:

◆ swap()

void swap ( token tok)
inline

Swap token contents: type, data, line-number.

Definition at line 282 of file tokenI.H.

◆ info()

◆ operator=() [1/13]

void operator= ( const token tok)
inline

Copy assign.

Definition at line 648 of file tokenI.H.

◆ operator=() [2/13]

void operator= ( token &&  tok)
inline

Move assign.

Definition at line 694 of file tokenI.H.

◆ operator=() [3/13]

void operator= ( const punctuationToken  p)
inline

Copy assign from punctuation.

Definition at line 707 of file tokenI.H.

References p.

◆ operator=() [4/13]

void operator= ( const label  val)
inline

Copy assign from label.

Definition at line 715 of file tokenI.H.

References Foam::val.

◆ operator=() [5/13]

void operator= ( const floatScalar  val)
inline

Copy assign from float.

Definition at line 723 of file tokenI.H.

References Foam::val.

◆ operator=() [6/13]

void operator= ( const doubleScalar  val)
inline

Copy assign from double.

Definition at line 731 of file tokenI.H.

References Foam::val.

◆ operator=() [7/13]

void operator= ( const word w)
inline

Copy assign from word.

Definition at line 739 of file tokenI.H.

◆ operator=() [8/13]

void operator= ( const string str)
inline

Copy assign from string.

Definition at line 747 of file tokenI.H.

◆ operator=() [9/13]

void operator= ( word &&  w)
inline

Move assign from word.

Definition at line 755 of file tokenI.H.

◆ operator=() [10/13]

void operator= ( string &&  str)
inline

Move assign from string.

Definition at line 763 of file tokenI.H.

References s.

◆ operator=() [11/13]

void operator= ( compound compoundPtr)
inline

Assign compound with reference counting to token.

Definition at line 771 of file tokenI.H.

◆ operator==() [1/6]

bool operator== ( const token tok) const
inline

Definition at line 779 of file tokenI.H.

References Foam::equal().

Here is the call graph for this function:

◆ operator==() [2/6]

bool operator== ( const punctuationToken  p) const
inline

Definition at line 828 of file tokenI.H.

References p.

◆ operator==() [3/6]

bool operator== ( const label  val) const
inline

Definition at line 845 of file tokenI.H.

References Foam::val.

◆ operator==() [4/6]

bool operator== ( const floatScalar  val) const
inline

Definition at line 855 of file tokenI.H.

References Foam::equal(), and Foam::val.

Here is the call graph for this function:

◆ operator==() [5/6]

bool operator== ( const doubleScalar  val) const
inline

Definition at line 865 of file tokenI.H.

References Foam::equal(), and Foam::val.

Here is the call graph for this function:

◆ operator==() [6/6]

bool operator== ( const std::string &  s) const
inline

Definition at line 834 of file tokenI.H.

References s.

◆ operator!=() [1/6]

bool operator!= ( const token tok) const
inline

Definition at line 875 of file tokenI.H.

References Foam::operator==().

Here is the call graph for this function:

◆ operator!=() [2/6]

bool operator!= ( const punctuationToken  p) const
inline

Definition at line 881 of file tokenI.H.

References Foam::operator==(), and p.

Here is the call graph for this function:

◆ operator!=() [3/6]

bool operator!= ( const label  val) const
inline

Definition at line 887 of file tokenI.H.

References Foam::operator==(), and Foam::val.

Here is the call graph for this function:

◆ operator!=() [4/6]

bool operator!= ( const floatScalar  val) const
inline

Definition at line 893 of file tokenI.H.

References Foam::operator==(), and Foam::val.

Here is the call graph for this function:

◆ operator!=() [5/6]

bool operator!= ( const doubleScalar  val) const
inline

Definition at line 899 of file tokenI.H.

References Foam::operator==(), and Foam::val.

Here is the call graph for this function:

◆ operator!=() [6/6]

bool operator!= ( const std::string &  s) const
inline

Definition at line 905 of file tokenI.H.

References Foam::operator==(), and s.

Here is the call graph for this function:

◆ operator=() [12/13]

void operator= ( word )
delete

Deprecated(2017-11) transfer word pointer to the token.

Deprecated:
(2017-11) - use move assign from word

◆ operator=() [13/13]

void operator= ( string )
delete

Deprecated(2017-11) transfer string pointer to the token.

Deprecated:
(2017-11) - use move assign from string

Friends And Related Function Documentation

◆ operator<< [1/4]

Ostream& operator<< ( Ostream os,
const token tok 
)
friend

◆ operator<< [2/4]

Ostream& operator<< ( Ostream os,
const punctuationToken pt 
)
friend

◆ operator<< [3/4]

ostream& operator<< ( ostream &  os,
const punctuationToken pt 
)
friend

◆ operator<< [4/4]

ostream& operator<< ( ostream &  os,
const InfoProxy< token > &  ct 
)
friend

Member Data Documentation

◆ undefinedToken

const Foam::token undefinedToken
static

An undefined token.

Definition at line 247 of file token.H.

◆ typeName

constexpr const char* const typeName = "token"
staticconstexpr

The type name is "token".

Definition at line 299 of file token.H.


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