Abstract base class for complex tokens. More...
#include <token.H>


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

|
virtualdefaultnoexcept |
Destructor.
References compound(), New(), and Foam::noexcept.

| TypeNameNoDebug | ( | "compound" | ) |
Declare type-name, virtual type (without debug switch).
Declare run-time constructor selection table.
References compound().

|
static |
Default construct specified compound type.
Definition at line 51 of file token.C.
References Foam::abort(), Foam::FatalError, and FatalErrorInLookup.
Referenced by ~compound().


|
static |
Default construct specified compound type and read from stream.
Definition at line 72 of file token.C.
References Foam::abort(), Foam::FatalIOError, and FatalIOErrorInLookup.

|
inline |
|
static |
True if a known (registered) compound type.
Definition at line 104 of file token.C.
Referenced by ISstream::read(), UIPstreamBase::read(), FixedList< T, N >::writeEntry(), and UList< T >::writeEntry().

|
inlinenoexcept |
Get compound transferred status.
Definition at line 278 of file token.H.
References Foam::noexcept, and state_.
Referenced by Foam::printTokenInfo().

|
inlinenoexcept |
|
inlinenoexcept |
Get compound pending-read status.
Definition at line 291 of file token.H.
References Foam::noexcept, and state_.
Referenced by Foam::operator<<(), and Foam::printTokenInfo().

|
inlinenoexcept |
|
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 >.
References n.
|
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 >.
|
pure virtual |
Write the underlying content.
Implemented in token::Compound< T >.
References os().
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 >.
Output operator.
References compound(), and os().
|
protected |
The compound token state, internally used values only.
(0: initial, 1: moved, 2: pending read...)
Definition at line 200 of file token.H.
Referenced by compound(), moved(), moved(), pending(), pending(), and token::Compound< T >::read().