NonConstArray< TYPE > Class Template Reference 系统
#include <string.h>
Helper class for the WritableArrayInterface macro. A WritableArrayInterface& parameter is actually a const NonConstArray & parameter, so temporary objects resulting from a conversion of some array to the NonConstArray interface may be bound to such a parameter (this wouldn't be possible if the parameter was non-const). To be able to invoke modifying functions on such a parameter, those functions are implemented as const functions in this class.
Public Types |
|
using | Super = ArrayInterface < TYPE > |
using | ConstIterator = typename Super::Iterator |
公共成员函数 |
|
const NonConstArray & | ToArray () const |
NonConstArray & | ToArray () |
operator const NonConstArray< typename std::conditional< STD_IS_REPLACEMENT (same, TYPE, Generic) | |
Generic ::type &const TYPE & | operator[] ( Int index) const |
Int | GetBlock ( Int index, Block < TYPE, false > &block) const |
Int | GetBlock ( Int index, Block < TYPE, true > &block) const |
ResultMem | Resize ( Int count, COLLECTION_RESIZE_FLAGS resizeFlags= COLLECTION_RESIZE_FLAGS::DEFAULT ) const |
ResultMem | SetCapacityHint ( Int requestedCapacity, COLLECTION_RESIZE_FLAGS resizeFlags= COLLECTION_RESIZE_FLAGS::ON_GROW_RESERVE_CAPACITY ) const |
ResultRef < TYPE > | Insert ( Int index) const |
ResultMem | Insert ( Int index, const Block < const TYPE > &values) const |
ResultMem | Insert ( Int index, const MoveBlock < TYPE > &values) const |
ResultRef < TYPE > | Append () const |
ResultRef < TYPE > | Append (const TYPE &value) const |
ResultRef < TYPE > | Append (TYPE &&value) const |
template<typename T > | |
ResultRef < TYPE > | Append (T &&value) const |
ResultMem | Erase ( Int index, Int count=1) const |
ResultMem | SwapErase ( Int index, Int count=1) const |
void | 重置 () const |
void | Flush () const |
Result < void > | CopyFrom (const Super &other) const |
ConstIterator | Begin () const |
ConstIterator | End () const |
template<typename COLLECTION2 > | |
Result < void > | AppendAll (COLLECTION2 &&other, COLLECTION_RESIZE_FLAGS resizeFlags= COLLECTION_RESIZE_FLAGS::ON_GROW_RESERVE_CAPACITY ) const |
template<typename COLLECTION2 > | |
Result < void > | CopyFrom (COLLECTION2 &&other, COLLECTION_RESIZE_FLAGS resizeFlags= COLLECTION_RESIZE_FLAGS::FIT_TO_SIZE ) const |
Public Attributes |
|
DummyReturnType |
Protected Member Functions |
|
NonConstArray (const typename Super::MTable &vtable) | |
~NonConstArray () |
私有成员函数 |
|
MAXON_DISALLOW_COPY_AND_ASSIGN ( NonConstArray ) |
using Super = ArrayInterface <TYPE> |
using ConstIterator = typename Super::Iterator |
|
explicit protected |
|
protected |
const NonConstArray & ToArray | ( | ) | const |
NonConstArray & ToArray | ( | ) |
operator const NonConstArray < typename std::conditional< STD_IS_REPLACEMENT | ( | same | , |
TYPE | , | ||
Generic | |||
) |
Generic ::type& const TYPE& operator[] | ( | Int | index | ) | const |
Int GetBlock | ( | Int | index , |
Block < TYPE, false > & | block | ||
) | const |
Int GetBlock | ( | Int | index , |
Block < TYPE, true > & | block | ||
) | const |
ResultMem Resize | ( | Int | count , |
COLLECTION_RESIZE_FLAGS |
resizeFlags
=
COLLECTION_RESIZE_FLAGS::DEFAULT
|
||
) | const |
ResultMem SetCapacityHint | ( | Int | requestedCapacity , |
COLLECTION_RESIZE_FLAGS |
resizeFlags
=
COLLECTION_RESIZE_FLAGS::ON_GROW_RESERVE_CAPACITY
|
||
) | const |
ResultRef <TYPE> Insert | ( | Int | index | ) | const |
ResultMem Insert | ( | Int | index , |
const Block < const TYPE > & | values | ||
) | const |
ResultMem Insert | ( | Int | index , |
const MoveBlock < TYPE > & | values | ||
) | const |
ResultRef <TYPE> Append | ( | ) | const |
ResultRef <TYPE> Append | ( | const TYPE & | value | ) | const |
ResultRef <TYPE> Append | ( | TYPE && | value | ) | const |
ResultRef <TYPE> Append | ( | T && | value | ) | const |
ResultMem Erase | ( | Int | index , |
Int |
count
=
1
|
||
) | const |
ResultMem SwapErase | ( | Int | index , |
Int |
count
=
1
|
||
) | const |
void Reset | ( | ) | const |
void Flush | ( | ) | const |
Result <void> CopyFrom | ( | const Super & | other | ) | const |
ConstIterator Begin | ( | ) | const |
ConstIterator End | ( | ) | const |
Result <void> AppendAll | ( | COLLECTION2 && | other , |
COLLECTION_RESIZE_FLAGS |
resizeFlags
=
COLLECTION_RESIZE_FLAGS::ON_GROW_RESERVE_CAPACITY
|
||
) | const |
Result <void> CopyFrom | ( | COLLECTION2 && | other , |
COLLECTION_RESIZE_FLAGS |
resizeFlags
=
COLLECTION_RESIZE_FLAGS::FIT_TO_SIZE
|
||
) | const |
|
private |
DummyReturnType |