![]() |
MAK Legion API Documentation
|
A span represents a contiguous array of objects in memory. More...
Collaboration diagram for Legion::Span< DATA_TYPE >:Public Member Functions | |
| Span () | |
| default constructor More... | |
| Span (const DATA_TYPE *data, int count) | |
| constructor for raw data More... | |
| Span (const std::vector< DATA_TYPE > &dataVector) | |
| constructor for complete vector More... | |
| ~Span () | |
| destructor More... | |
| Span (const Span &orig) | |
| copy constructor More... | |
| Span & | operator= (const Span &orig) |
| assignment operator More... | |
| bool | operator== (const Span< DATA_TYPE > &rhs) const |
| equality operator More... | |
| bool | operator!= (const Span< DATA_TYPE > &rhs) const |
| inequality operator More... | |
| int | size () const |
| Returns the count of objects in the array. More... | |
| int | sizeInBytes () const |
| Returns the size of the array in bytes. More... | |
| const DATA_TYPE * | data () const |
| Returns a pointer to the underlying data. More... | |
| const DATA_TYPE & | operator[] (int index) const |
| Array access to the elements in the array. More... | |
| Span | slice (int offset) |
| Returns a new span that is a subset of the existing span from the offset to the end of the array. More... | |
| Span | slice (int offset, int count) |
| Returns a new span that is a subset of the existing span from the offset for a given count of the array. More... | |
| std::vector< DATA_TYPE > & | assignTo (std::vector< DATA_TYPE > &destination) const |
| Assign the contents of the span to the given vector replacing its contents Return the given vector. More... | |
| std::vector< DATA_TYPE > & | appendTo (std::vector< DATA_TYPE > &destination) const |
| Append the contents of the span to the end of the given vector Return the given vector. More... | |
Protected Attributes | |
| int | myCount |
| const DATA_TYPE * | myData |
A span represents a contiguous array of objects in memory.
The Span does not own the memory, but simply provides an array access to the objects contained in the underlying memory. It is a very lightweight class
|
inline |
default constructor
Referenced by Legion::Span< DATA_TYPE >::slice().
|
inline |
constructor for raw data
|
inline |
constructor for complete vector
|
inline |
destructor
|
inline |
copy constructor
References Legion::Span< DATA_TYPE >::myCount, and Legion::Span< DATA_TYPE >::myData.
|
inline |
Append the contents of the span to the end of the given vector Return the given vector.
References Legion::Span< DATA_TYPE >::data(), and Legion::Span< DATA_TYPE >::size().
|
inline |
Assign the contents of the span to the given vector replacing its contents Return the given vector.
References Legion::Span< DATA_TYPE >::data(), and Legion::Span< DATA_TYPE >::size().
|
inline |
Returns a pointer to the underlying data.
References Legion::Span< DATA_TYPE >::myData.
Referenced by Legion::Span< DATA_TYPE >::appendTo(), Legion::Span< DATA_TYPE >::assignTo(), processOwnershipAcquired(), and testPrivateData().
|
inline |
inequality operator
|
inline |
assignment operator
References Legion::Span< DATA_TYPE >::myCount, and Legion::Span< DATA_TYPE >::myData.
|
inline |
equality operator
References Legion::Span< DATA_TYPE >::myCount, and Legion::Span< DATA_TYPE >::myData.
|
inline |
Array access to the elements in the array.
References Legion::Span< DATA_TYPE >::myCount, and Legion::Span< DATA_TYPE >::myData.
|
inline |
Returns the count of objects in the array.
References Legion::Span< DATA_TYPE >::myCount.
Referenced by Legion::Span< DATA_TYPE >::appendTo(), Legion::Span< DATA_TYPE >::assignTo(), DtVehicleSim::detonationCb(), fireEventCallback(), processOwnershipAcquired(), Clutter::SimEngine::processPauseControls(), Clutter::SimEngine::processPlayControls(), and testPrivateData().
|
inline |
Returns the size of the array in bytes.
References Legion::Span< DATA_TYPE >::myCount.
|
inline |
Returns a new span that is a subset of the existing span from the offset to the end of the array.
References Legion::Span< DATA_TYPE >::myCount, Legion::Span< DATA_TYPE >::myData, and Legion::Span< DATA_TYPE >::Span().
|
inline |
Returns a new span that is a subset of the existing span from the offset for a given count of the array.
References Legion::Span< DATA_TYPE >::myCount, Legion::Span< DATA_TYPE >::myData, and Legion::Span< DATA_TYPE >::Span().
|
protected |
|
protected |