#include <containerbase.h>
Public Types | |
enum class | INTERFACES { NONE , VIRTUAL_TUPLE_CONTAINER , ARRAY_CONTAINER , XFORM_CONTAINER , CONCAT_CONTAINER , STATIC_ARRAY , ARRAY , SINGLE_VALUE_ARRAY , BASE_ARRAY , PAGED_ARRAY , INDEXABLE , MULTI_DOMAIN_CONTAINER , SLICED_ARRAY , MEMBER_ARRAY } |
using | GenericContainerInterfaceMarker = void |
Static Public Member Functions | |
static GenericContainerInterface * | Alloc (MAXON_SOURCE_LOCATION_DECLARATION) |
Public Attributes | |
MAXON_METHOD_RESERVE | |
Private Member Functions | |
MAXON_INTERFACE_SIMPLE_VIRTUAL (GenericContainerInterface, MAXON_REFERENCE_COPY_ON_WRITE) | |
MAXON_GENERIC ((ContainerVariance) typename T=NamedTuple<>) | |
using GenericContainerInterfaceMarker = void |
|
strong |
This enum informs about the interfaces which are implemented by a container and also about some implementation details (see GetInterfaces()).
Enumerator | |
---|---|
NONE | No interface. |
VIRTUAL_TUPLE_CONTAINER | The container is a virtual tuple container. |
ARRAY_CONTAINER | The container implements GenericArrayContainerInterface. |
XFORM_CONTAINER | The container is an xform container (see XformContainerActionsInterface). |
CONCAT_CONTAINER | The container is a concat container (see ContainerFactory::Concat). |
STATIC_ARRAY | The container implements StaticArrayInterface. |
ARRAY | The container implements ArrayInterface. |
SINGLE_VALUE_ARRAY | The container is a single-value array (see ArrayFactory::NewSingleValueArray). This is set in addition to ARRAY. |
BASE_ARRAY | The container uses an underlying BaseArray (see ArrayFactory::NewBaseArray). This is set in addition to ARRAY. |
PAGED_ARRAY | The container is a paged array (see ArrayFactory::NewPagedArray). This is set in addition to ARRAY. |
INDEXABLE | The container implements GenericIndexableContainerInterface. |
MULTI_DOMAIN_CONTAINER | The container implements MultiDomainContainerInterface. |
SLICED_ARRAY | The container is a subset of an array (see ArrayFactory::Slice). This is set in addition to ARRAY. |
MEMBER_ARRAY | The container is an array pointing to member data of a source array (see ArrayFactory::ExtractMember). This is set in addition to ARRAY. |
|
private |
|
private |
|
static |
MAXON_METHOD const ContainerDataType& GetContainerType | ( | ) | const |
enum maxon::GenericContainerInterface::INTERFACES MAXON_ENUM_FLAGS_CLASS | ( | INTERFACES | ) |
MAXON_METHOD INTERFACES GetInterfaces | ( | ) | const |
Returns INTERFACES flags corresponding to the interfaces implemented by this container. You can safely cast the container to these interfaces.
MAXON_METHOD Result<GenericContainerInterface*> MakeWritable | ( | Bool | copyContent = true | ) | const |
Returns a writable copy of this container. This may return a different implementation of the interface if the current implementation only supports read-only access (for example a container implementation where all elements have the same value). If there's just a single reference to the container, the container itself may be returned.
By default the value of copyContent is true. Then the content of the copy will be equal to the content of the original container. However if you don't need that because you're going to overwrite the complete content anyway, you can use false for copyContent. Then the content of the copy is unspecified, so the implementation is free to skip copying the content and the returned copy may even be empty. In particular any indexed read or write access to elements without a prior call to a method like Resize may fail.
[in] | copyContent | True (the default) if the content shall be copied, false otherwise (then just a new object with a writable implementation is created, its content is unspecified and may be empty). |
MAXON_ADD_TO_COPY_ON_WRITE_REFERENCE_CLASS | ( | ResultRef< typename std::remove_const< typename S::PrivateReferencedType >::type > MakeWritableDontCopyContent() { return StrongCOWRefHandler::MakeWritableHelper< typename std::remove_const< typename S::PrivateReferencedType >::type >::MakeWritable(this->GetBaseRef(), false, false);} | ) |
MAXON_METHOD String ToString | ( | const FormatStatement * | formatStatement = nullptr | ) | const |
MAXON_METHOD HashInt GetHashCode | ( | ) | const |
MAXON_METHOD UniqueHash GetUniqueHashCode | ( | ) | const |
MAXON_METHOD Bool IsEqual | ( | const GenericContainerInterface * | other, |
EQUALITY | equality | ||
) | const |
MAXON_METHOD Int FindMemberIndex | ( | const InternedId & | name | ) | const |
Finds the member index of the member with the given name in this. If no such member can be found, -1 is returned.
[in] | name | Name of the member to find. |
MAXON_FUNCTION Int FindMemberIndex | ( | const Member & | member | ) | const |
MAXON_METHOD Result<Int> GetCount | ( | ) | const |
MAXON_METHOD Int GetIteratorStateSize | ( | const MemberMap * | map | ) | const |
@MAXON_ANNOTATION{refclass=false}
MAXON_METHOD Result<Int> InitIterator | ( | ViewIteratorMember * | members, |
const MemberMap * | map, | ||
Char * | state, | ||
PersistentIdBuffer * | idBuffer, | ||
Bool | constAccess | ||
) | const |
@MAXON_ANNOTATION{refclass=false}
MAXON_METHOD Result<Int> ValidateIterator | ( | Int | index, |
ViewIteratorMember * | members, | ||
const MemberMap * | map, | ||
Char * | state, | ||
PersistentIdBuffer * | idBuffer | ||
) | const |
@MAXON_ANNOTATION{refclass=false}
MAXON_METHOD void FreeIterator | ( | ViewIteratorMember * | members, |
const MemberMap * | map, | ||
Char * | state, | ||
PersistentIdBuffer * | idBuffer | ||
) | const |
@MAXON_ANNOTATION{refclass=false}
MAXON_METHOD Result<Int> MoveIterator | ( | Int | index, |
ViewIteratorMember * | members, | ||
const MemberMap * | map, | ||
Char * | state, | ||
PersistentIdBuffer * | idBuffer | ||
) | const |
@MAXON_ANNOTATION{refclass=false}
MAXON_METHOD Result<void> AdvancePersistentId | ( | Int | index, |
const Char * | state, | ||
PersistentIdBuffer & | idBuffer | ||
) | const |
@MAXON_ANNOTATION{refclass=false}
MAXON_ADD_TO_CONST_REFERENCE_CLASS | ( | using | Iterator = maxon::details::ContainerIterator< T, false >;using ConstIterator=maxon::details::ContainerIterator< T, true >; | ) |
MAXON_METHOD_RESERVE |