The ICnrObjectSet class defines a collection of IContainerObjects. IContainerControl provides several functions that return an IContainerObjectSet.
You can construct and destruct objects of this class.
![]() |
public:
~ICnrObjectSet()
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
ICnrObjectSet(const ICnrObjectSet&)
Use this constructor to create an object of this class from a pre-existing ICnrObjectSet object.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
public:
ICnrObjectSet()
This provides the default constructor, which accepts no parameters.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
ICnrObjectSet& operator =(const ICnrObjectSet&)
replaces the contents of the collection with the contents of the given collection.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Use these functions to add and remove elements from an ICnrObjecSet collection.
![]() |
public:
bool add(IContainerObject * const& object)
Adds the given IContainerObject as the last element of the collection.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
void addAllFrom(const ICnrObjectSet& objectList)
Copies all elements from the given ICnrObjSet. The elements are added in the iteration order of the given set.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
void addAsFirst(IContainerObject * const& object)
Adds the given IContainerObject as the first element in the collection.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
void addAsLast(IContainerObject * const& object)
Adds the given IContainerObject as the last element in the collection.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
void addAsNext( IContainerObject * const& object, Cursor& cursor )
Adds the given IContainerObject as the element following the element pointed to by the cursor. Sets the cursor to the added element.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
void addAsPrevious( IContainerObject * const& object, Cursor& cursor )
Adds the given IContainerObject as the element preceding the element pointed to by the cursor. Sets the cursor to the added element.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
void addAtPosition( unsigned long pos, IContainerObject * const& object )
Adds the given IContainerObject at the given position in the collection.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
removes all elements from the collection.
public:
unsigned long removeAll()
Windows | OS/2 | AIX |
Yes | Yes | Yes |
public:
unsigned long removeAll( bool ( * predicateFunction ) ( IContainerObject * const&, void * ) , void* data = 0 )
removes all elements from this collection for which the given function returns true. Additional arguments can be passed to the given predicate function using :xph.data.:exph.. This member function returns the number of elements removed.
Note:
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
void removeAt(Cursor& cursor)
Removes the element at the given cursor.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
void removeAtPosition(unsigned long position)
Removes the element at the given position.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
void removeFirst()
Removes the first element in the collection.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
void removeLast()
Removes the last element in the collection.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
void replaceAt( const Cursor& cursor, IContainerObject * const& object )
Replaces the element at the given cursor with the given IContainerObject.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Use these functions to compare ICnrObjectSet collections with each other.
![]() |
public:
long compare( const ICnrObjectSet& objectList, long ( * compFunction ) ( IContainerObject * const & , IContainerObject * const & ) ) const
compare against the given collection using the given function as the comparison operator. Comparison yields <0 if the collection is less than the given collection, 0 if the collection is equal to the given collection, and >0 if the collection is greater than the given collection. Comparison is defined by the first pair of corresponding elements, in both collections, that are not equal. If such a pair exists, the collection with the greater element is the greater one. Otherwise, the collection with more elements is the greater one.
Note:
>0 if (element1 > element2)
0 if (element1 == element2)
<0 if (element1 < element2)
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Use these functions to control the position of the cursor over an ICnrObjectSet collection.
![]() |
public:
unsigned long position(Cursor const& cursor) const
Returns the position of the elements at the given cursor.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
void setToPosition(unsigned long pos, Cursor& cursor) const
Sets the cursor to the element at the given position.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Use these functions to perform some actions over all the elements of an ICnrObjectSet collection.
![]() |
calls the given function for all elements in the collection until the given function returns false .
The elements are visited in iteration order. Additional arguments can be passed to the given
function using additionalArgument.
Note:
public:
bool allElementsDo( bool ( * function ) ( IContainerObject * const&, void * ) , void* additionalArgument = 0 ) const
Windows | OS/2 | AIX |
Yes | Yes | Yes |
public:
bool allElementsDo( bool ( * function ) ( IContainerObject *&, void * ) , void* additionalArgument = 0 )
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Use these functions to query the contents of an ICnrObjectSet collection.
![]() |
public:
IContainerObject* elementAt(const Cursor& cursor) const
Returns the element pointed to by the given cursor.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
IContainerObject* elementAtPosition( unsigned long position ) const
Returns the element at the given position.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
IContainerObject* firstElement() const
Returns the first element in the collection.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
bool isEmpty() const
return true if the collection contains no elements.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
IContainerObject* lastElement() const
Returns the last element in the collection.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
unsigned long numberOfElements() const
Returns the number of elements in the collection.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Use these functions to sort the elements of an ICnrObjectSet collection.
![]() |
public:
void sort( long ( * comparisonFunction ) ( IContainerObject * const & , IContainerObject * const & ) )
Sorts the collection so that the elements occur in ascending order. The relation of two elements is defined by the comparisonFunction, which you provide.
Note:
>0 if (element1 > element2)
0 if (element1 == element2)
<0 if (element1 < element2)
Note:
Windows | OS/2 | AIX |
Yes | Yes | Yes |