template class Core::FixedSizeVector

Overview

One-dimensional array with a fixed capacity passed as template argument. More…

#include <corevector.h>

template <class T, int maxElements>
class FixedSizeVector: public Core::MutableVector
{
public:
    // construction

    FixedSizeVector ();
    FixedSizeVector (const FixedSizeVector& other);

    // methods

    FixedSizeVector& operator = (const FixedSizeVector& other);
    bool isFull () const;
    CORE_STATIC_TEMPLATE_MEMBER bool resize (int capacity);
    CORE_STATIC_TEMPLATE_MEMBER int getCapacity ();
};

Inherited Members

public:
    // methods

    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);

Detailed Documentation

One-dimensional array with a fixed capacity passed as template argument.

<>

Methods

bool isFull () const

Check if fixed size exceeded.