3ds Max C++ API Reference
Loading...
Searching...
No Matches
DelayedMatrix3::OpQueue Struct Reference

#include <control.h>

+ Inheritance diagram for DelayedMatrix3::OpQueue:

Public Types

typedef MaxSDK::Array< DelayedOpBaseClass
 
- Public Types inherited from Array< DelayedOp >
typedef int(__cdecl * CompareFnc) (const void *elem1, const void *elem2)
 Type of function to pass to sort().
 

Public Member Functions

 OpQueue ()
 
void Clear ()
 
int QCount () const
 
DelayedOpShift ()
 
void Push (DelayedOp &op)
 
- Public Member Functions inherited from Array< DelayedOp >
 Array ()
 Initializes an empty array.
 
 Array (size_t initUsedLength, const DelayedOp &defaultVal=DelayedOp(), size_t initGrowLength=kDefaultGrowthLength)
 Initializes an array with an initial size.
 
 Array (const Array< DelayedOp > &src)
 Copy constructor.
 
 Array (InputIt begin, InputIt end)
 Copy constructor.
 
 ~Array ()
 Destructor. Destroys every element stored in the array, and frees the allocated storage.
 
Array< DelayedOp > & operator= (const Array< DelayedOp > &src)
 Copy operator.
 
bool operator== (const Array< DelayedOp > &op) const
 Equality operator.
 
Array< DelayedOp > & setAt (size_t index, const DelayedOp &value)
 Sets a copy of value at the given index.
 
Array< DelayedOp > & setAll (const DelayedOp &value)
 Sets all the elements of the array to the given value.
 
bool isValidIndex (size_t) const
 Returns whether the given array index is valid for this array.
 
DelayedOp & operator[] (size_t i)
 Subscript operator.
 
const DelayedOp & operator[] (size_t i) const
 Subscript operator.
 
const DelayedOp & at (size_t index) const
 Same as subscript operator.
 
DelayedOp & at (size_t index)
 Same as subscript operator.
 
DelayedOp & first ()
 Accesses the first element in the array.
 
const DelayedOp & first () const
 Accesses the first element in the array.
 
DelayedOp * begin ()
 Accesses the begin iterator, which is a plain pointer in this case.
 
const DelayedOp * begin () const
 Accesses the const begin iterator, which is a plain pointer in this case.
 
DelayedOp & last ()
 Accesses the last element in the array.
 
const DelayedOp & last () const
 Accesses the first element in the array.
 
DelayedOp * end ()
 Accesses the end iterator (one past last valid element). Do not dereference.
 
const DelayedOp * end () const
 Accesses the const end iterator (one past last valid element). Do not dereference.
 
size_t append (const DelayedOp &value)
 Appends a copy of value to the array.
 
Array< DelayedOp > & append (const DelayedOp *values, size_t count)
 Appends one or more element(s) to the array.
 
Array< DelayedOp > & append (const Array< DelayedOp > &array)
 Appends the contents of another array to this array.
 
Array< DelayedOp > & insertAt (size_t index, const DelayedOp &value)
 Inserts a single value, at a given location, into this array.
 
Array< DelayedOp > & insertAt (size_t index, const DelayedOp *values, size_t count)
 Inserts a one or more value(s), at a given location, into this array.
 
Array< DelayedOp > & removeAt (size_t index)
 Removes a single element from the array.
 
bool remove (const DelayedOp &value, size_t start=0)
 Searches for a value in the array and, if it is found, removes it from the array.
 
Array< DelayedOp > & removeFirst ()
 Removes the first element of the array.
 
Array< DelayedOp > & removeLast ()
 Removes the last element of the array.
 
Array< DelayedOp > & removeAll ()
 Removes all the elements from the array.
 
Array< DelayedOp > & removeSubArray (size_t startIndex, size_t endIndex)
 Removes a subset of the array.
 
bool contains (const DelayedOp &value, size_t start=0) const
 Determines if a value is stored in the array.
 
bool find (const DelayedOp &value, size_t &foundAt, size_t start=0) const
 Searches for a value in the array.
 
size_t find (const DelayedOp &value) const
 Searches for a value in the array.
 
size_t findFrom (const DelayedOp &value, size_t start) const
 Searches for a value in the array, starting at a given index.
 
size_t length () const
 Returns the number of used elements (as opposed to simply allocated/reserved) in the array.
 
bool isEmpty () const
 Returns true if the number of used elements in the array is 0; returns false otherwise.
 
size_t lengthUsed () const
 Returns the number of elements used (as opposed to simply allocated/reserved) in the array.
 
Array< DelayedOp > & setLengthUsed (size_t length, const DelayedOp &defaultVal=DelayedOp())
 Sets the number of elements used (as opposed to simply allocated/reserved) in the array.
 
size_t lengthReserved () const
 Returns the number of elements allocated/reserved (as opposed to actually used) in the array.
 
Array< DelayedOp > & setLengthReserved (size_t length)
 Sets the number of elements allocated/reserved (as opposed to actually used) in the array.
 
void reserve (size_t capacity)
 Alias for setLengthReserved.
 
size_t growLength () const
 Returns the growth length of the array.
 
Array< DelayedOp > & setGrowLength (size_t)
 Sets the growth length of the array.
 
Array< DelayedOp > & reverse ()
 Reverses the sequence of elements in the array.
 
Array< DelayedOp > & swap (size_t i1, size_t i2)
 Swaps two elements in this array.
 
void sort (CompareFnc cmp)
 Sorts the elements of the array using a custom comparison function.
 
const DelayedOp * asArrayPtr () const
 Returns the array storage as a C-style array pointer.
 
DelayedOp * asArrayPtr ()
 Accesses the first element in the array.
 

Public Attributes

int head
 

Additional Inherited Members

- Static Public Member Functions inherited from MaxHeapOperators
static UtilExport voidoperator new (size_t size)
 Standard new operator used to allocate objects If there is insufficient memory, an exception will be thrown.
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e)
 Standard new operator used to allocate objects if there is insufficient memory, NULL will be returned.
 
static UtilExport voidoperator new (size_t size, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, an exception will be thrown.
 
static UtilExport voidoperator new (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate objects that takes the type of memory, filename and line number where the new was called If there is insufficient memory, an exception will be thrown.
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, NULL will be returned.
 
static UtilExport voidoperator new (size_t size, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, an exception will be thrown.
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, NULL will be returned.
 
static UtilExport voidoperator new[] (size_t size)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown.
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned.
 
static UtilExport voidoperator new[] (size_t size, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown.
 
static UtilExport voidoperator new[] (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate arrays of objects.
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned.
 
static UtilExport voidoperator new[] (size_t size, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown.
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned.
 
static UtilExport void operator delete (void *ptr)
 Standard delete operator used to deallocate an object If the pointer is invalid, an exception will be thrown.
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an object If the pointer is invalid, nothing will happen.
 
static UtilExport void operator delete (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown.
 
static UtilExport void operator delete (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an object that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown.
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen.
 
static UtilExport void operator delete (void *ptr, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown.
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, nothing will happen.
 
static UtilExport void operator delete[] (void *ptr)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, an exception will be thrown.
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, nothing will happen.
 
static UtilExport void operator delete[] (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown.
 
static UtilExport void operator delete[] (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown.
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen.
 
static UtilExport void operator delete[] (void *ptr, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown.
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown.
 
static UtilExport voidoperator new (size_t size, void *placement_ptr)
 Placement new operator.
 
static UtilExport void operator delete (void *ptr, void *placement_ptr)
 Placement delete operator.
 
static UtilExport voidaligned_malloc (size_t size, size_t alignment)
 Allocates memory on a specified alignment boundary.
 
static UtilExport voidaligned_realloc (void *ptr, size_t size, size_t alignment)
 Reallocates memory on a specified alignment boundary.
 
static UtilExport void aligned_free (void *ptr)
 Frees a block of memory that was allocated with aligned_malloc/aligned_realloc.
 
- Protected Types inherited from Array< DelayedOp >
enum  
 
- Static Protected Member Functions inherited from Array< DelayedOp >
static size_t quickSortPartition (DelayedOp *data, size_t first, size_t last, CompareFnc cmp)
 The partition portion of the QuickSort algorithm.
 
static void quickSortRecursive (DelayedOp *data, size_t first, size_t last, CompareFnc cmp)
 Recursive QuickSort function used to sort the elements of the array.
 
static void handleOutOfMemory ()
 Utility function, called when the array fails to allocate memory.
 
static DelayedOp * ArrayAllocate (size_t len)
 Allocates an array of elements without constructing them.
 
static void ArrayConstruct (DelayedOp *arrayBegin, size_t len, const DelayedOp &defaultVal)
 Constructs an array of elements.
 
static void ArrayDeAllocate (DelayedOp *arrayBegin)
 De-allocates an array of elements without destructing them.
 
static void ArrayDestruct (DelayedOp *arrayBegin, size_t len)
 Destructs an array of elements.
 
static void ArrayCopy (DelayedOp *pCopy, size_t nMaxCount, const DelayedOp *pSource, size_t nCount)
 Copies an array of elements to an already-constructed buffer.
 
static void ArrayCopyOverlap (DelayedOp *pCopy, size_t nMaxCount, const DelayedOp *pSource, size_t nCount)
 Copies an array of elements when the target and destination memory buffers may overlap.
 
static void ArrayCopyConstruct (DelayedOp *pCopy, size_t nMaxCount, const DelayedOp *pSource, size_t nCount)
 Copies and array of elements to a non-constructed.
 
- Protected Attributes inherited from Array< DelayedOp >
DelayedOp * mpArray
 Pointer to the storage buffer.
 
size_t mReservedLen
 The reserved length (in number of elements, not bytes).
 
size_t mUsedLen
 The used length (in number of elements, not bytes).
 
size_t mGrowLen
 The growth length. See setGrowLength().
 

Member Typedef Documentation

◆ BaseClass

Constructor & Destructor Documentation

◆ OpQueue()

OpQueue ( )
inline
320: BaseClass(), head(0) {}
int head
Definition: control.h:319
MaxSDK::Array< DelayedOp > BaseClass
Definition: control.h:318

Member Function Documentation

◆ Clear()

void Clear ( )
inline
321{ removeAll(); head = 0; }
Array< DelayedOp > & removeAll()
Removes all the elements from the array.
Definition: Array.inline.h:336

◆ QCount()

int QCount ( ) const
inline
322{ return (int)(BaseClass::length() - head); }
size_t length() const
Returns the number of used elements (as opposed to simply allocated/reserved) in the array.
Definition: Array.inline.h:160

◆ Shift()

DelayedOp & Shift ( )
inline
323{ return BaseClass::operator[](head++); }
DelayedOp & operator[](size_t i)
Subscript operator.
Definition: Array.inline.h:201

◆ Push()

void Push ( DelayedOp op)
inline
324{ append(op); }
size_t append(const DelayedOp &value)
Appends a copy of value to the array.
Definition: Array.inline.h:313

Member Data Documentation

◆ head

int head