template class CCL::VariantVectorTemplate
Overview
#include <variantvector.h> template <typename T> class VariantVectorTemplate: public CCL::Unknown, public Core::Vector, public CCL::IMutableArray { public: // methods virtual int CCL_API getArrayLength () const; virtual tbool CCL_API getArrayElement (Variant& var, int index) const; virtual tbool CCL_API addArrayElement (VariantRef var); virtual tbool CCL_API removeArrayElement (int index); virtual tbool CCL_API setArrayElement (int index, VariantRef var); };
Inherited Members
public: // methods virtual tresult CCL_API queryInterface (UIDRef iid, void** ptr) = 0; virtual unsigned int CCL_API retain () = 0; virtual unsigned int CCL_API release () = 0; Unknown& operator = (const Unknown&); unsigned int getRetainCount () const; bool isEmpty () const; INLINE int count () const; INLINE bool isValidIndex (int index) const; T& at (int idx) const; T& first () const; T& last () const; bool isEqual (const ConstVector <T>& other) const; bool operator == (const ConstVector& other) const; bool operator != (const ConstVector& other) const; int index (const T& data) const; int index (const T* item) const; bool contains (const T& data) const; bool containsAnyOf (const ConstVector <T>& other) const; T* search (const T& data) const; template <class Predicate> T* findIf (const Predicate& recognize) const; T* findIf (ContainerPredicateFunction recognize) const; INLINE T* getItems () const; INLINE operator T* () const; RangeIterator <ConstVector <T>, VectorIterator <T>, T&> begin () const; RangeIterator <ConstVector <T>, VectorIterator <T>, T&> end () const; static T& getError (); void zeroFill (); void fill (const T& data); bool add (const T& data); bool addOnce (const T& data); void addAll (const ConstVector <T>& other); void addAllOnce (const ConstVector <T>& other); bool remove (const T& data); bool removeAt (int idx); template <class Predicate> int removeIf (const Predicate& recognize); int removeIf (ContainerPredicateFunction recognize); bool removeFirst (); bool removeLast (); bool insertAt (int index, const T& data); void removeAll (); void setCount (int _count); void empty (); void sort (); void sort (VectorCompareFunction function); void reverse (); bool addSorted (const T& data); bool addSorted ( const T& data, VectorCompareFunction function, bool reversed = false ); bool swap (const T& t1, const T& t2); bool swapAt (int index1, int index2); MutableVector& operator << (const T& data); void copyVector (const Vector& other); void copyVector (const T vector [], int count); void takeVector (Vector& other); Vector& operator = (const Vector& other); bool resize (int capacity); void setDelta (int delta); int getDelta () const; int getCapacity () const; virtual int CCL_API getArrayLength () const = 0; virtual tbool CCL_API getArrayElement (Variant& var, int index) const = 0; Variant operator [] (int index) const; virtual tbool CCL_API addArrayElement (VariantRef var) = 0; virtual tbool CCL_API setArrayElement (int index, VariantRef var) = 0; virtual tbool CCL_API removeArrayElement (int index) = 0;
Detailed Documentation
Methods
virtual int CCL_API getArrayLength () const
Get length of array.
virtual tbool CCL_API getArrayElement (Variant& var, int index) const
Get array element at given index.
virtual tbool CCL_API addArrayElement (VariantRef var)
Add elememt to array.
virtual tbool CCL_API removeArrayElement (int index)
Remove element from array.
virtual tbool CCL_API setArrayElement (int index, VariantRef var)
Set element in array.