Vector.pkg 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. $#include "Vector.h"
  2. $#include "Vector3.h"
  3. class PODVector
  4. {
  5. TOLUA_TEMPLATE_BIND(T, Vector3)
  6. PODVector();
  7. PODVector(const PODVector<T>& vector);
  8. ~PODVector();
  9. PODVector<T> operator + (const T& rhs) const;
  10. PODVector<T> operator + (const PODVector<T>& rhs) const;
  11. bool operator == (const PODVector<T>& rhs) const;
  12. T& operator [] (unsigned index);
  13. const T& operator [] (unsigned index) const;
  14. T& At(unsigned index);
  15. const T& At(unsigned index) const;
  16. void Push(const T& value);
  17. void Push(const PODVector<T>& vector);
  18. void Pop();
  19. void Insert(unsigned pos, const T& value);
  20. void Insert(unsigned pos, const PODVector<T>& vector);
  21. void Erase(unsigned pos, unsigned length = 1);
  22. bool Remove(const T& value);
  23. void Clear();
  24. void Resize(unsigned newSize);
  25. void Reserve(unsigned newCapacity);
  26. void Compact();
  27. bool Contains(const T& value) const;
  28. T& Front();
  29. const T& Front() const;
  30. T& Back();
  31. const T& Back() const;
  32. unsigned Size() const;
  33. unsigned Capacity() const;
  34. bool Empty() const;
  35. tolua_readonly tolua_property__no_prefix unsigned size;
  36. tolua_readonly tolua_property__no_prefix unsigned capacity;
  37. tolua_readonly tolua_property__no_prefix bool empty;
  38. };