HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
apex::APEX_TypeDefinitionBase Class Referenceabstract

#include <APEX_Types.h>

+ Inheritance diagram for apex::APEX_TypeDefinitionBase:

Public Member Functions

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

Detailed Description

Definition at line 54 of file APEX_Types.h.

Constructor & Destructor Documentation

virtual apex::APEX_TypeDefinitionBase::~APEX_TypeDefinitionBase ( )
inlinevirtual

Definition at line 57 of file APEX_Types.h.

Member Function Documentation

virtual void* apex::APEX_TypeDefinitionBase::allocate ( exint  size) const
pure virtual

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.

Implemented in apex::APEX_TypeDefinition< T >, and apex::APEX_VoidTypeDefinition.

virtual exint apex::APEX_TypeDefinitionBase::append ( void mem) const
pure virtual

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

Implemented in apex::APEX_TypeDefinition< T >, and apex::APEX_VoidTypeDefinition.

virtual void apex::APEX_TypeDefinitionBase::clear ( void mem) const
pure virtual

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

Implemented in apex::APEX_TypeDefinition< T >, and apex::APEX_VoidTypeDefinition.

virtual bool apex::APEX_TypeDefinitionBase::compile ( APEX_Buffer buffer,
APEX_Graph *  graph,
APEX_PortID  port 
) const
pure virtual
virtual void apex::APEX_TypeDefinitionBase::deallocate ( void mem) const
pure virtual

Free a resizable array created by allocate.

Implemented in apex::APEX_TypeDefinition< T >, and apex::APEX_VoidTypeDefinition.

virtual void* apex::APEX_TypeDefinitionBase::getPtrAtIndex ( void mem,
exint  index 
) const
pure virtual

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

Implemented in apex::APEX_TypeDefinition< T >, and apex::APEX_VoidTypeDefinition.

virtual bool apex::APEX_TypeDefinitionBase::isArray ( ) const
inlinevirtual

Return whether the type is an array.

Reimplemented in apex::APEX_TypeDefinition< T >.

Definition at line 87 of file APEX_Types.h.

virtual bool apex::APEX_TypeDefinitionBase::isCopyable ( ) const
pure virtual

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

Implemented in apex::APEX_TypeDefinition< T >, and apex::APEX_VoidTypeDefinition.

virtual bool apex::APEX_TypeDefinitionBase::isHandle ( ) const
inlinevirtual

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

Reimplemented in apex::APEX_TypeDefinition< T >.

Definition at line 91 of file APEX_Types.h.

virtual bool apex::APEX_TypeDefinitionBase::isVariadic ( ) const
inlinevirtual

Return whether the type is a variadic arg.

Reimplemented in apex::APEX_TypeDefinition< T >.

Definition at line 89 of file APEX_Types.h.

virtual const UT_StringRef& apex::APEX_TypeDefinitionBase::repr ( ) const
pure virtual

Return a human-readable string representing the type.

Implemented in apex::APEX_TypeDefinition< T >, and apex::APEX_VoidTypeDefinition.

virtual void apex::APEX_TypeDefinitionBase::setData ( void mem,
const void val 
) const
pure virtual

Copy the value at val to mem.

Implemented in apex::APEX_VoidTypeDefinition.

virtual size_t apex::APEX_TypeDefinitionBase::sizeT ( ) const
pure virtual

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

Implemented in apex::APEX_TypeDefinition< T >, and apex::APEX_VoidTypeDefinition.

virtual const APEX_TypeDefinitionBase* apex::APEX_TypeDefinitionBase::subTypeDef ( ) const
pure virtual

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

Implemented in apex::APEX_TypeDefinition< T >, and apex::APEX_VoidTypeDefinition.

virtual std::type_index apex::APEX_TypeDefinitionBase::typeIndex ( ) const
pure virtual

Return the RTTI information for the contained type.

Implemented in apex::APEX_TypeDefinition< T >, and apex::APEX_VoidTypeDefinition.


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