GenericContainerInterface Class Reference

#include <containerbase.h>

Public Types

enum   INTERFACES {
   NONE ,
   SINGLETON_CONTAINER ,
   ARRAY_CONTAINER ,
   XFORM_CONTAINER ,
   CONCAT_CONTAINER ,
   STATIC_ARRAY ,
   V_ARRAY ,
   ARRAY ,
   SINGLE_VALUE_ARRAY
}
using  GenericContainerInterfaceMarker = void

公共成员函数

enum maxon::GenericContainerInterface::INTERFACES   MAXON_ENUM_FLAGS_CLASS ( INTERFACES )
const MAXON_METHOD ContainerDataType GetContainerType () const
MAXON_METHOD INTERFACES   GetInterfaces () const
MAXON_METHOD Result < GenericContainerInterface * >  MakeWritable ( Bool cloneElements=true) const
MAXON_METHOD Result < GenericContainerInterface * >  Clone ( Bool cloneElements=true) const
MAXON_METHOD String   ToString (const FormatStatement *formatStatement=nullptr) const
MAXON_METHOD HashInt   GetHashCode () const
MAXON_METHOD HashValue   GetHashValue () const
MAXON_METHOD Bool   IsEqual (const GenericContainerInterface *other, EQUALITY equality) const
MAXON_METHOD Int   FindMemberIndex (const InternedId &name) const
MAXON_FUNCTION Int   FindMemberIndex (const Member &member) const
MAXON_METHOD Result < Int GetCount () const
MAXON_METHOD Int   GetIteratorStateSize (const MemberMap *map) const
MAXON_METHOD Result < Int InitIterator ( ViewIteratorMember *members, const MemberMap *map, Char *state, PersistentIdBuffer *idBuffer) const
MAXON_METHOD Result < Int ValidateIterator ( Int index, ViewIteratorMember *members, const MemberMap *map, Char *state, PersistentIdBuffer *idBuffer) const
MAXON_METHOD void  FreeIterator ( ViewIteratorMember *members, const MemberMap *map, Char *state, PersistentIdBuffer *idBuffer) const
MAXON_METHOD Result < Int MoveIterator ( Int index, ViewIteratorMember *members, const MemberMap *map, Char *state, PersistentIdBuffer *idBuffer) const
MAXON_METHOD Result < void >  AdvancePersistentId ( Int index, const Char *state, PersistentIdBuffer &idBuffer) const
  MAXON_ADD_TO_CONST_REFERENCE_CLASS (using Iterator= maxon::details::ContainerIterator < T, false >;using ConstIterator= maxon::details::ContainerIterator < T, true >;)

Public Attributes

  MAXON_METHOD_RESERVE

私有成员函数

  MAXON_INTERFACE_SIMPLE_VIRTUAL ( GenericContainerInterface , MAXON_REFERENCE_COPY_ON_WRITE )
  MAXON_GENERIC (( ContainerVariance ) typename T= NamedTuple <>)

Member Typedef Documentation

◆  GenericContainerInterfaceMarker

using GenericContainerInterfaceMarker = void

Member Enumeration Documentation

◆  INTERFACES

enum INTERFACES
strong
Enumerator
NONE 
SINGLETON_CONTAINER 
ARRAY_CONTAINER 
XFORM_CONTAINER 
CONCAT_CONTAINER 
STATIC_ARRAY 
V_ARRAY 
ARRAY 
SINGLE_VALUE_ARRAY 

成员函数文档编制

◆  MAXON_INTERFACE_SIMPLE_VIRTUAL()

MAXON_INTERFACE_SIMPLE_VIRTUAL ( GenericContainerInterface   ,
MAXON_REFERENCE_COPY_ON_WRITE    
)
private

◆  MAXON_GENERIC()

MAXON_GENERIC ( ( ContainerVariance ) typename  T = NamedTuple<> )
private

◆  MAXON_ENUM_FLAGS_CLASS()

enum maxon::GenericContainerInterface::INTERFACES MAXON_ENUM_FLAGS_CLASS ( INTERFACES   )

◆  GetContainerType()

const MAXON_METHOD ContainerDataType & GetContainerType ( ) const

◆  GetInterfaces()

MAXON_METHOD INTERFACES GetInterfaces ( ) const

◆  MakeWritable()

MAXON_METHOD Result < GenericContainerInterface *> MakeWritable ( Bool   cloneElements = 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.

参数
[in] cloneElements True if also the elements shall be cloned, false otherwise (then just a new object with a writable implementation is created).
返回
Pointer to the writable container object, nullptr if allocation or copying failed. @MAXON_ANNOTATION{refclass=false}

◆  Clone()

MAXON_METHOD Result < GenericContainerInterface *> Clone ( Bool   cloneElements = true ) const

◆  ToString()

MAXON_METHOD String ToString ( const FormatStatement formatStatement = nullptr ) const

◆  GetHashCode()

MAXON_METHOD HashInt GetHashCode ( ) const

◆  GetHashValue()

MAXON_METHOD HashValue GetHashValue ( ) const

◆  IsEqual()

MAXON_METHOD Bool IsEqual ( const GenericContainerInterface other ,
EQUALITY   equality  
) const

◆  FindMemberIndex() [1/2]

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.
返回
Index of the member, or -1 if it doesn't exist. @MAXON_ANNOTATION{default=-1}

◆  FindMemberIndex() [2/2]

MAXON_FUNCTION Int FindMemberIndex ( const Member member ) const

◆  GetCount()

MAXON_METHOD Result < Int > GetCount ( ) const

◆  GetIteratorStateSize()

MAXON_METHOD Int GetIteratorStateSize ( const MemberMap map ) const

@MAXON_ANNOTATION{refclass=false}

◆  InitIterator()

MAXON_METHOD Result < Int > InitIterator ( ViewIteratorMember members ,
const MemberMap map ,
Char state ,
PersistentIdBuffer idBuffer  
) const

@MAXON_ANNOTATION{refclass=false}

◆  ValidateIterator()

MAXON_METHOD Result < Int > ValidateIterator ( Int   index ,
ViewIteratorMember members ,
const MemberMap map ,
Char state ,
PersistentIdBuffer idBuffer  
) const

@MAXON_ANNOTATION{refclass=false}

◆  FreeIterator()

MAXON_METHOD void FreeIterator ( ViewIteratorMember members ,
const MemberMap map ,
Char state ,
PersistentIdBuffer idBuffer  
) const

@MAXON_ANNOTATION{refclass=false}

◆  MoveIterator()

MAXON_METHOD Result < Int > MoveIterator ( Int   index ,
ViewIteratorMember members ,
const MemberMap map ,
Char state ,
PersistentIdBuffer idBuffer  
) const

@MAXON_ANNOTATION{refclass=false}

◆  AdvancePersistentId()

MAXON_METHOD Result <void> AdvancePersistentId ( Int   index ,
const Char state ,
PersistentIdBuffer idBuffer  
) const

@MAXON_ANNOTATION{refclass=false}

◆  MAXON_ADD_TO_CONST_REFERENCE_CLASS()

MAXON_ADD_TO_CONST_REFERENCE_CLASS ( using  Iterator = maxon::details::ContainerIterator< T, false >;using ConstIterator=maxon::details::ContainerIterator< T, true >; )

Member Data Documentation

◆  MAXON_METHOD_RESERVE

MAXON_METHOD_RESERVE