Workspace 6.21.5
Public Member Functions | Protected Member Functions | List of all members
BaseModel Class Referenceabstract

Basic model interface class from which all model types should eventually derive. More...

#include <Mesh/DataStructures/basemodel.h>

Inheritance diagram for BaseModel:
[legend]

Public Member Functions

virtual ~BaseModel ()=default
 
virtual void clearModel ()=0
 Erases everything from the model (eg nodes, elements, etc).
 
virtual void emptyTrashAll ()=0
 Garbage collects everything in the model (eg nodes, elements, etc.).
 
const QString & getName () const
 
bool operator== (const BaseModel &model) const
 
void setName (const QString &name)
 Set the name of the model to name.
 
Deprecated functions
void SetName (const QString &name)
 
const QString & GetName () const
 
void EmptyTrashAll ()
 
void ClearModel ()
 
- Public Member Functions inherited from Entity
long getCompID () const
 Get the ID of the component this entity belongs to.
 
void setCompID (long compID)
 
void SetCompID (long compID)
 
long GetCompID () const
 
- Public Member Functions inherited from NumberedObject
 NumberedObject (long ID)
 Create an object with the specified ID and all flags except isValid not set.
 
void clearFlag (unsigned flag)
 Clear flag. Do not use this to manipulate the isValid flag, since list managers are responsible for that.
 
void copyFlags (const NumberedObject &t)
 
long getID () const
 
long getIndex () const
 
bool isFlagSet (unsigned flag) const
 
bool isValid () const
 
void setFlag (unsigned flag, bool b=true)
 Set flag to b. Do not use this to manipulate the isValid flag, since list managers are responsible for that.
 
void setID (long ID)
 
void setIndex (long i)
 
void SetID (long ID)
 
long GetID () const
 
void SetIndex (long i)
 
long GetIndex () const
 
bool IsFlagSet (unsigned flag) const
 
void ClearFlag (unsigned flag)
 
void SetFlag (unsigned flag)
 
void setFlagTo (unsigned flag, bool b=true)
 
void SetFlagTo (unsigned flag, bool b=true)
 
bool IsValid () const
 

Protected Member Functions

 BaseModel (long modelID=1, long compID=1)
 
- Protected Member Functions inherited from Entity
 Entity (long id, long compID)
 

Additional Inherited Members

- Public Types inherited from NumberedObject
enum  {
  flag0 , flag1 , flag2 , flag3 ,
  flag4 , flag5 , flag6 , flag7 ,
  flag8 , flag9 , flag10 , flag11 ,
  flag12 , flag13 , flag14 , flag15
}
 

Detailed Description

The intent is that if non-mesh models (eg geometric models with NURBS surfaces, etc.) are ever needed, they should also derive from BaseModel. This will make things like assemblies easier. All we are really supplying for the moment is a name and ID, plus a bit of housekeeping, such as garbage collection.

Constructor & Destructor Documentation

◆ BaseModel()

BaseModel ( long  modelID = 1,
long  compID = 1 
)
protected

The compID is probably only meaningful if the model is being used as a glyph for rendering, or some similar application where models are being instantiated at a set of points. The modelID is also likely to be useful only in similar circumstances, but maybe more so during debugging.

◆ ~BaseModel()

virtual ~BaseModel ( )
virtualdefault

Member Function Documentation

◆ ClearModel()

void ClearModel ( )
inline

◆ clearModel()

virtual void clearModel ( )
pure virtual

Implemented in MeshModel.

◆ EmptyTrashAll()

void EmptyTrashAll ( )
inline

◆ emptyTrashAll()

virtual void emptyTrashAll ( )
pure virtual

Implemented in MeshModel.

◆ getName()

const QString & getName ( ) const
inline
Returns
The name of this model, or an empty string if it has not been set. Model names are sometimes used as the basis of a file name when writing out certain model types to solver input files.

◆ GetName()

const QString & GetName ( ) const
inline

◆ operator==()

bool operator== ( const BaseModel model) const
inline

◆ setName()

void setName ( const QString &  name)
inline

◆ SetName()

void SetName ( const QString &  name)
inline