Itasca C++ Interface
|
Base class for items that will be stored in containers. More...
#include <ithing.h>
Classes | |
class | BreakLock |
class | Lock |
class | LockIf |
Public Member Functions | |
virtual const IThing * | getIThing () const =0 |
Return the IThing interface. | |
virtual IThing * | getIThing ()=0 |
Return the IThing interface. More... | |
virtual TType | getType () const =0 |
virtual QString | getTypeName () const =0 |
Returns a description of the type of the class. | |
virtual TType | getGeneralType () const =0 |
virtual const void * | convertToType (const TType &id) const =0 |
virtual void * | convertToType (const TType &id)=0 |
template<class T > | |
const T * | convert () const |
template<class T > | |
T * | convert () |
virtual quint64 | getID () const =0 |
Returns a value - the exact meaning of which is defined by the container and the implementing class. | |
virtual quint64 | getCollectionID () const =0 |
virtual bool | getIsSet () const =0 |
virtual const IThing * | getSet () const =0 |
virtual void | getAssociatedThings (const TType &type, FArray< const IThing * > *ret) const =0 |
Returns a list of things associated with this thing with TType type. | |
virtual void | resetAssociatedThings (FArray< const IThing * > *ret)=0 |
Resets any data used with the associated things. | |
virtual QString | getName () const =0 |
Returns a name string - the exact meaning of which is defined by the container and the implementing class. | |
virtual DVect3 | getLocation () const =0 |
virtual DExtent3 | getExtent () const =0 |
virtual DVect3 | getClosest (const DVect3 &pos) const =0 |
virtual DVect3 | getNormal () const =0 |
Returns a normal vector representing the orientation of the object, if this is appropriate. 0 vector if it isn't. | |
virtual DVect3 | getDisplacementThing () const =0 |
Returns the accumulated displacement for things supporting displacement. | |
virtual DVect3 | getVelocityThing () const =0 |
Returns the instantaneous velocity for things supporting velocity. | |
virtual double | getVolume () const =0 |
Returns the volume if this is appropraite. 0 is returned otherwise. | |
virtual bool | isWithinOrientation (const Orientation3 &orientation, const DVect2 &tol) const =0 |
virtual bool | isOnSurface (bool mech=true, bool therm=false, bool fluid=false, bool _or=false) const =0 |
Returns TRUE if this is a "Surface", based on the three process criteria. | |
virtual const IContainer * | getContainer () const =0 |
virtual IContainer * | getContainer ()=0 |
virtual bool | addGroup (const IGroupID &id)=0 |
virtual bool | removeGroup (const IGroupID &id)=0 |
virtual uint | isInGroup (const FArray< IGroupID > &ids, TType type=0, bool only=false) const =0 |
virtual const IGroup * | getGroup (const ISlotID &slot) const =0 |
virtual QString | getGroupName (const ISlotID &slot=ISlotID()) const =0 |
virtual uint | getGroupList (FArray< IGroupID > *list) const =0 |
Return all groups and all slots assigned to the object in a list. | |
virtual void | copyGroups (const IThing *t)=0 |
Copies group data from one IThing to this, all original group data is lost. | |
virtual void | clearGroup ()=0 |
virtual uint | getExtraSize () const =0 |
Returns the number of extra FISH extra variables for this object. | |
virtual const fish::IParameter * | getExtra (uint index) const =0 |
virtual void | setExtra (uint index, const fish::IParameter &p)=0 |
virtual void | clearExtra ()=0 |
virtual bool | getHidden () const =0 |
Returns the Hide flag at index. | |
virtual bool | setHidden (bool b)=0 |
Sets the hidden flag at index. | |
virtual bool | getSelected () const =0 |
Returns the selected flag at index. | |
virtual bool | setSelected (bool b)=0 |
Sets the selected flag at index. | |
virtual bool | getGhost () const =0 |
Indicates if the thing is a "ghost", that is actually ownned by a different node. | |
virtual void | setGhost (bool b)=0 |
virtual quint64 | getContainerOrder () const =0 |
virtual void | setContainerOrder (quint64 i)=0 |
virtual void | save (Archive2 &) const =0 |
Archives the Thing to a file (if appropriate). | |
virtual bool | restore (Archive2 &, quint64)=0 |
virtual void | remap (Archive2 &)=0 |
virtual quint64 | getRemapHandle (Archive2 &) const =0 |
virtual void | destroy ()=0 |
void | addDeleteNotice (IDeleteNotice *delnot) const |
void | removeDeleteNotice (IDeleteNotice *delnot) const |
void | sendDeleteNotice () |
void | changeToNewPointer (IThing *newPnt) |
Static Public Attributes | |
static const TType | type_ = 0x4c815a59 |
The base type of an IThing. | |
static const uint | maxGroupSlot_ = 128 |
Maximum number of group slots per object. | |
static const uint | maxExtraIndex_ = 128 |
Maximum number of extra FISH variables per object. | |
Base class for items that will be stored in containers.
The interface defines the support needed for tracking pointers, and automatic pointer conversion during archiving. This class also has a primitive run-time type identification system, maintains an integer ID, and returns a single location in space associated with the object.
|
pure virtual |
Adds a group entry to this object. Returns true on success. If no slot is specified, the default slot is assumed.
|
inline |
Type specific version of convertToType, that assume that the type id is in T::type_. It also automatically converts the return type to
|
inline |
Type specific version of convertToType, that assume that the type id is in T::type_. It also automatically converts the return type to
|
pure virtual |
This functions is intended as a more efficient version of dynamic_cast, available only for things in the IThing tree, and used when you cannot guarantee that the class hasn't had a base shift. If no match is found, then 0 is returned. See the template version below for type safety, and automatic exception throwing. As a special case, if id is 0, then the return value should be an "upcast" to the most-derived type.
|
pure virtual |
This functions is intended as a more efficient version of dynamic_cast, available only for things in the IThing tree, and used when you cannot guarantee that the class hasn't had a base shift. If no match is found, then 0 is returned. See the template version below for type safety, and automatic exception throwing. As a special case, if id is 0, then the return value should be an "upcast" to the most-derived type.
|
pure virtual |
Calls
Necessary because deleting an interface pointer is not possible due to the lack of virtual destructors.
|
pure virtual |
Returns the closest point on the IThing to the position pos. By default, returns the same value returns by getLocation(). IThing implementations may choose different degrees to which they return the exact closest point.
|
pure virtual |
Returns a value that indicates the ID of some larger grouping of objects. For instance, each SEL element might have a unique ID. But all elements in Cable 5 will have a getCollectionID() of 5. The exact meaning of this is defined by the container and the implementing class.
|
pure virtual |
Returns a const pointer to the container this IThing is stored in. May return 0, indicating that this type of thing doesn't keep track of that.
|
pure virtual |
Returns a pointer to the container this IThing is stored in. May return 0, indicating that this type of thing doesn't keep track of that.
|
pure virtual |
Indicates the original order location of the thing in the main container before mpi distribution.
|
pure virtual |
Returns an extent in space associated with the IThing. By default, returns an empty extent (DExtent::nothing). This value is used by the cell space logic.
|
pure virtual |
Returns an interface to the FISH extra variables for this object. May be null if no extra variables have ever been specified.
|
pure virtual |
This function returns a constant character string indicating the "general" type. For non-polymorphic objects this will be the same as getType(). Polymorphic objects should override this function to return a "base" type, use to indicate the general class of object. For instance for histories, getType() will return historytime and historyzone, but getGeneralType() should be overridden to return "history" for all of them.
Returns the group entry directly in this object at that slot, or null if it does not exist. An invalid slot will always return null, and ANY slot will use slot 0 (default).
Returns the group name directly in this object at that slot, or the null name if it does not exist. The group_ and groupName_ parts of id are ignored. If all slots are specified, then returns a concatenation of all groups in all slots.
|
pure virtual |
Returns a boolean indicating whether or not this is a set - a set is a container of things. The RangeElementSet works based on this identifier
|
pure virtual |
Returns a location in space associated with the IThing. By default, returns the origin. This value is used by the Range logic to filter objects based on position.
|
pure virtual |
|
pure virtual |
This function returns a character string indicating the type. It may be compared directly by pointer value (fast), or a string comparison may be given. Used mostly for save/restore – to indicate the object type for polymorphic containers.
|
pure virtual |
Returns number of matches with ALL groups in ids. Applied either to this object directly, or possibly to connected objects. (For example, gridpoints in FLAC3D are considered a member of a group if any zones connected to them are in that group). If the type field is non-zero, will find matches in that type only in the heirarchy. If ONLY is given, no groups can be in the object in addition to those specified in ids.
|
pure virtual |
Returns TRUE if object can be considered to be part of the orientation specified, withing the tolerance. If Orientation is wasDefinedByNormal() then only tol.x() is considered, which is an angle in radians. Otherwise tol.x() is the angle from dip, and tol.y() is the angle from dip direction.
|
pure virtual |
Removes all entries matching g or name from this object, if not slot is specified. Returns true if one or more entries were removed. If by_ is not 0, an error occurs.
|
pure virtual |
Returns an interface to the FISH extra variables for this object. May be null if no extra variables have ever been specified.