-
首页
-
C4D R23.110 C++ SDK
详细描述
Classes
|
class
|
ArrayMapSortedArray< ARRAY, ENTRY, COMPARE >
|
class
|
ArrayMapHelper< K, V, SORTED, COMPARE, ARRAY >
|
class
|
ArrayMapHelper< K, V, true, COMPARE, ARRAY >
|
class
|
ArrayMap< K, V, SORTED, COMPARE, ARRAY >
|
class
|
ArrayMapSelector< SORTED, COMPARE, ARRAY >
|
class
|
ArraySet< T, SORTED, COMPARE, ARRAY >
|
class
|
BaseArray< T, MINCHUNKSIZE, MEMFLAGS, ALLOCATOR >
|
struct
|
GenericCastMemberTrait< BaseArray< TO >, BaseArray< FROM >, SAFE >
|
class
|
BaseArraySelector< MINCHUNKSIZE, MEMFLAGS, ALLOCATOR >
|
class
|
BufferedBaseArraySelector< COUNT, MINCHUNKSIZE, MEMFLAGS, ALLOCATOR >
|
struct
|
IsZeroInitialized< BaseArray< T, MINCHUNKSIZE, MEMFLAGS, ALLOCATOR > >
|
class
|
BaseBitSet< ALLOCATOR >
|
struct
|
BaseListLinkPOD
|
class
|
BaseListLink< NODE >
|
class
|
BaseListNodeBase< NODE >
|
class
|
BaseListNode< T, hasCopyFrom >
|
class
|
BaseListNode< T, false >
|
class
|
BaseListNode< T, true >
|
class
|
BaseListNode< EmptyClass, false >
|
class
|
BaseListHead< T, NODE >
|
class
|
BaseList< T, NODE, HEAD, ALLOCATOR >
|
class
|
BaseListLegacyNode< T >
|
class
|
WeakRef< REFERENCE >
|
class
|
BaseRef< T, HANDLER >
|
class
|
PointerHandler
|
class
|
StrongRefHandler
|
class
|
StrongCOWRefHandler
|
class
|
StrongACOWRefHandler
|
class
|
UniqueRefHandler
|
struct
|
RawMem< T >
|
class
|
BaseRef< RawMem< T >, H >
|
class
|
BlockBase< T, STRIDED >
|
class
|
BlockBase< T, false >
|
class
|
BaseIterator< COLLECTION, STRIDED >
|
class
|
BaseIterator< COLLECTION, true >
|
class
|
Block< T, STRIDED, MOVE >
|
class
|
Block< Byte, false, false >
|
class
|
Block< const Byte, false, false >
|
struct
|
CArray< T, N >
|
class
|
BlockArray< T, BLOCK_SIZE_EXPONENT, MEMFLAGS, ALLOCATOR >
|
class
|
BlockArraySelector< BLOCK_SIZE_EXPONENT, MEMFLAGS, ALLOCATOR >
|
class
|
PointerBurstTriePool< NODE, BUCKET >
|
class
|
ElementPool< T, INDEX >
|
class
|
ArrayBurstTriePool< NODE, BUCKET >
|
struct
|
BurstTrieNode< GROUP_BITS, INDEX >
|
struct
|
BurstTrieBucket< K, V, SIZE >
|
struct
|
BurstTrieBucket< K, UnitType, SIZE >
|
class
|
BurstTrieMap< K, V, GROUP_BITS, BUCKET_SIZE, SORT, POOL >
|
class
|
BurstTrieMapSelector< GROUP_BITS, BUCKET_SIZE, SORT, POOL >
|
class
|
BurstTrieSet< T, GROUP_BITS, BUCKET_SIZE, SORT, POOL >
|
class
|
PrivateGetMapKeyHelper
|
class
|
PrivateGetMapKey< C >
|
class
|
GetCollectionKind< COLLECTION, typename SFINAEHelper< void, typename std::decay< COLLECTION >::type::IsCollection >::type >
|
class
|
BaseCollection< COLLECTION, SUPER >
|
class
|
Collection< COLLECTION, VALUETYPE, SUPER >
|
class
|
BlockIterator< COLLECTION, VALUETYPE, CONSTITERATOR, STRIDED >
|
class
|
ArrayBase0< COLLECTION, VALUETYPE, SUPER, HASH >
|
class
|
ArrayImpl< ARRAY >
|
class
|
ArrayBase< COLLECTION, VALUETYPE, SUPER, HASH >
|
class
|
SetBase0< COLLECTION, VALUETYPE, SUPER, HASH >
|
class
|
SetImpl< SET >
|
class
|
SetBase< COLLECTION, VALUETYPE, SUPER, HASH >
|
class
|
MapBase0< COLLECTION, KEYTYPE, VALUETYPE, SUPER, HASH >
|
class
|
MapImpl< MAP >
|
class
|
MapBase< COLLECTION, KEYTYPE, VALUETYPE, SUPER, HASH >
|
class
|
ContiguousRangeMap< K, V, MAP >
|
class
|
FixedSizeBitSet< EXPONENT >
|
struct
|
GetIteratorType< C >
|
struct
|
GetIteratorType< T[N]>
|
class
|
ReverseIterator< IT >
|
class
|
ForEachIterator< ITERATOR, SUPER >
|
class
|
AutoIterator< C >
|
class
|
AutoIterator< T[N]>
|
class
|
NestedForEachIterator< I1, I2 >
|
class
|
CommonIteratorTypes< T, I1, I2 >
|
class
|
CommonIteratorTypes< void, I1, I2 >
|
class
|
ConcatForEachIterator< T, I1, I2 >
|
class
|
ConditionalForEachIterator< T, I1, I2 >
|
class
|
MapForEachIterator< MAP, I >
|
class
|
FilterForEachIterator< FILTER, I >
|
class
|
ZipForEachIterator< I1, I2 >
|
class
|
IndexForEachIterator< I >
|
class
|
SingletonForEachIterator< T >
|
class
|
EraseIterator< COLLECTION, SWAP_ERASE, IS_FOREACH_ITERATOR >
|
class
|
EraseIterator< COLLECTION, SWAP_ERASE, false >
|
class
|
Iterable
|
class
|
GenericBaseArray
|
class
|
HashBitSet< BASE_SET, INT_TYPE >
|
struct
|
DefaultHashMapEntryHandlerBase
|
struct
|
HashMapKeyValuePair
|
struct
|
HashMapValueKeyPair
|
struct
|
HashMapKeyHashValuePair
|
class
|
HashMapEntryBase< K, V, ENTRY, ENTRY_HANDLER, LAYOUT >
|
class
|
HashMapEntryBase< K, V, ENTRY, ENTRY_HANDLER, HASHMAP_ENTRY_LAYOUT::KEY_VALUE >
|
class
|
HashMapEntryBase< K, V, ENTRY, ENTRY_HANDLER, HASHMAP_ENTRY_LAYOUT::KEY_HASH_VALUE >
|
class
|
HashMapEntryBase< K, V, ENTRY, ENTRY_HANDLER, HASHMAP_ENTRY_LAYOUT::VALUE_KEY >
|
class
|
HashMapEntryBase< K, UnitType, ENTRY, ENTRY_HANDLER, HASHMAP_ENTRY_LAYOUT::KEY_VALUE >
|
class
|
HashMapEntryBase< K, UnitType, ENTRY, ENTRY_HANDLER, HASHMAP_ENTRY_LAYOUT::KEY_HASH_VALUE >
|
class
|
HashMapEntryBase< K, UnitType, ENTRY, ENTRY_HANDLER, HASHMAP_ENTRY_LAYOUT::VALUE_KEY >
|
class
|
HashMap< K, V, HASH, ENTRY_HANDLER, ALLOCATOR, MODE, INITIAL_CAPACITY, LOAD_FACTOR >
|
class
|
HashMapSelector< HASH, ENTRY_HANDLER, ALLOCATOR, MODE, INITIAL_CAPACITY, LOAD_FACTOR >
|
struct
|
GenericCastMemberTrait< HashMap< K_TO, V_TO >, HashMap< K_FROM, V_FROM >, SAFE >
|
class
|
HashSet< T, HASH, ENTRY_HANDLER, ALLOCATOR, MODE, INITIAL_CAPACITY, LOAD_FACTOR >
|
struct
|
GenericCastMemberTrait< HashSet< TO >, HashSet< FROM >, SAFE >
|
class
|
HashMapStatistics
|
class
|
HybridMap< K, V, SMALL, LARGE, THRESHOLD, REVERSE_THRESHOLD >
|
class
|
HybridMapSelector< SMALL, LARGE, THRESHOLD, REVERSE_THRESHOLD >
|
class
|
HybridSet< T, SMALL, LARGE, THRESHOLD, REVERSE_THRESHOLD >
|
class
|
IndexIteratorDefaultAccess
|
class
|
IndexIterator< T, ARRAY, ACCESS >
|
class
|
OpaqueBase
|
class
|
ParallelSort< SORTCLASS, FLAGS, PARALLELIZATION_THRESHOLD >
|
class
|
SimpleParallelSort< COMPARE, FLAGS >
|
class
|
PointerArray< T, MINCHUNKSIZE, ALLOCATOR >
|
struct
|
RangeSetPair< K >
|
class
|
RangeMap< K, V, MAP >
|
class
|
RangeSet< T, MAP >
|
class
|
RefCountHashMapDefaultHandler
|
class
|
RefCountHashMap< K, V, HASH, HANDLER >
|
class
|
HelperClass< SORTCLASS, ITERATOR, CONTENT, FLAGS >
|
class
|
BaseSort< SORTCLASS, FLAGS >
|
class
|
SimpleSort< COMPARE, FLAGS >
|
class
|
HelperClass< SORTCLASS, ITERATOR, CONTENT, BASESORTFLAGS::NONE >
|
class
|
HelperClass< SORTCLASS, ITERATOR, CONTENT, BASESORTFLAGS::MOVEANDCOPYOBJECTS >
|
class
|
SortedArray< MYSELF, ARRAY, FLAGS, PARALLEL >
|
class
|
DefaultSortedArray< T >
|
class
|
TaggedBaseRef< T, HANDLER, TAG, TAG_BITS, DEFAULT_VALUE, ENABLE_POINTER_CONVERSION >
|
class
|
ThreadSafePtr< POINTER >
|
class
|
ThreadSafeRef< REFERENCE >
|
struct
|
WeakRefBase
|
struct
|
WeakRefTargetBase
|
struct
|
MemoryMetadataProxy
|
class
|
WeakRefServices
|
class
|
PerformanceBaseArray< T, MINCHUNKSIZE, MEMFLAGS, Allocator >
|
struct
|
KDTreeNode
|
struct
|
KDTreeNearest
|
struct
|
KDStackArray
|
class
|
KDTree
|
Typedefs
|
template<typename T , Int COUNT, Int MINCHUNKSIZE = COUNT, BASEARRAYFLAGS MEMFLAGS = BASEARRAYFLAGS::NONE, typename ALLOCATOR = DefaultAllocator>
|
using
|
BufferedBaseArray
= typename
BufferedBaseArraySelector
< COUNT, MINCHUNKSIZE, MEMFLAGS, ALLOCATOR >::template Type< T >
|
template<typename T >
|
using
|
Pointer
=
BaseRef
< T,
PointerHandler
>
|
template<typename T >
|
using
|
UniqueRef
=
BaseRef
< T,
UniqueRefHandler
>
|
template<typename T >
|
using
|
StrongRef
=
BaseRef
< T,
StrongRefHandler
>
|
template<typename T >
|
using
|
StrongCOWRef
=
BaseRef
< const T,
StrongCOWRefHandler
>
|
template<typename T >
|
using
|
AutoMem
=
UniqueRef
<
RawMem
< T > >
|
template<typename T >
|
using
|
StridedBlock
=
Block
< T, true >
|
template<typename T , Bool STRIDED = false>
|
using
|
MoveBlock
=
Block
< T, STRIDED, true >
|
using
|
OpaqueRef
=
StrongRef
<
OpaqueBase
>
|
using
|
MemoryObserverCallback
=
MEMORY_OBSERVER_FLAGS
(*)(void *callbackData, const void *target,
MEMORY_OBSERVER_STATE
state)
|
using
|
MemoryMetadataDestructor
= void(*)(void *metadata)
|
Enumerations
|
enum
|
BASEARRAYFLAGS
{
NONE
,
MOVEANDCOPYOBJECTS
}
|
enum
|
BLOCKARRAYFLAGS
{
NONE
,
MOVEANDCOPYOBJECTS
,
NOINSERTERASE
,
GROW_SLOWLY
}
|
enum
|
BURSTTRIE_SORT
{
NONE
,
LINEAR_SEARCH
,
BINARY_SEARCH
}
|
enum
|
COLLECTION_RESIZE_FLAGS
{
NONE
,
ON_SHRINK_KEEP_CAPACITY
,
ON_SHRINK_FIT_TO_SIZE
,
ON_GROW_RESERVE_CAPACITY
,
ON_GROW_FIT_TO_SIZE
,
ON_GROW_UNINITIALIZED
,
ON_GROW_UNSPECIFIED
,
ON_RESIZE_UNSPECIFIED
,
FIT_TO_SIZE
,
DEFAULT
,
POD_UNINITIALIZED
}
|
enum
|
HASHMAP_ENTRY_LAYOUT
{
KEY_VALUE
,
KEY_HASH_VALUE
,
VALUE_KEY
,
VALUE
}
|
enum
|
HASHMAP_MODE
{
DEFAULT
,
SYNCHRONIZED
,
NO_NONEMPTY_BUCKET_TABLE
}
|
enum
|
BASESORTFLAGS
{
NONE
,
MOVEANDCOPYOBJECTS
}
|
enum
|
MEMORY_OBSERVER_FLAGS
: Int {
DEFAULT
,
CLAIM_SHARED_OWNERSHIP
,
CLAIM_EXCLUSIVE_OWNERSHIP
,
KEEP_OBSERVER
,
INVOKE_WITH_UNLOCKED_TARGET
}
|
enum
|
MEMORY_OBSERVER_STATE
: Int {
DEFAULT
,
TARGET_IS_LOCKED
,
TARGET_HAS_EXCLUSIVE_OWNERSHIP
}
|
函数
|
enum
maxon::BASEARRAYFLAGS
|
MAXON_ENUM_FLAGS
(
BASEARRAYFLAGS
)
|
template<typename T >
|
T *
|
PrivateInitCopy
(void *ptr, const T &
src
)
|
template<typename T , Int N>
|
Block
< T >
|
ToBlock
(T(&array)[N])
|
template<typename T >
|
Block
< typename
maxon::details::BlockType
< T >::type >
|
ToBlock
(T *ptr,
Int
size)
|
template<typename T >
|
Block
< T >
|
ToSingletonBlock
(T &value)
|
template<typename T >
|
Block
< const T >
|
ToSingletonBlock
(const T &value)
|
template<typename T >
|
StridedBlock
< typename
maxon::details::BlockType
< T >::type >
|
ToBlock
(T *ptr,
Int
size,
Int
stride)
|
Block
< const
Char
>
|
CharToBlock
(const
Char
*str)
|
Block
< const
UChar
>
|
CharToBlock
(const
UChar
*str)
|
template<Int N>
|
Block
< const
Char
>
|
CharToBlock
(const
Char
(&str)[N])
|
template<Int N>
|
Block
< const
UChar
>
|
CharToBlock
(const
UChar
(&str)[N])
|
template<Int N>
|
Block
< const
Utf32Char
>
|
CharToBlock
(const
Utf32Char
(&str)[N])
|
enum
maxon::BLOCKARRAYFLAGS
|
MAXON_ENUM_FLAGS
(
BLOCKARRAYFLAGS
)
|
enum
maxon::BURSTTRIE_SORT
|
MAXON_ENUM_LIST
(
BURSTTRIE_SORT
)
|
template<typename C >
|
Int
|
PrivateGetCount
(const C &collection,
OverloadRank0
)
|
template<typename T , Int N>
|
Int
|
PrivateGetCount
(T(&array)[N],
OverloadRank1
)
|
template<typename C >
|
SFINAEHelper
<
Int
, typename C::IsCollection >::type
|
PrivateGetCount
(const C &collection,
OverloadRank2
)
|
template<typename ITERABLE >
|
Int
|
GetCount
(const ITERABLE &iterable)
|
template<typename SET , typename KEY >
|
MAXON_ATTRIBUTE_FORCE_INLINE
Bool
|
PrivateContains
(const SET &set, const KEY &key,
OverloadRank0
)
|
template<typename T , Int N, typename KEY >
|
Bool
|
PrivateContains
(T(&array)[N], const KEY &key,
OverloadRank1
)
|
template<typename SET , typename KEY >
|
MAXON_ATTRIBUTE_FORCE_INLINE
auto
|
PrivateContains
(const SET &set, const KEY &key,
OverloadRank1
) -> decltype(set.Contains(key))
|
template<typename SET , typename KEY >
|
MAXON_ATTRIBUTE_FORCE_INLINE
SFINAEHelper
<
Bool
, typename SET::IsCollection >::type
|
PrivateContains
(const SET &set, const KEY &key,
OverloadRank2
)
|
template<typename PREDICATE , typename KEY >
|
MAXON_ATTRIBUTE_FORCE_INLINE
Bool
|
Contains
(const PREDICATE &predicate, const KEY &key)
|
template<typename COMPARE , typename T1 , typename T2 >
|
MAXON_ATTRIBUTE_FORCE_INLINE
Bool
|
PrivateIsEqual
(COMPARE &&cmp, const T1 &a, const T2 &b,
OverloadRank0
)
|
template<typename COMPARE , typename T1 , typename T2 >
|
MAXON_ATTRIBUTE_FORCE_INLINE
auto
|
PrivateIsEqual
(COMPARE &&cmp, const T1 &a, const T2 &b,
OverloadRank1
) -> decltype(cmp.IsEqual(a, b))
|
template<typename PREDICATE , typename T1 , typename T2 >
|
MAXON_ATTRIBUTE_FORCE_INLINE
Bool
|
IsEqual
(PREDICATE &&predicate, const T1 &a, const T2 &b)
|
|
MAXON_MEMBERTYPE_DETECTOR
(IsCollection, IsCollection, std::false_type)
|
enum
maxon::COLLECTION_RESIZE_FLAGS
|
MAXON_ENUM_FLAGS
(
COLLECTION_RESIZE_FLAGS
, "net.maxon.datatype.enum.collection_resize_flags", EARLY)
|
template<typename COLLECTION , typename T >
|
std::conditional<!
STD_IS_REPLACEMENT
(reference, COLLECTION) &&(
GetCollectionKind
< COLLECTION >::value !=
COLLECTION_KIND::NONE
), T &&, T & >::type
|
ValueForward
(T &x)
|
template<typename COLLECTION , typename T , Bool STRIDED>
|
const
Block
< T, STRIDED, !
STD_IS_REPLACEMENT
(reference, COLLECTION) &&(
GetCollectionKind
< COLLECTION >::value !=
COLLECTION_KIND::NONE
)> &
|
BlockForward
(const
Block
< T, STRIDED > &block)
|
template<typename COLLECTION >
|
COLLECTION &&
|
PrivateGetMap
(COLLECTION &&c,
OverloadRank0
)
|
template<typename COLLECTION >
|
Substitute
< COLLECTION &&, typename std::remove_reference< COLLECTION >::type::MapType >::type
|
PrivateGetMap
(COLLECTION &&c,
OverloadRank1
)
|
|
MAXON_MEMBERTYPE_DETECTOR
(GetNonConstIteratorType, Iterator, std::false_type)
|
|
MAXON_MEMBERTYPE_DETECTOR
(GetConstIteratorType, ConstIterator, std::false_type)
|
|
MAXON_MEMBERTYPE_DETECTOR
(GetCollectionType, CollectionType, T)
|
|
MAXON_MEMBERTYPE_DETECTOR
(IsForEachIterator, IsForEachIterator, std::false_type)
|
template<typename I >
|
ReverseIterator
< typename
GetIteratorType
< typename std::remove_reference< I >::type >::type >
|
RBegin
(I &&iterable)
|
template<typename I >
|
ReverseIterator
< typename
GetIteratorType
< typename std::remove_reference< I >::type >::type >
|
REnd
(I &&iterable)
|
template<typename COLLECTION >
|
MAXON_ATTRIBUTE_FORCE_INLINE
auto
|
begin
(COLLECTION &&c) -> decltype(c.Begin())
|
template<typename COLLECTION >
|
MAXON_ATTRIBUTE_FORCE_INLINE
auto
|
end
(COLLECTION &&c) -> decltype(c.End())
|
enum
maxon::HASHMAP_ENTRY_LAYOUT
|
MAXON_ENUM_LIST
(
HASHMAP_ENTRY_LAYOUT
)
|
enum
maxon::HASHMAP_MODE
|
MAXON_ENUM_LIST
(
HASHMAP_MODE
)
|
template<typename RANGETYPE >
|
Int
|
GetRangeItemCount
(const RANGETYPE &data)
|
enum
maxon::BASESORTFLAGS
|
MAXON_ENUM_FLAGS
(
BASESORTFLAGS
)
|
template<typename T , typename HANDLER , typename TAG , Int TAG_BITS, TAG DEFAULT_VALUE, Bool ENABLE_POINTER_CONVERSION>
|
SFINAEHelper
<
String
, T >::type
|
ToString
(const
TaggedBaseRef
< T, HANDLER, TAG, TAG_BITS, DEFAULT_VALUE, ENABLE_POINTER_CONVERSION > &object, const
FormatStatement
*formatStatement,
Bool
checkDataType=true)
|
|
MAXON_ASSERT_STANDARD_LAYOUT
(
WeakRefBase
)
|
|
MAXON_ASSERT_STANDARD_LAYOUT
(
WeakRefTargetBase
)
|
enum
maxon::MEMORY_OBSERVER_FLAGS
Int
|
MAXON_ENUM_FLAGS
(
MEMORY_OBSERVER_FLAGS
)
|
enum
maxon::MEMORY_OBSERVER_STATE
Int
|
MAXON_ENUM_FLAGS
(
MEMORY_OBSERVER_STATE
)
|
Block
< const
Char
>
|
ToBlock
() const
|
MAXON_ATTRIBUTE_NO_INLINE
void
|
DoSort
() const
|
Macro Definition Documentation
◆
IMPLEMENT_CUSTOM_BASELISTNODE
#define IMPLEMENT_CUSTOM_BASELISTNODE
|
(
|
|
NODE,
|
|
|
|
linkPtr
|
|
)
|
|
|
Use this macro to implement custom BaseListNodes where T and NODE are equal. NODE is the name of the class and linkPtr is the address of the BaseListLinkPOD.
Don't forget that your custom node must have a destructor which has to call this->
Remove()
.
If you want to implement legacy stile GetNext() or GetPrev() you must check IsListHead() when using _GetNext() or _GetPrev().
◆
NewObjCopy
#define NewObjCopy
|
(
|
|
T,
|
|
|
|
SRC
|
|
)
|
|
|
◆
PRIVATE_MAXON_C_ARRAY_B
#define PRIVATE_MAXON_C_ARRAY_B
|
(
|
|
count,
|
|
|
|
T,
|
|
|
|
...
|
|
)
|
|
|
◆
PRIVATE_MAXON_C_ARRAY_A
#define PRIVATE_MAXON_C_ARRAY_A
|
(
|
|
count,
|
|
|
|
T,
|
|
|
|
...
|
|
)
|
|
|
◆
MAXON_C_ARRAY
#define MAXON_C_ARRAY
|
(
|
|
T,
|
|
|
|
...
|
|
)
|
|
|
Returns a CArray of type T. The number of elements is automatically determined. The macro can be used to specify an argument for a function parameter of Block type directly in the function call as in
void
Func(
const
Block<const Int>& values);
Func(
MAXON_C_ARRAY
(
Int
, 1, 4, 42));
-
参数
-
[in]
|
T
|
Type of the array elements.
|
[in]
|
...
|
Values for the array elements.
|
Typedef Documentation
◆
BufferedBaseArray
BufferedBaseArray is a
maxon::BaseArray
which uses a
maxon::FixedBufferAllocator
. The allocator's buffer lies within the BufferedBaseArray, so no dynamic memory allocation is needed as long as the reserved space suffices. This can greatly improve performance if the number of elements in an array is usually small.
You shouldn't reserve a large amount of elements, and you shouldn't use
BufferedBaseArray
if it is likely that the reserved space won't be enough. E.g., the ports of a node are typically small in number, so a BufferedBaseArray can be used. But the points of polygon object are typically large in number, so don't use a BufferedBaseArray.
范例:
BufferedBaseArray<Utf32Char, 256> buffer;
-
Template Parameters
-
T
|
Type of the array elements.
|
COUNT
|
Number of elements of the internal buffer.
|
MINCHUNKSIZE
|
The minimum number of elements upon array creation.
|
MEMFLAGS
|
使用
BASEARRAYFLAGS::NONE
unless you know the object can be moved and/or copied.
|
ALLOCATOR
|
Class
for memory allocation if the internal buffer doesn't suffice.
|
◆
Pointer
The Pointer template behaves almost identical to an ordinary C++ pointer, with the exception that the default constructor automatically initializes the pointer with nullptr, and the destructor automatically resets the pointer to nullptr. Pointer is a template based on
BaseRef
with
PointerHandler
as template argument. As such, you can also use the helper methods of
BaseRef
for object creation, movement etc.
◆
UniqueRef
The UniqueRef template stores a pointer to an object (usually obtained by
NewObj()
), and it automatically deletes the object on destruction or reset by means of
DeleteObj()
. So you don't have to take care of the rather error-prone manual deleting of objects. Note that this behavior means that UniqueRef has the sole ownership on the object. You cannot have more than one UniqueRef pointing to the same Object. UniqueRef is a template based on
BaseRef
with
UniqueRefHandler
as template argument. As such, you can also use the helper methods of
BaseRef
for object creation, movement etc.
-
Template Parameters
-
T
|
Type of the object the UniqueRef points to.
|
◆
StrongRef
A StrongReference can point to a target object and ensures that the target object exists as long as there are strong references to it. As soon as there are no more strong references pointing to it the target object will be destructed.
-
Template Parameters
-
T
|
Type of the target object for the strong reference.
|
-
注意
-
The strong reference is implemented via a
BaseRef
.
◆
StrongCOWRef
A StrongCOWRef shares the basic behaviour of a StrongReference, but it supports copy-on-write semantics: If a modification of the object is to be made through the reference or if MakeWritable() is invoked, a copy of the object is made unless the reference is exclusive. This ensures that other COW references to the object aren't affected by the modification. If the allocation of a copy fails the reference will be set to null.
-
Template Parameters
-
T
|
Type of the target object for the strong reference.
|
-
注意
-
The strong reference is implemented via a
BaseRef
.
◆
AutoMem
◆
StridedBlock
◆
MoveBlock
MoveBlock is a type alias for a
Block
with the MOVE template parameter set to true. MoveBlock can be used for function parameters where the values of the block may be moved to another place by the function. This prevents accidental moves of temporary Blocks (e.g. those returend by
ToBlock()
) which would happen with
Block
&&.
-
Template Parameters
-
T
|
Type of elements of the block.
|
STRIDED
|
True if a stride other than
SIZEOF(T)
shall be supported.
|
◆
OpaqueRef
A strong reference to a hidden class.
◆
MemoryObserverCallback
◆
MemoryMetadataDestructor
Enumeration Type Documentation
◆
BASEARRAYFLAGS
Flags for the behaviour of
BaseArray
when moving objects, can be used to force memcpy/memmove/realloc.
Enumerator
|
NONE
|
Use constructor/destructor or move operator unless the type is trivially copyable using memcpy, memmove or realloc.
|
MOVEANDCOPYOBJECTS
|
Elements are PODs and can be copied using memcpy and moved using memmove/realloc (for Resize, Insert, Erase, Append etc.). Overrides the setting of std::is_trivially_copyable<T>
|
◆
BLOCKARRAYFLAGS
Flags for the behaviour of
BlockArray
when moving objects (only relevant for Insert() and Erase()).
Enumerator
|
NONE
|
Use constructor/destructor or move operator unless the type is trivially copyable using memcpy, memmove or realloc.
|
MOVEANDCOPYOBJECTS
|
Elements are PODs and can be copied using memcpy and moved using memmove/realloc (for Resize, Insert, Erase, Append etc.). Overrides the setting of std::is_trivially_copyable<T>.
|
NOINSERTERASE
|
Do not support Insert() and Erase() (will make the subscript operator faster).
|
GROW_SLOWLY
|
The first block will increase its size gradually (and might move memory) until it reaches 1 << BLOCK_SIZE_EXPONENT.
|
◆
BURSTTRIE_SORT
This enum defines the sorting modes for the buckets of a
BurstTrieMap
.
Enumerator
|
NONE
|
Bucket entries won't be sorted at all. If a correct ordering of the entries isn't needed, this is generally the fastest option.
|
LINEAR_SEARCH
|
Bucket entries will be sorted according to their keys. But for searching, they will be scanned in linear order nevertheless. Given small bucket sizes, this is typically faster than a binary search.
|
BINARY_SEARCH
|
Bucket entries will be sorted according to their keys, and lookup will be done with a binary search. This will be faster than a linear search only for large bucket sizes which in general are not recommended.
|
◆
COLLECTION_RESIZE_FLAGS
Flags for Resize(). Depending on the type of collection the flags might be ignored (except for ON_GROW_UNINITIALIZED).
Enumerator
|
NONE
|
|
ON_SHRINK_KEEP_CAPACITY
|
Don't change capacity.
|
ON_SHRINK_FIT_TO_SIZE
|
Copy the array to a new memory block that is as small as possible to hold the data.
|
ON_GROW_RESERVE_CAPACITY
|
Allocate some extra capacity (based on ComputeArraySize()).
|
ON_GROW_FIT_TO_SIZE
|
Grow the array exactly to the requested size.
|
ON_GROW_UNINITIALIZED
|
Do not initialize added elements (usually PODs) when resizing the array (is supported by all collections).
|
ON_GROW_UNSPECIFIED
|
Initialize added elements with unspecified (but legal) values. For example PODs can be left uninitialized, strong references can be zero-initialized for best performance.
|
ON_RESIZE_UNSPECIFIED
|
The resize operation may use unspecified (but legal) values for existing elements as well as for added elements. After resize all elements may contain unspecified values.
|
FIT_TO_SIZE
|
Fits the array to the requested size for growing and shrinking.
|
DEFAULT
|
The default is to keep capacity on shrink and fit to size when growing the array.
|
POD_UNINITIALIZED
|
|
◆
HASHMAP_ENTRY_LAYOUT
Enumerator
|
KEY_VALUE
|
|
KEY_HASH_VALUE
|
|
VALUE_KEY
|
|
VALUE
|
|
◆
HASHMAP_MODE
HASHMAP_MODE can be used as template argument for
HashMap
to control its behavior.
Enumerator
|
DEFAULT
|
The default mode.
|
SYNCHRONIZED
|
Use atomic access to implement a lock-free hash map.
|
NO_NONEMPTY_BUCKET_TABLE
|
Don't maintain a table of non-empty buckets. This reduces memory consumption, but makes iterations slower.
|
◆
BASESORTFLAGS
Flags for the behavior of
BaseSort
when moving objects. If you pass the default value
BASESORTFLAGS::NONE
an auto-detection checks for POD and sets
BASESORTFLAGS::MOVEANDCOPYOBJECTS
if applicable. For non-POD datatypes
BASESORTFLAGS::MOVEANDCOPYOBJECTS
can be manually set to increase performance (if your datatype allows memory operations).
Enumerator
|
NONE
|
always use constructor/destructor or move operator, never memcpy, memmove or realloc
|
MOVEANDCOPYOBJECTS
|
elements are PODs and can be moved and copied using memcpy and moved using memmove
|
◆
MEMORY_OBSERVER_FLAGS
The observer might return several flags, if it just observes the destruction it should simply return DEFAULT.
Enumerator
|
DEFAULT
|
Default behaviour: Continue with destruction, observer will be removed.
|
CLAIM_SHARED_OWNERSHIP
|
The observer claims shared ownership of the target, do not destruct the object.
|
CLAIM_EXCLUSIVE_OWNERSHIP
|
The first observer/creator claims exclusive ownership of the target, do not destruct the object.
|
KEEP_OBSERVER
|
Do not delete the observer (usually only makes sense if ownership is claimed).
|
INVOKE_WITH_UNLOCKED_TARGET
|
Ask to invoke the observer again without the target being locked (if you need to destruct associated objects).
|
◆
MEMORY_OBSERVER_STATE
The observer gets information about the target via the state parameter.
Enumerator
|
DEFAULT
|
|
TARGET_IS_LOCKED
|
The target is locked and you must not directly or indireclty modify itself or any related objects.
|
TARGET_HAS_EXCLUSIVE_OWNERSHIP
|
The target is exclusively owned and you cannot claim shared ownership.
|
Function Documentation
◆
MAXON_ENUM_FLAGS()
[1/6]
◆
PrivateInitCopy()
T* maxon::PrivateInitCopy
|
(
|
void *
|
ptr
,
|
|
|
const T &
|
src
|
|
)
|
|
|
◆
ToBlock()
[1/4]
Block
<T> maxon::ToBlock
|
(
|
T(&)
|
array
[N]
|
)
|
|
Converts a C++ fixed-size array to a block.
-
参数
-
[in]
|
array
|
The array to wrap in a block.
|
-
返回
-
A non-strided block which wraps the complete C++ array.
◆
ToBlock()
[2/4]
Makes a non-strided block from a pointer and a size. This is the same as using the constructor
Block<T>(ptr, size)
, but you save to specify the template argument for the type.
-
参数
-
[in]
|
ptr
|
Pointer to the first element.
|
[in]
|
size
|
Number of elements.
|
-
返回
-
A non-strided block representing
size
elements starting at
ptr
.
◆
ToSingletonBlock()
[1/2]
Block
<T> maxon::ToSingletonBlock
|
(
|
T &
|
value
|
)
|
|
◆
ToSingletonBlock()
[2/2]
Block
<const T> maxon::ToSingletonBlock
|
(
|
const T &
|
value
|
)
|
|
◆
ToBlock()
[3/4]
Makes a strided block from a pointer, a size and a stride. This is the same as using the constructor
StridedBlock<T>(ptr, size, stride)
, but you save to specify the template arguments.
-
参数
-
[in]
|
ptr
|
Pointer to the first element.
|
[in]
|
size
|
Number of elements.
|
[in]
|
stride
|
Element stride.
|
-
返回
-
A strided block representing
size
elements starting at
ptr
with the given
stride
.
◆
CharToBlock()
[1/5]
Converts a null-terminated C-string to a block. The block contains all characters from the string except the null terminator.
-
参数
-
[in]
|
str
|
Pointer to the null-terminated C-string, may be nullptr.
|
-
返回
-
A non-strided block representing all characters from
str
.
◆
CharToBlock()
[2/5]
◆
CharToBlock()
[3/5]
Block
<const
Char
> maxon::CharToBlock
|
(
|
const
Char
(&)
|
str
[N]
|
)
|
|
◆
CharToBlock()
[4/5]
◆
CharToBlock()
[5/5]
◆
MAXON_ENUM_FLAGS()
[2/6]
◆
MAXON_ENUM_LIST()
[1/3]
◆
PrivateGetCount()
[1/3]
◆
PrivateGetCount()
[2/3]
◆
PrivateGetCount()
[3/3]
◆
GetCount()
Int
maxon::GetCount
|
(
|
const ITERABLE &
|
iterable
|
)
|
|
Returns the number of elements of
iterable
. If the iterable is a collection or a C++ array, the true number of elements is returned, otherwise (e.g., for an iterator) -1.
-
参数
-
[in]
|
iterable
|
Some iterable object.
|
-
返回
-
Element count of the iterable object, or -1 if the count is unknown.
◆
PrivateContains()
[1/4]
◆
PrivateContains()
[2/4]
◆
PrivateContains()
[3/4]
◆
PrivateContains()
[4/4]
◆
Contains()
Checks if
key
is contained in the set defined by
predicate
.
predicate
has to be of a predicate type, i.e., either a collection, a C++ array, an object with
Contains
function or a Bool-valued unary function object.
-
参数
-
[in]
|
predicate
|
Some predicate object.
|
[in]
|
key
|
Key to look up in the predicate object.
|
-
返回
-
True if
key
is contained in
predicate
.
◆
PrivateIsEqual()
[1/2]
◆
PrivateIsEqual()
[2/2]
◆
IsEqual()
Checks if #a and #b are equal according to the given #predicate. The #predicate has to be either an object callable with two parameters (such as a lambda), or an object with a function IsEqual with two parameters.
-
参数
-
[in]
|
predicate
|
Some predicate object.
|
[in]
|
a
|
First value to compare for equality.
|
[in]
|
b
|
Second value to compare for equality.
|
-
返回
-
True if #a and #b are equal according to #predicate.
◆
MAXON_MEMBERTYPE_DETECTOR()
[1/5]
maxon::MAXON_MEMBERTYPE_DETECTOR
|
(
|
IsCollection
|
,
|
|
|
IsCollection
|
,
|
|
|
std::false_type
|
|
|
)
|
|
|
◆
MAXON_ENUM_FLAGS()
[3/6]
◆
ValueForward()
This helper functions serves a similar purpose as std::forward<X>(x). But in ValueForward<COLLECTION>(x), COLLECTION need not be the type of x itself, but can be an arbitrary type. If COLLECTION a collection type (but not a reference type to a collection type), x is forwarded as r-value reference, otherwise as l-value reference. The typical usage is in a function template which receives some collection via a parameter
COLLECTION&& collection
(with COLLECTION being a template parameter), and where the values of the collection shall be forwarded to another function. If a collection is passed as r-value to the function, its values should passed as r-values, too, to the other function. Example:
template
<
typename
COLLECTION> Result<void> AppendAllImpl(COLLECTION&& other)
{
iferr_scope
;
for
(
auto
&& i : std::forward<COLLECTION>(other))
{
this->Append(ValueForward<COLLECTION>(i))
iferr_return
;
}
return
OK
;
}
-
参数
-
[in]
|
x
|
The value to forward.
|
-
Template Parameters
-
COLLECTION
|
A type to determine if x shall be forwarded as r-value (COLLECTION is a collection type, but not a reference type) or l-value (otherwise).
|
-
返回
-
The forwarded value.
◆
BlockForward()
This helper functions serves a similar purpose as std::forward<X>(x). It receives a
Block
and returns the same block: Either as it is, or cast to a MoveBlock. The latter case happens when COLLECTION is a collection type (but not a reference type to a collection type). The typical usage is in a function template which receives some collection via a parameter
COLLECTION&& collection
(with COLLECTION being a template parameter), and where blocks of values of the collection shall be forwarded to another function. If a collection is passed as r-value to the function, its blocks should passed as MoveBlocks to the other function.
-
另请参阅
-
ValueForward
-
参数
-
[in]
|
block
|
The block to forward.
|
-
Template Parameters
-
COLLECTION
|
A type to determine if x shall be forwarded as r-value (COLLECTION is a collection type, but not a reference type) or l-value (otherwise).
|
-
返回
-
The forwarded block.
◆
PrivateGetMap()
[1/2]
COLLECTION&& maxon::PrivateGetMap
|
(
|
COLLECTION &&
|
c
,
|
|
|
OverloadRank0
|
|
|
)
|
|
|
◆
PrivateGetMap()
[2/2]
Substitute
<COLLECTION&&, typename std::remove_reference<COLLECTION>::type::MapType>::type maxon::PrivateGetMap
|
(
|
COLLECTION &&
|
c
,
|
|
|
OverloadRank1
|
|
|
)
|
|
|
◆
MAXON_MEMBERTYPE_DETECTOR()
[2/5]
maxon::MAXON_MEMBERTYPE_DETECTOR
|
(
|
GetNonConstIteratorType
|
,
|
|
|
Iterator
|
,
|
|
|
std::false_type
|
|
|
)
|
|
|
◆
MAXON_MEMBERTYPE_DETECTOR()
[3/5]
maxon::MAXON_MEMBERTYPE_DETECTOR
|
(
|
GetConstIteratorType
|
,
|
|
|
ConstIterator
|
,
|
|
|
std::false_type
|
|
|
)
|
|
|
◆
MAXON_MEMBERTYPE_DETECTOR()
[4/5]
maxon::MAXON_MEMBERTYPE_DETECTOR
|
(
|
GetCollectionType
|
,
|
|
|
CollectionType
|
,
|
|
|
T
|
|
|
)
|
|
|
◆
MAXON_MEMBERTYPE_DETECTOR()
[5/5]
maxon::MAXON_MEMBERTYPE_DETECTOR
|
(
|
IsForEachIterator
|
,
|
|
|
IsForEachIterator
|
,
|
|
|
std::false_type
|
|
|
)
|
|
|
◆
RBegin()
◆
REnd()
◆
begin()
◆
end()
◆
MAXON_ENUM_LIST()
[2/3]
◆
MAXON_ENUM_LIST()
[3/3]
◆
GetRangeItemCount()
Int
GetRangeItemCount
|
(
|
const RANGETYPE &
|
data
|
)
|
|
Calculate the total item count in a range set.
RangeSet::GetCount
returns the number of "ranges".
-
参数
-
-
返回
-
Item count.
◆
MAXON_ENUM_FLAGS()
[4/6]
◆
ToString()
◆
MAXON_ASSERT_STANDARD_LAYOUT()
[1/2]
◆
MAXON_ASSERT_STANDARD_LAYOUT()
[2/2]
◆
MAXON_ENUM_FLAGS()
[5/6]
◆
MAXON_ENUM_FLAGS()
[6/6]
◆
ToBlock()
[4/4]
◆
DoSort()
Variable Documentation
◆
BASEARRAY_DEFAULT_CHUNK_SIZE
const
Int
BASEARRAY_DEFAULT_CHUNK_SIZE
static
|
|
◆
BLOCKARRAY_DEFAULT_SIZE_EXPONENT
const
Int
BLOCKARRAY_DEFAULT_SIZE_EXPONENT
static
|
|
maxon::Int Int
定义:
ge_sys_math.h:62
return OK
定义:
apibase.h:2532
#define iferr_return
定义:
resultbase.h:1434
#define iferr_scope
定义:
resultbase.h:1343
#define MAXON_C_ARRAY(T,...)