HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
apex::APEX_TypeDefinition< T > Class Template Reference

#include <APEX_Types.h>

+ Inheritance diagram for apex::APEX_TypeDefinition< T >:

Public Types

typedef T value_type
 

Public Member Functions

 APEX_TypeDefinition (const UT_StringLit &&type_name)
 
 ~APEX_TypeDefinition () override
 
const UT_StringRefrepr () const override
 Return a human-readable string representing the type. More...
 
size_t sizeT () const override
 Return the size of a single instance of the type, or 0 if the type is not well-defined (i.e. a void). More...
 
voidallocate (exint size) const override
 
void clear (void *mem) const override
 Reset the instance of this type (member of buffer created in allocate) to a default value if possible. More...
 
exint append (void *mem) const override
 
void deallocate (void *mem) const override
 Free a resizable array created by allocate. More...
 
voidgetPtrAtIndex (void *mem, exint index) const override
 Get a pointer to the {index}-th value in the resizable array created by allocate stored at mem. More...
 
void setData (SYS_MAYBE_UNUSED void *mem, SYS_MAYBE_UNUSED const void *val) const override
 
bool compile (APEX_Buffer *buffer, APEX_Graph *graph, APEX_PortID port) const override
 
std::type_index typeIndex () const override
 Return the RTTI information for the contained type. More...
 
bool isCopyable () const override
 Return whether the type is copy-assignable (i.e. can setData function). More...
 
bool isArray () const override
 Return whether the type is an array. More...
 
bool isVariadic () const override
 Return whether the type is a variadic arg. More...
 
bool isHandle () const override
 Return whether the type is a handle to some shared data (i.e. geometry) More...
 
const APEX_TypeDefinitionBasesubTypeDef () const override
 If this is a compound type (such as variadics), return the type definition for the contained type. More...
 
- Public Member Functions inherited from apex::APEX_TypeDefinitionBase
virtual ~APEX_TypeDefinitionBase ()
 
virtual void setData (void *mem, const void *val) const =0
 Copy the value at val to mem. More...
 

Detailed Description

template<typename T>
class apex::APEX_TypeDefinition< T >

Definition at line 306 of file APEX_Types.h.

Member Typedef Documentation

template<typename T >
typedef T apex::APEX_TypeDefinition< T >::value_type

Definition at line 333 of file APEX_Types.h.

Constructor & Destructor Documentation

template<typename T >
apex::APEX_TypeDefinition< T >::APEX_TypeDefinition ( const UT_StringLit &&  type_name)
inline

Definition at line 309 of file APEX_Types.h.

template<typename T >
apex::APEX_TypeDefinition< T >::~APEX_TypeDefinition ( )
inlineoverride

Definition at line 331 of file APEX_Types.h.

Member Function Documentation

template<typename T >
void* apex::APEX_TypeDefinition< T >::allocate ( exint  size) const
inlineoverridevirtual

Allocate a resizable array of the type. The current implementation uses a UT_Array behind-the-scenes, however the implementation is type-erased to allow flexibility.

Implements apex::APEX_TypeDefinitionBase.

Definition at line 339 of file APEX_Types.h.

template<typename T >
exint apex::APEX_TypeDefinition< T >::append ( void mem) const
inlineoverridevirtual

Append a default-constructed instance to the array previously allocated by allocate. If no allocation could be performed, return -1.

Implements apex::APEX_TypeDefinitionBase.

Definition at line 349 of file APEX_Types.h.

template<typename T >
void apex::APEX_TypeDefinition< T >::clear ( void mem) const
inlineoverridevirtual

Reset the instance of this type (member of buffer created in allocate) to a default value if possible.

Implements apex::APEX_TypeDefinitionBase.

Definition at line 344 of file APEX_Types.h.

template<typename T >
bool apex::APEX_TypeDefinition< T >::compile ( APEX_Buffer buffer,
APEX_Graph *  graph,
APEX_PortID  port 
) const
inlineoverridevirtual

Implements apex::APEX_TypeDefinitionBase.

Definition at line 390 of file APEX_Types.h.

template<typename T >
void apex::APEX_TypeDefinition< T >::deallocate ( void mem) const
inlineoverridevirtual

Free a resizable array created by allocate.

Implements apex::APEX_TypeDefinitionBase.

Definition at line 366 of file APEX_Types.h.

template<typename T >
void* apex::APEX_TypeDefinition< T >::getPtrAtIndex ( void mem,
exint  index 
) const
inlineoverridevirtual

Get a pointer to the {index}-th value in the resizable array created by allocate stored at mem.

Implements apex::APEX_TypeDefinitionBase.

Definition at line 372 of file APEX_Types.h.

template<typename T >
bool apex::APEX_TypeDefinition< T >::isArray ( ) const
inlineoverridevirtual

Return whether the type is an array.

Reimplemented from apex::APEX_TypeDefinitionBase.

Definition at line 398 of file APEX_Types.h.

template<typename T >
bool apex::APEX_TypeDefinition< T >::isCopyable ( ) const
inlineoverridevirtual

Return whether the type is copy-assignable (i.e. can setData function).

Implements apex::APEX_TypeDefinitionBase.

Definition at line 396 of file APEX_Types.h.

template<typename T >
bool apex::APEX_TypeDefinition< T >::isHandle ( ) const
inlineoverridevirtual

Return whether the type is a handle to some shared data (i.e. geometry)

Reimplemented from apex::APEX_TypeDefinitionBase.

Definition at line 400 of file APEX_Types.h.

template<typename T >
bool apex::APEX_TypeDefinition< T >::isVariadic ( ) const
inlineoverridevirtual

Return whether the type is a variadic arg.

Reimplemented from apex::APEX_TypeDefinitionBase.

Definition at line 399 of file APEX_Types.h.

template<typename T >
const UT_StringRef& apex::APEX_TypeDefinition< T >::repr ( ) const
inlineoverridevirtual

Return a human-readable string representing the type.

Implements apex::APEX_TypeDefinitionBase.

Definition at line 335 of file APEX_Types.h.

template<typename T >
void apex::APEX_TypeDefinition< T >::setData ( SYS_MAYBE_UNUSED void mem,
SYS_MAYBE_UNUSED const void val 
) const
inlineoverride

Definition at line 378 of file APEX_Types.h.

template<typename T >
size_t apex::APEX_TypeDefinition< T >::sizeT ( ) const
inlineoverridevirtual

Return the size of a single instance of the type, or 0 if the type is not well-defined (i.e. a void).

Implements apex::APEX_TypeDefinitionBase.

Definition at line 337 of file APEX_Types.h.

template<typename T >
const APEX_TypeDefinitionBase* apex::APEX_TypeDefinition< T >::subTypeDef ( ) const
inlineoverridevirtual

If this is a compound type (such as variadics), return the type definition for the contained type.

Implements apex::APEX_TypeDefinitionBase.

Definition at line 402 of file APEX_Types.h.

template<typename T >
std::type_index apex::APEX_TypeDefinition< T >::typeIndex ( ) const
inlineoverridevirtual

Return the RTTI information for the contained type.

Implements apex::APEX_TypeDefinitionBase.

Definition at line 395 of file APEX_Types.h.


The documentation for this class was generated from the following file: