Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //DynamicCollection.h
- #ifndef DynamicCollection_h
- #define DynamicCollection_h
- #include "Arduino.h"
- template <class T>
- class DynamicCollection
- {
- public:
- ~DynamicCollection();
- DynamicCollection();
- DynamicCollection(int length);
- DynamicCollection(int length, T _default);
- typedef unsigned int uint;
- void Add(T object);
- void Remove(T object);
- void RemoveAt(uint index);
- int Length();
- T &operator[] (uint index);
- const T &operator[] (uint index) const;
- private:
- static T* resize(T *pArray, uint OldSize, uint NewSize);
- T* _pInnerCollection;
- int _InnerCollLength;
- };
- #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement