|
FuncDoodle
|
Dynamic array of Frame objects for animation storage. More...
#include <DynArr.h>
Public Member Functions | |
| LongIndexArray (int width, int height, Col bgCol, unsigned long initialcap=10) | |
| Creates a frame array with default empty frames. | |
| ~LongIndexArray () | |
| void | PushBack (const Frame *value) |
| Appends a copy of a frame. | |
| void | PushBackEmpty () |
| Appends a newly created empty frame. | |
| void | InsertAfterEmpty (unsigned long index) |
| Inserts an empty frame after an index. | |
| void | InsertBeforeEmpty (unsigned long index) |
| Inserts an empty frame before an index. | |
| void | InsertAfter (unsigned long index, const Frame *value) |
| Inserts a frame copy after an index. | |
| void | InsertAfter (unsigned long index, Frame val) |
| Inserts a frame value after an index. | |
| void | InsertBefore (unsigned long index, const Frame *value) |
| Inserts a frame copy before an index. | |
| void | InsertBefore (unsigned long index, Frame val) |
| Inserts a frame value before an index. | |
| void | MoveBackward (unsigned long i) |
| Moves a frame one slot toward the beginning. | |
| void | MoveForward (unsigned long i) |
| Moves a frame one slot toward the end. | |
| void | Remove (unsigned long index) |
| Removes a frame at an index. | |
| Frame * | operator[] (unsigned long index) |
| Returns mutable frame access by index. | |
| const Frame * | operator[] (unsigned long index) const |
| Returns immutable frame access by index. | |
| Frame * | Get (unsigned long index) |
| Returns mutable frame access by index. | |
| unsigned long | Size () const |
| Returns the number of stored frames. | |
| unsigned long | Capacity () const |
| Returns the reserved frame capacity. | |
Private Member Functions | |
| void | Resize (unsigned long newCap) |
Private Attributes | |
| std::vector< Frame > | m_Data |
| unsigned long | m_Capacity |
| unsigned long | size = 0 |
| int | m_Width |
| int | m_Height |
| Col | m_BG |
Dynamic array of Frame objects for animation storage.
Ordered container holding all frames in an animation. Provides O(1) random access by index, amortized O(1) push to end, and O(n) insert/remove. Owns the frame data - frames are copied on insert, owned and destructed on remove.
| FuncDoodle::LongIndexArray::LongIndexArray | ( | int | width, |
| int | height, | ||
| Col | bgCol, | ||
| unsigned long | initialcap = 10 ) |
Creates a frame array with default empty frames.
| width | Width used for newly created empty frames. |
| height | Height used for newly created empty frames. |
| bgCol | Background color used for empty frames. |
| initial_capacity | Initial reserved frame capacity. |
|
default |
|
inlinenodiscard |
Returns the reserved frame capacity.
| Frame * FuncDoodle::LongIndexArray::Get | ( | unsigned long | index | ) |
| void FuncDoodle::LongIndexArray::InsertAfter | ( | unsigned long | index, |
| const Frame * | value ) |
Inserts a frame copy after an index.
| index | Index after which to insert. |
| value | Frame to copy. |
| void FuncDoodle::LongIndexArray::InsertAfter | ( | unsigned long | index, |
| Frame | val ) |
Inserts a frame value after an index.
| index | Index after which to insert. |
| val | Frame value to copy. |
| void FuncDoodle::LongIndexArray::InsertAfterEmpty | ( | unsigned long | index | ) |
Inserts an empty frame after an index.
| index | Index after which to insert. |
| void FuncDoodle::LongIndexArray::InsertBefore | ( | unsigned long | index, |
| const Frame * | value ) |
Inserts a frame copy before an index.
| index | Index before which to insert. |
| value | Frame to copy. |
| void FuncDoodle::LongIndexArray::InsertBefore | ( | unsigned long | index, |
| Frame | val ) |
Inserts a frame value before an index.
| index | Index before which to insert. |
| val | Frame value to copy. |
| void FuncDoodle::LongIndexArray::InsertBeforeEmpty | ( | unsigned long | index | ) |
Inserts an empty frame before an index.
| index | Index before which to insert. |
| void FuncDoodle::LongIndexArray::MoveBackward | ( | unsigned long | i | ) |
Moves a frame one slot toward the beginning.
| i | Index to move. |
| void FuncDoodle::LongIndexArray::MoveForward | ( | unsigned long | i | ) |
Moves a frame one slot toward the end.
| i | Index to move. |
| Frame * FuncDoodle::LongIndexArray::operator[] | ( | unsigned long | index | ) |
| const Frame * FuncDoodle::LongIndexArray::operator[] | ( | unsigned long | index | ) | const |
| void FuncDoodle::LongIndexArray::PushBack | ( | const Frame * | value | ) |
Appends a copy of a frame.
| value | Frame to append. |
| void FuncDoodle::LongIndexArray::PushBackEmpty | ( | ) |
Appends a newly created empty frame.
| void FuncDoodle::LongIndexArray::Remove | ( | unsigned long | index | ) |
Removes a frame at an index.
| index | Index to remove. |
|
private |
|
inlinenodiscard |
Returns the number of stored frames.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |