FEDEM Solver  R8.0
Source code of the dynamics solver
Public Member Functions | Public Attributes | Protected Member Functions | List of all members
FFrFieldEntryBase Class Reference

Generic base class for non-leaf result file entries. More...

#include <FFrFieldEntryBase.H>

Inheritance diagram for FFrFieldEntryBase:
Inheritance graph
[legend]
Collaboration diagram for FFrFieldEntryBase:
Collaboration graph
[legend]

Public Member Functions

virtual ~FFrFieldEntryBase ()
 The destructor deletes the heap-allocated data fields. More...
 
void sortDataFieldsByUserID ()
 Sorts the data fields based on their user ID. More...
 
bool resolve (const std::string &references, FFrCreatorData &cd, bool inlined=true)
 Resolves a string of references into datafield entries. More...
 
virtual const FFrEntries * getDataFields () const
 Returns a pointer to the data fields of this entry. More...
 
virtual bool hasDataFields () const
 Returns whether this entry has data fields or not. More...
 
virtual bool isEmpty () const
 Returns true if this entry and all below it are empty. More...
 
virtual bool isVariableFloat () const
 Returns true if the first variable referred is a float. More...
 
virtual void removeContainers (const std::set< FFrResultContainer * > &cont)
 Removes data associated with given containers for this entry. More...
 
virtual bool merge (FFrEntryBase *objToMergeFrom)
 Merges another entry into *this. More...
 
virtual bool equal (const FFrEntryBase *obj) const
 Returns true if *this and *obj are considered equal. More...
 
virtual bool less (const FFrEntryBase *obj) const
 Returns true if *this is ordered before *obj. More...
 
virtual void printPosition (std::ostream &os) const
 Prints out the positioning data of this field. More...
 
- Public Member Functions inherited from FFrEntryBase
virtual ~FFrEntryBase ()
 Empty destructor. More...
 
FFaResultDescription getEntryDescription () const
 Returns the full path of this result entry. More...
 
virtual const std::string & getDescription () const =0
 Returns the description of this entry. More...
 
virtual bool hasDescription () const
 Returns whether the entry has a description or not. More...
 
virtual const std::string & getType () const =0
 Returns the referred object type. More...
 
virtual int getBaseID () const
 Returns the base ID of the object if this entry is an Object Group. More...
 
virtual bool hasBaseID () const
 Returns whether this entry has a base ID or not. More...
 
virtual int getUserID () const
 Returns the user ID for this entry. More...
 
virtual bool hasUserID () const
 Returns whether this entry has a user ID or not. More...
 
template<class T >
int readPositionedTimestepData (const T *values, int nvals) const
 Reads variable reference data from the hierarhcy under this entry. More...
 
FFrEntryBase * getOwner () const
 Returns the owner of this entry in the hierarchy. More...
 
void setOwner (FFrEntryBase *owner)
 Defines the owner of this entry in the hierarchy. More...
 
virtual void setGlobal ()
 Defines this as a global scope entry. More...
 
bool isGlobal () const
 Check if this entry is in global scope or not. More...
 
virtual bool isOG () const
 Returns whether this entry is an Object Group or not. More...
 
virtual bool isSOG () const
 Returns whether this entry is a Super Object Group or not. More...
 
virtual bool isIG () const
 Returns whether this entry is an Item Group or not. More...
 
virtual bool isVarRef () const
 Returns whether this entry is a Variable Reference or not. More...
 
virtual int traverse (FFrResultContainer *, FFrEntryBase *, FFrEntryBase *&, int binPos)
 Traverses to build owner hierarchy and calculate binary sizes. More...
 
virtual bool comp (const FFrEntryBase *) const
 Returns true if *this equals another specified entry. More...
 
template<class T >
bool readVar (T &value)
 Reads a variable from the results container for current time step. More...
 

Public Attributes

FFrEntries dataFields
 List of data fields referred by this entry. More...
 

Protected Member Functions

virtual int readPosData (const double *vals, int nvals, int pos) const
 Reads double data from the hierarhcy under this entry. More...
 
virtual int readPosData (const float *vals, int nvals, int pos) const
 Reads float data from the hierarhcy under this entry. More...
 
virtual int readPosData (const int *vals, int nvals, int pos) const
 Reads integer data from the hierarhcy under this entry. More...
 
- Protected Member Functions inherited from FFrEntryBase
 FFrEntryBase ()
 Default constructor. More...
 
 FFrEntryBase (const FFrEntryBase &obj)
 Copy constructor. More...
 
FFrEntryBase & operator= (const FFrEntryBase &)=delete
 Disable default assignment operator. More...
 

Detailed Description

Generic base class for non-leaf result file entries.

This class can represent any result database entry in the hierarchy, except for the leaf entries (which are the FFrVariableReference entries). It has a list of references to child entries as member, and a method to resolve these references from a text string read from the file header.

Constructor & Destructor Documentation

◆ ~FFrFieldEntryBase()

FFrFieldEntryBase::~FFrFieldEntryBase ( )
virtual

The destructor deletes the heap-allocated data fields.

Member Function Documentation

◆ equal()

bool FFrFieldEntryBase::equal ( const FFrEntryBase *  obj) const
virtual

Returns true if *this and *obj are considered equal.

Implements FFrEntryBase.

Reimplemented in FFrItemGroup.

◆ getDataFields()

virtual const FFrEntries* FFrFieldEntryBase::getDataFields ( ) const
inlinevirtual

Returns a pointer to the data fields of this entry.

A null pointer is returned if the data fields are not set.

Reimplemented from FFrEntryBase.

◆ hasDataFields()

virtual bool FFrFieldEntryBase::hasDataFields ( ) const
inlinevirtual

Returns whether this entry has data fields or not.

Reimplemented from FFrEntryBase.

◆ isEmpty()

bool FFrFieldEntryBase::isEmpty ( ) const
virtual

Returns true if this entry and all below it are empty.

Implements FFrEntryBase.

◆ isVariableFloat()

bool FFrFieldEntryBase::isVariableFloat ( ) const
virtual

Returns true if the first variable referred is a float.

Implements FFrEntryBase.

◆ less()

bool FFrFieldEntryBase::less ( const FFrEntryBase *  obj) const
virtual

Returns true if *this is ordered before *obj.

Implements FFrEntryBase.

Reimplemented in FFrItemGroup.

◆ merge()

bool FFrFieldEntryBase::merge ( FFrEntryBase *  objToMergeFrom)
virtual

Merges another entry into *this.

Implements FFrEntryBase.

◆ printPosition()

void FFrFieldEntryBase::printPosition ( std::ostream &  os) const
virtual

Prints out the positioning data of this field.

Implements FFrEntryBase.

◆ readPosData() [1/3]

int FFrFieldEntryBase::readPosData ( const double *  vals,
int  nvals,
int  pos 
) const
protectedvirtual

Reads double data from the hierarhcy under this entry.

Implements FFrEntryBase.

◆ readPosData() [2/3]

int FFrFieldEntryBase::readPosData ( const float *  vals,
int  nvals,
int  pos 
) const
protectedvirtual

Reads float data from the hierarhcy under this entry.

Implements FFrEntryBase.

◆ readPosData() [3/3]

int FFrFieldEntryBase::readPosData ( const int *  vals,
int  nvals,
int  pos 
) const
protectedvirtual

Reads integer data from the hierarhcy under this entry.

Implements FFrEntryBase.

◆ removeContainers()

void FFrFieldEntryBase::removeContainers ( const std::set< FFrResultContainer * > &  cont)
virtual

Removes data associated with given containers for this entry.

Implements FFrEntryBase.

◆ resolve()

bool FFrFieldEntryBase::resolve ( const std::string &  references,
FFrCreatorData &  cd,
bool  inlined = true 
)

Resolves a string of references into datafield entries.

This method resolves the references string (typically the last string in object- and item group definitions) into variable references or item group references which are stored in dataFields.

◆ sortDataFieldsByUserID()

void FFrFieldEntryBase::sortDataFieldsByUserID ( )

Sorts the data fields based on their user ID.

Member Data Documentation

◆ dataFields

FFrEntries FFrFieldEntryBase::dataFields

List of data fields referred by this entry.


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