openDAQ
Open data acquisition platform
IList Struct Referenceabstract

Represents a heterogeneous collection of objects that can be individually accessed by index. More...

+ Inheritance diagram for IList:
+ Collaboration diagram for IList:

Detailed Description

Represents a heterogeneous collection of objects that can be individually accessed by index.

Public Member Functions

virtual ErrCode INTERFACE_FUNC getItemAt (SizeT index, IBaseObject **obj)=0
 Gets the element at a specific position. More...
 
virtual ErrCode INTERFACE_FUNC getCount (SizeT *size)=0
 Gets the number of elements contained in the list. More...
 
virtual ErrCode INTERFACE_FUNC setItemAt (SizeT index, IBaseObject *obj)=0
 Sets the element at a specific position. More...
 
virtual ErrCode INTERFACE_FUNC pushBack (IBaseObject *obj)=0
 Inserts the element at the end of the list. More...
 
virtual ErrCode INTERFACE_FUNC pushFront (IBaseObject *obj)=0
 Inserts the element at the start of the list. More...
 
virtual ErrCode INTERFACE_FUNC moveBack (IBaseObject *obj)=0
 Inserts the element at the end of the list without incrementing the reference count. More...
 
virtual ErrCode INTERFACE_FUNC moveFront (IBaseObject *obj)=0
 Inserts the element at the start of the list without incrementing the reference count. More...
 
virtual ErrCode INTERFACE_FUNC popBack (IBaseObject **obj)=0
 Gets the element from the end of the list. More...
 
virtual ErrCode INTERFACE_FUNC popFront (IBaseObject **obj)=0
 Gets the element from the start of the list. More...
 
virtual ErrCode INTERFACE_FUNC insertAt (SizeT index, IBaseObject *obj)=0
 Inserts the element at a specific position. More...
 
virtual ErrCode INTERFACE_FUNC removeAt (SizeT index, IBaseObject **obj)=0
 Removes the element at a specific position. More...
 
virtual ErrCode INTERFACE_FUNC deleteAt (SizeT index)=0
 Deletes the element at a specific position. More...
 
virtual ErrCode INTERFACE_FUNC clear ()=0
 Removes all elements from the list.
 
virtual ErrCode INTERFACE_FUNC createStartIterator (IIterator **iterator)=0
 Creates and returns the start iterator of the list. More...
 
virtual ErrCode INTERFACE_FUNC createEndIterator (IIterator **iterator)=0
 Creates and returns the stop iterator of the list. More...
 
- Public Member Functions inherited from IBaseObject
virtual ErrCode INTERFACE_FUNC borrowInterface (const IntfID &intfID, void **obj) const =0
 Returns another interface which is supported by the object without incrementing the reference count. More...
 
virtual ErrCode INTERFACE_FUNC dispose ()=0
 Disposes all references held by the object. More...
 
virtual ErrCode INTERFACE_FUNC getHashCode (SizeT *hashCode)=0
 Returns hash code of the object. More...
 
virtual ErrCode INTERFACE_FUNC equals (IBaseObject *other, Bool *equal) const =0
 Compares object to another object for equality. More...
 
virtual ErrCode INTERFACE_FUNC toString (CharPtr *str)=0
 Returns a string representation of the object. More...
 
- Public Member Functions inherited from IUnknown
virtual ErrCode INTERFACE_FUNC queryInterface (const IntfID &intfID, void **obj)=0
 Returns another interface which is supported by the object and increments the reference count. More...
 
virtual int INTERFACE_FUNC addRef ()=0
 Increments the reference count for an interface on an object. More...
 
virtual int INTERFACE_FUNC releaseRef ()=0
 Decrements the reference count for an interface on an object. More...
 

Member Function Documentation

◆ createEndIterator()

virtual ErrCode INTERFACE_FUNC createEndIterator ( IIterator **  iterator)
pure virtual

Creates and returns the stop iterator of the list.

Parameters
[out]iteratorThe stop iterator.

Use iterators to iterate through the elements.

◆ createStartIterator()

virtual ErrCode INTERFACE_FUNC createStartIterator ( IIterator **  iterator)
pure virtual

Creates and returns the start iterator of the list.

Parameters
[out]iteratorThe start iterator.

Use iterators to iterate through the elements.

◆ deleteAt()

virtual ErrCode INTERFACE_FUNC deleteAt ( SizeT  index)
pure virtual

Deletes the element at a specific position.

Parameters
indexThe zero-based index of the element to remove.

If the client needs the element deleted, it should use removeAt method.

◆ getCount()

virtual ErrCode INTERFACE_FUNC getCount ( SizeT *  size)
pure virtual

Gets the number of elements contained in the list.

Parameters
[out]sizeThe number of elements contained in the list.

◆ getItemAt()

virtual ErrCode INTERFACE_FUNC getItemAt ( SizeT  index,
IBaseObject **  obj 
)
pure virtual

Gets the element at a specific position.

Parameters
indexThe zero-based index of the element to get.
[out]objThe element at the specified index.

The reference count of the element that is retrieved is incremented. The client is responsible for calling releaseRef when the element is no longer needed.

◆ insertAt()

virtual ErrCode INTERFACE_FUNC insertAt ( SizeT  index,
IBaseObject obj 
)
pure virtual

Inserts the element at a specific position.

Parameters
indexThe zero-based index of the element to insert.
objThe element to insert at the specified index.

The reference count of the element is incremented.

◆ moveBack()

virtual ErrCode INTERFACE_FUNC moveBack ( IBaseObject obj)
pure virtual

Inserts the element at the end of the list without incrementing the reference count.

Parameters
objThe element to insert.

The reference count of the element is not incremented. The client can use this method when it no longer needs to access the element after calling the method.

◆ moveFront()

virtual ErrCode INTERFACE_FUNC moveFront ( IBaseObject obj)
pure virtual

Inserts the element at the start of the list without incrementing the reference count.

Parameters
objThe element to insert.

The reference count of the element is not incremented. The client can use this method when it no longer needs to access the element after calling the method.

◆ popBack()

virtual ErrCode INTERFACE_FUNC popBack ( IBaseObject **  obj)
pure virtual

Gets the element from the end of the list.

Parameters
[out]objThe extracted element.

The reference count of the element that is retrieved is incremented. The client is responsible for calling releaseRef when the element is no longer needed.

◆ popFront()

virtual ErrCode INTERFACE_FUNC popFront ( IBaseObject **  obj)
pure virtual

Gets the element from the start of the list.

Parameters
[out]objThe extracted element.

The reference count of the element that is retrieved is incremented. The client is responsible for calling releaseRef when the element is no longer needed.

◆ pushBack()

virtual ErrCode INTERFACE_FUNC pushBack ( IBaseObject obj)
pure virtual

Inserts the element at the end of the list.

Parameters
objThe element to insert.

The reference count of the element is incremented.

◆ pushFront()

virtual ErrCode INTERFACE_FUNC pushFront ( IBaseObject obj)
pure virtual

Inserts the element at the start of the list.

Parameters
objThe element to insert.

The reference count of the element is incremented.

◆ removeAt()

virtual ErrCode INTERFACE_FUNC removeAt ( SizeT  index,
IBaseObject **  obj 
)
pure virtual

Removes the element at a specific position.

Parameters
indexThe zero-based index of the element to remove.
[out]objThe removed element.

The client is responsible for calling releaseRef when the element is no longer needed. If the client does not need the element after it is removed, it should call delete method.

◆ setItemAt()

virtual ErrCode INTERFACE_FUNC setItemAt ( SizeT  index,
IBaseObject obj 
)
pure virtual

Sets the element at a specific position.

Parameters
indexThe zero-based index of the element to set.
objThe element to set at the specified index.

The reference count of the element is incremented.