Itasca C++ Interface
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
itascaxd::IUDTypeList< T > Class Template Referenceabstract

Interface to a container of user-define data value types. More...

#include <iudtypelist.h>

Inheritance diagram for itascaxd::IUDTypeList< T >:
itascaxd::IUDScalarList itascaxd::IUDTensorList itascaxd::IUDVectorList

Public Types

typedef T ivalue_type
 The type T that this list contains.
 

Public Member Functions

virtual IThinggetIThing ()=0
 returns a IThing pointer
 
virtual const IThinggetIThing () const =0
 returns a const IThing pointer
 
virtual IContainergetIContainer ()=0
 Returns a pointer to the container class representing a list of user defined objects.
 
virtual const IContainergetIContainer () const =0
 Returns a pointer to the container class representing a list of user defined objects.
 
virtual const T * getFirst () const =0
 Returns a const pointer to the first T in the list. Use T::getNext() to iterate through the entire list.
 
virtual T * getFirst ()=0
 Returns a pointer to the first T in the list. Use T::getNext() to iterate through the entire list.
 
virtual const T * lookupWithID (uint64 ul) const =0
 Find a const pointer to the T object with ID ul, or 0 if no match is found.
 
virtual T * lookupWithID (uint64 ul)=0
 Find a pointer to the T object with ID ul, or 0 if no match is found.
 
virtual T * create ()=0
 Creates a new T with default values.
 
virtual uint32 getExtraNotice () const =0
 Returns the NoticeManager Code for extra variables changing.
 
virtual uint32 getGroupNotice () const =0
 Returns the NoticeManager Code for group assignments changing.
 
virtual uint32 getPositionNotice () const =0
 Returns the NoticeManager Code for position of object changing.
 
virtual uint32 getValueNotice () const =0
 Returns the NoticeManager Code for object values changing.
 
virtual uint32 getHideNotice () const =0
 Returns the NoticeManager Code for hide status changing.
 
virtual uint32 getSelectNotice () const =0
 Returns the NoticeManager Code for select status changing.
 
virtual TType getType () const =0
 Returns the type indicator of the objects it contains.
 
virtual QString getLabel () const =0
 Returns a lable indicating the type of object it contains.
 
virtual T * findNear (const DVect &pos, const double &rad=limits< double >::max())=0
 Returns the object whose position is closest to /a pos.
 
virtual const T * findNear (const DVect &pos, const double &rad=limits< double >::max()) const =0
 Returns the object whose position is closest to /a pos.
 
virtual void erase (T *pnt)=0
 Removes the object /a pnt, which is assumed to be in the container. /a pnt is destroyed.
 
virtual bool importFromFile (const QString &filename, const IGroupID &group)=0
 Imports objects of type T from the file /a filename. All objects created are assigned a group of /a group in slot /a slot (if specified).
 
virtual bool exportToFile (const QString &filename, bool binary, const IRange *filter=0, const QString &comment=QString())=0
 

Detailed Description

template<class T>
class itascaxd::IUDTypeList< T >

Interface to a container of user-define data value types.

Enables looking up by ID and by location, also creating new objects of IUDType. The template class type T should be the interface to the class contained in the list. For example a collection of scalars would be defined as IUDTypeList<IUDScalar> The class T is assumed to provide the same basic functionality as an IUDType<>.

Member Function Documentation

◆ exportToFile()

template<class T >
virtual bool itascaxd::IUDTypeList< T >::exportToFile ( const QString & filename,
bool binary,
const IRange * filter = 0,
const QString & comment = QString() )
pure virtual

Exports all objects to the file /a filename. /a binary indicates binary format, text is used otherwise. /a filter (if given) is used to filter which objects are exported. /a comment is place at the start of text output.

Implemented in itascaxd::IUDScalarList, itascaxd::IUDTensorList, and itascaxd::IUDVectorList.

◆ getIThing() [1/2]

template<class T >
virtual const IThing * itascaxd::IUDTypeList< T >::getIThing ( ) const
pure virtual

returns a const IThing pointer

Implemented in itascaxd::IUDScalarList, itascaxd::IUDTensorList, and itascaxd::IUDVectorList.

◆ getIThing() [2/2]

template<class T >
virtual IThing * itascaxd::IUDTypeList< T >::getIThing ( )
pure virtual

returns a IThing pointer

Implemented in itascaxd::IUDScalarList, itascaxd::IUDTensorList, and itascaxd::IUDVectorList.

◆ importFromFile()

template<class T >
virtual bool itascaxd::IUDTypeList< T >::importFromFile ( const QString & filename,
const IGroupID & group )
pure virtual

Imports objects of type T from the file /a filename. All objects created are assigned a group of /a group in slot /a slot (if specified).

Implemented in itascaxd::IUDScalarList, itascaxd::IUDTensorList, and itascaxd::IUDVectorList.


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