FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

A class for handling words, derived from string. More...

#include <OpenFOAM/word.H>


Detailed Description

A class for handling words, derived from string.

A word is a string of characters containing no whitespace and may be constructed from a string by removing whitespace. Words are delimited by whitespace.

Source files

Definition at line 61 of file word.H.

Inheritance diagram for word:
Collaboration diagram for word:

List of all members.

Public Member Functions

 word ()
 Construct null.
 word (const word &)
 Construct as copy.
 word (const char *, const bool doStripInvalid=true)
 Construct as copy of character array.
 word (const char *, const size_type, const bool doStripInvalid)
 Construct as copy with a maximum number of characters.
 word (const string &, const bool doStripInvalid=true)
 Construct as copy of string.
 word (const std::string &, const bool doStripInvalid=true)
 Construct as copy of std::string.
 word (Istream &)
 Construct from Istream.
const word &  operator= (const word &)
const word &  operator= (const string &)
const word &  operator= (const std::string &)
const word &  operator= (const char *)

Static Public Member Functions

static bool  valid (char)
 Is this character valid for a word.

Static Public Attributes

static const char *const  typeName = "word"
static int  debug
static const word  null

Friends

word  operator& (const word &, const word &)
Istream &  operator>> (Istream &, word &)
Ostream &  operator<< (Ostream &, const word &)

Constructor & Destructor Documentation

word (  ) [inline]

Construct null.

Definition at line 61 of file wordI.H.

word ( const word &   w  ) [inline]

Construct as copy.

Definition at line 55 of file wordI.H.

word ( const char *   s,
const bool   doStripInvalid = true  
) [inline]

Construct as copy of character array.

Definition at line 89 of file wordI.H.

word ( const char *   s,
const size_type   n,
const bool   doStripInvalid  
) [inline]

Construct as copy with a maximum number of characters.

Definition at line 100 of file wordI.H.

word ( const string &   s,
const bool   doStripInvalid = true  
) [inline]

Construct as copy of string.

Definition at line 67 of file wordI.H.

word ( const std::string &   s,
const bool   doStripInvalid = true  
) [inline]

Construct as copy of std::string.

Definition at line 78 of file wordI.H.

word ( Istream &   is  )

Construct from Istream.

Definition at line 34 of file wordIO.C.


Member Function Documentation

bool valid ( char   c  ) [inline, static]

Is this character valid for a word.

Definition at line 117 of file wordI.H.

References Foam::isspace().

Referenced by ISstream::read().

const Foam::word & operator= ( const word &   q  ) [inline]

Reimplemented in keyType, and wordRe.

Definition at line 134 of file wordI.H.

Referenced by wordRe::operator=(), and keyType::operator=().

const Foam::word & operator= ( const string &   q  ) [inline]

Reimplemented in keyType, and wordRe.

Definition at line 141 of file wordI.H.

const Foam::word & operator= ( const std::string &   q  ) [inline]

Reimplemented in wordRe.

Definition at line 149 of file wordI.H.

const Foam::word & operator= ( const char *   q  ) [inline]

Reimplemented in keyType, and wordRe.

Definition at line 157 of file wordI.H.


Friends And Related Function Documentation

word operator& ( const word &   ,
const word &    
) [friend]
Istream& operator>> ( Istream &   ,
word &    
) [friend]
Ostream& operator<< ( Ostream &   ,
const word &    
) [friend]

Member Data Documentation

const char *const typeName = "word" [static]

Reimplemented from string.

Definition at line 75 of file word.H.

int debug [static]

Reimplemented from string.

Definition at line 76 of file word.H.

Referenced by wordRe::uncompile().


The documentation for this class was generated from the following files:
  • src/OpenFOAM/primitives/strings/word/word.H
  • src/OpenFOAM/primitives/strings/word/word.C
  • src/OpenFOAM/primitives/strings/word/wordI.H
  • src/OpenFOAM/primitives/strings/word/wordIO.C