45 virtual quint64
getSize()
const=0;
72 virtual void clear()=0;
157 bool atEnd()
const {
if (!c_ || !i_)
return true;
return c_->
atEnd(i_); }
170 const T *
get()
const {
if (!c_ || !i_)
return 0;
return convert_cast<T>(c_->
get(i_)); }
176 operator const T *()
const {
return get(); }
210 operator T *()
const {
return get(); }
const ICIterator< T > & operator++()
Increment the const iterator to the next entry in the IContainer.
Definition: icontainer.h:159
virtual IThing * add(IThing *t, quint64 id=0)=0
const T * operator->() const
Return a const pointer to T.
Definition: icontainer.h:172
virtual void release(IOpaqueIterator *i) const =0
Interface class for iterating through the container that has a null implementation.
Definition: icontainer.h:32
namespace Itasca
Definition: basememory.cpp:9
Definition of a Signal2 object, holding a list of ISlot2 objects.
Definition: isignalbase.h:76
virtual signal_type * getRemovedSignal() const =0
virtual bool copy(IOpaqueIterator *iSrc, IOpaqueIterator *iDst) const =0
Base class for items that will be stored in containers.
Definition: ithing.h:31
virtual bool getValueBased() const =0
Returns TRUE if the container is value based, or pointer based.
virtual bool increment(IOpaqueIterator *i) const =0
Interface for the small-granularity callback utility.
Const iterator for an IContainer.
Definition: icontainer.h:145
virtual quint64 getSize() const =0
Returns the IThing count or number of IThings held in the container.
virtual quint64 getNumberHidden() const =0
Returns the number of IThings that have getHidden()==true.
virtual quint64 getNextID() const =0
Iterator for an IContainer.
Definition: icontainer.h:194
virtual IThing * findWithName(const QString &s)=0
unsigned int TType
class type indicator
Definition: basedef.h:41
virtual void erase(IThing *t)=0
T & operator *() const
Return a referenc to T.
Definition: icontainer.h:208
static const TType type_
The type identification number for this class, for use in convert_cast() and convert_getcast().
Definition: icontainer.h:26
virtual quint64 getNumberSelected() const =0
Returns the number of IThings that have getSelected()==true.
const IContainer * getContainer() const
Get the IContainer pointer that this iterator is associated with.
Definition: icontainer.h:155
virtual IThing * remove(IThing *t)=0
ICIterator(const IContainer *c)
Definition: icontainer.h:149
T * get() const
Return a pointer to T.
Definition: icontainer.h:204
virtual bool atEnd(IOpaqueIterator *i) const =0
virtual signal_type * getDestroySignal() const =0
void setContainer(const IContainer *c)
Associate this with a different container.
Definition: icontainer.h:153
IIterator(IContainer *c)
Definition: icontainer.h:198
const T * get() const
Return a const pointer to T.
Definition: icontainer.h:170
virtual void setNextID(quint64)=0
Set the maximum ID. This should only be used on a restore if manipulating the container under the hoo...
virtual signal_type * getAddedSignal() const =0
~ICIterator()
Destructor for the const iterator.
Definition: icontainer.h:151
Signal2< const IThing *, const IContainer * > signal_type
Defines the Signal2<> type used for removed, added, and destroy signals sent from the container.
Definition: icontainer.h:29
virtual IThing * getIThing()=0
Returns the IThing pointer of the container.
Interface for containers of IThings.
Definition: icontainer.h:23
void copy(const ICIterator< T > &c)
Copy another iterator.
Definition: icontainer.h:178
bool atEnd() const
Returns true if at the end of the IContainer.
Definition: icontainer.h:157
void setContainer(IContainer *c)
Associate this with a different container.
Definition: icontainer.h:202
const T & operator *() const
Return a const reference to T.
Definition: icontainer.h:174
T * operator->() const
Return a pointer to T.
Definition: icontainer.h:206
virtual IThing * get(IOpaqueIterator *i)=0
virtual IOpaqueIterator * acquire() const =0
Acquire a new IOpaqueIterator for use iterating through the container.
virtual quint64 getInstance(quint64 id) const =0
Return instance count associated with id, this is always 0 if not a value based container.
All default base headers if Qt is being used.
const IIterator< T > & operator++()
Increment the iterator to the next entry in the IContainer.
Definition: icontainer.h:200
virtual IContainer * getIContainer()=0
Returns the IThing pointer of the container.
virtual IThing * doSilentRemove(IThing *t)=0
Base class for items that will be stored in containers.
virtual IThing * findWithID(quint64 id)=0