Abstract base class for complex tokens. More...
Public Member Functions | |
TypeNameNoDebug ("compound") | |
Declare type-name, virtual type (without debug switch) More... | |
declareRunTimeSelectionTable (autoPtr, compound, empty,(),()) | |
Declare run-time constructor selection table. More... | |
constexpr | compound () noexcept |
Default construct. More... | |
virtual | ~compound () noexcept=default |
Destructor. More... | |
template<class Type > | |
const Type * | isA () const |
Attempt dynamic_cast to Type returns nullptr if cast is not possible. More... | |
bool | moved () const noexcept |
Get compound transferred status. More... | |
void | moved (bool b) noexcept |
Set compound transferred status. More... | |
bool | pending () const noexcept |
Get compound pending-read status. More... | |
void | pending (bool b) noexcept |
Set compound pending-read status. More... | |
virtual label | size () const =0 |
The size of the underlying content. More... | |
virtual void | resize (const label n)=0 |
Change the size of the underlying container content. More... | |
virtual void | fill_zero ()=0 |
Fill with zero values, or with default constructed. More... | |
virtual void | read (Istream &is)=0 |
Read from stream into the underlying content. More... | |
virtual void | write (Ostream &os) const =0 |
Write the underlying content. More... | |
virtual tokenType | typeCode () const =0 |
The token type (if any) corresponding to the contained component type (LABEL, FLOAT, DOUBLE, etc). More... | |
virtual direction | nComponents () const =0 |
The number of vector-space or other components of the underlying data content. More... | |
virtual direction | rank () const =0 |
The vector-space rank associated with the data content. More... | |
virtual const char * | cdata_bytes () const =0 |
Pointer to the underlying data as byte data. More... | |
virtual char * | data_bytes ()=0 |
Pointer to the underlying data as byte data. More... | |
virtual std::streamsize | size_bytes () const =0 |
Size of the (contiguous) byte data. More... | |
Public Member Functions inherited from refCount | |
constexpr | refCount () noexcept |
Default construct, initializing count to 0. More... | |
int | use_count () const noexcept |
Return the current reference count. More... | |
bool | unique () const noexcept |
Return true if the reference count is zero. More... | |
void | operator++ () noexcept |
Increment the reference count. More... | |
void | operator++ (int) noexcept |
Increment the reference count. More... | |
void | operator-- () noexcept |
Decrement the reference count. More... | |
void | operator-- (int) noexcept |
Decrement the reference count. More... | |
Static Public Member Functions | |
static autoPtr< compound > | New (const word &compoundType) |
Default construct specified compound type. More... | |
static autoPtr< compound > | New (const word &compoundType, Istream &is, const bool readContent=true) |
Default construct specified compound type and read from stream. More... | |
static bool | isCompound (const word &compoundType) |
True if a known (registered) compound type. More... | |
Protected Attributes | |
unsigned char | state_ |
The compound token state, internally used values only. More... | |
Friends | |
Ostream & | operator<< (Ostream &os, const compound &ct) |
Output operator. More... | |
|
virtualdefaultnoexcept |
Destructor.
TypeNameNoDebug | ( | "compound" | ) |
Declare type-name, virtual type (without debug switch)
Declare run-time constructor selection table.
|
static |
Default construct specified compound type.
Definition at line 52 of file token.C.
References Foam::abort(), Foam::FatalError, and FatalErrorInLookup.
|
static |
Default construct specified compound type and read from stream.
Definition at line 73 of file token.C.
References Foam::abort(), Foam::FatalIOError, FatalIOErrorInLookup, and token::compound::read().
|
inline |
|
static |
True if a known (registered) compound type.
Definition at line 104 of file token.C.
Referenced by UIPstreamBase::read(), and ISstream::read().
|
inlinenoexcept |
Get compound transferred status.
Definition at line 265 of file token.H.
References token::compound::state_.
Referenced by Foam::printTokenInfo().
|
inlinenoexcept |
Set compound transferred status.
Definition at line 270 of file token.H.
References Foam::constant::physicoChemical::b, and token::compound::state_.
|
inlinenoexcept |
Get compound pending-read status.
Definition at line 278 of file token.H.
References token::compound::state_.
Referenced by Foam::operator<<(), and Foam::printTokenInfo().
|
inlinenoexcept |
Set compound pending-read status.
Definition at line 283 of file token.H.
References Foam::constant::physicoChemical::b, and token::compound::state_.
|
pure virtual |
The size of the underlying content.
Implemented in token::Compound< T >.
|
pure virtual |
Change the size of the underlying container content.
Implemented in token::Compound< T >.
|
pure virtual |
Fill with zero values, or with default constructed.
Implemented in token::Compound< T >.
|
pure virtual |
Read from stream into the underlying content.
Implemented in token::Compound< T >.
Referenced by token::compound::New(), and token::readCompoundToken().
|
pure virtual |
Write the underlying content.
Implemented in token::Compound< T >.
Referenced by Foam::operator<<().
|
pure virtual |
The token type (if any) corresponding to the contained component type (LABEL, FLOAT, DOUBLE, etc).
Implemented in token::Compound< T >.
|
pure virtual |
The number of vector-space or other components of the underlying data content.
Implemented in token::Compound< T >.
|
pure virtual |
The vector-space rank associated with the data content.
Implemented in token::Compound< T >.
|
pure virtual |
Pointer to the underlying data as byte data.
Implemented in token::Compound< T >.
|
pure virtual |
Pointer to the underlying data as byte data.
Implemented in token::Compound< T >.
|
pure virtual |
Size of the (contiguous) byte data.
Implemented in token::Compound< T >.
|
protected |
The compound token state, internally used values only.
(0: initial, 1: moved, 2: pending read...)
Definition at line 187 of file token.H.
Referenced by token::compound::moved(), token::compound::pending(), and token::Compound< T >::read().