Simple dynamic array implementation that also supports event posting and viewing/facade.
More...
|
|
| VecDataArray () |
| | Constructs an empty data array.
|
| |
|
| VecDataArray (const int size) |
| | Constructs a data array of size.
|
| |
|
| VecDataArray (std::initializer_list< Eigen::Matrix< T, N, 1 >> list) |
| | Constructs from intializer list.
|
| |
|
| VecDataArray (const VecDataArray &other) |
| |
|
| VecDataArray (VecDataArray &&other) |
| |
|
template<typename U > |
| VecDataArray< U, N > | cast () |
| | Templated copy the current array with a new internal data type, does not change the number of components, pass in the new type as a template argument.
|
| |
|
std::shared_ptr< AbstractDataArray > | cast (ScalarTypeId type) override |
| | Cast array to the IMSTK type on the abstract interface.
|
| |
|
void | resize (const int size) override |
| | Resize data array to hold exactly size number of values.
|
| |
|
void | fill (const ValueType &val) |
| |
|
int | size () const |
| |
|
void | squeeze () override |
| | Resize to current size.
|
| |
|
void | push_back (const ValueType &val) |
| | Append the data array to hold the new value, resizes if neccesary.
|
| |
|
void | push_back (const ValueType &&val) |
| |
|
void | reserve (const int size) override |
| | Allocates extra capacity, for the number of values, conservative reallocate.
|
| |
|
ValueType * | getPointer () |
| |
|
ValueType & | operator[] (const size_t pos) |
| |
|
const ValueType & | operator[] (const size_t pos) const |
| |
| ValueType & | at (const size_t pos) |
| |
| const ValueType & | at (const size_t pos) const |
| |
|
void | erase (const int vecPos) |
| |
|
template<typename U , int M> |
| VecDataArray< T, N > & | operator= (std::initializer_list< Eigen::Matrix< U, M, 1 >> list) |
| | Allow initialization from initializer list, ie: DataArray<int> arr = { 1, 2 }.
|
| |
|
VecDataArray & | operator= (const VecDataArray &other) |
| |
| void | setData (ValueType *ptr, const int size) |
| | Computes the range of a component of the vectors elements. More...
|
| |
|
int | getNumberOfComponents () const override |
| | Returns the number of components.
|
| |
|
std::unique_ptr< VecDataArray< T, N > > | clone () |
| | Polymorphic clone, shadows the declaration in the superclasss but returns own type.
|
| |
|
|
iterator | begin () |
| | begin(), end() to mirror std::vector
|
| |
|
const_iterator | begin () const |
| |
|
iterator | end () |
| |
|
const_iterator | end () const |
| |
|
const_iterator | cbegin () const |
| |
|
const_iterator | cend () const |
| |
|
| DataArray () |
| | Constructs an empty data array DataArray will never have capacity < 1.
|
| |
|
| DataArray (const int size) |
| | Constructs a data array.
|
| |
|
template<typename U > |
| | DataArray (std::initializer_list< U > list) |
| | Constructs from intializer list.
|
| |
| | DataArray (const DataArray &other) |
| | Copy Constructor. More...
|
| |
|
| DataArray (DataArray &&other) |
| |
|
void | fill (const T &val) |
| | Fill the array with the specified value.
|
| |
|
void | push_back (const T &val) |
| | Append the data array to hold the new value, resizes if neccesary.
|
| |
|
void | push_back (const T &&val) |
| |
|
T * | getPointer () |
| |
|
void * | getVoidPointer () override |
| | Returns void pointer to data.
|
| |
|
T & | operator[] (const size_t pos) |
| |
|
const T & | operator[] (const size_t pos) const |
| |
| T & | at (const size_t pos) |
| |
| const T & | at (const size_t pos) const |
| |
|
template<typename U > |
| DataArray< T > & | operator= (std::initializer_list< U > list) |
| | Allow initialization from initializer list, ie: DataArray<int> arr = { 1, 2 }.
|
| |
|
DataArray & | operator= (const DataArray &other) |
| |
| void | setData (T *ptr, const int size) |
| | Computes the range of a component of the vectors elements. More...
|
| |
|
template<typename N > |
| DataArray< N > | cast () |
| | Cast array to specific c++ type.
|
| |
|
std::unique_ptr< DataArray< T > > | clone () |
| | Polymorphic clone, shadows the declaration in the superclasss but returns own type.
|
| |
|
iterator | begin () |
| | begin(), end() to mirror std::vector
|
| |
|
const_iterator | begin () const |
| |
|
iterator | end () |
| |
|
const_iterator | end () const |
| |
|
const_iterator | cbegin () const |
| |
|
const_iterator | cend () const |
| |
|
| AbstractDataArray (const int size) |
| |
|
virtual | ~AbstractDataArray () |
| | Ensure all observers are disconnected.
|
| |
|
| SIGNAL (AbstractDataArray, modified) |
| |
|
void | clear () |
| | Resizes to 0.
|
| |
|
int | size () const |
| | Get number of values/tuples.
|
| |
|
ScalarTypeId | getScalarType () const |
| | Returns the scalar type of this array.
|
| |
|
int | getCapacity () const |
| | Return the capacity of the array.
|
| |
|
void | postModified () |
| | emits signal to all observers, informing them on the current address in memory and size of array
|
| |
|
std::unique_ptr< AbstractDataArray > | clone () |
| | polymorphic clone() function, utilize this to get a copy of the array without casting to the expected array type
|
| |
|
template<typename T > |
| void | postEvent (const T &e) |
| | Emits the event Direct observers will be immediately called, in sync Queued observers will receive the Command in their queue for later execution, reciever must implement doEvent.
|
| |
|
template<typename T > |
| void | queueEvent (const T &e) |
| | Queues event directly to this.
|
| |
|
void | doEvent () |
| | Do an event, if none exists return.
|
| |
|
void | doAllEvents () |
| | Do all the events in the event queue.
|
| |
|
void | foreachEvent (std::function< void(Command cmd)> func) |
| | Thread safe loop over all event commands, one can implement a custom handler.
|
| |
|
void | rforeachEvent (std::function< void(Command cmd)> func) |
| | thread safe reverse loop over all event commands, one can implement a custom handler
|
| |
|
void | clearEvents () |
| | Removes all events from queue cleans up copies of the event.
|
| |
template<typename T, int N>
class imstk::VecDataArray< T, N >
Simple dynamic array implementation that also supports event posting and viewing/facade.
Definition at line 15 of file imstkImplicitGeometryToPointSetCCD.h.