HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PDGT_BaseType< EnumType > Class Template Referenceabstract

#include <PDGT_BaseType.h>

+ Inheritance diagram for PDGT_BaseType< EnumType >:

Public Types

enum  Language { ePython, eCpp }
 
using TypeSet = UT_Set< const PDGT_BaseType * >
 

Public Member Functions

 PDGT_BaseType (const UT_StringHolder &type_name, const UT_StringHolder &type_label, Language lang, EnumType reg_type)
 
virtual ~PDGT_BaseType ()
 
const UT_StringHoldertypeName () const
 
void setTypeName (const UT_StringHolder &name)
 
const UT_StringHoldertypeLabel () const
 
void setTypeLabel (const UT_StringHolder &label)
 
Language language () const
 
EnumType type () const
 
int instanceCount () const
 
void instanceCreated () const
 
void instanceDestroyed () const
 
bool compareType (const PDGT_BaseType *type, bool deep=true) const
 
void addParent (const PDGT_BaseType *type, bool recurse=true)
 
virtual bool initialize (UT_WorkBuffer &errors)=0
 
virtual int64 instanceMemoryUsage () const
 
virtual UT_StringHolder displayName () const
 

Protected Attributes

TypeSet myParentTypes
 
UT_StringHolder myTypeName
 
UT_StringHolder myTypeLabel
 
Language myLanguage
 
SYS_AtomicInt32 myInstanceCount
 
EnumType myType
 

Detailed Description

template<typename EnumType>
class PDGT_BaseType< EnumType >

Base class for types in a PDGT-based type system. This class provides functionality that is common to all types, without needing to know about the specifics of the type or the construction arguments.

It knows: The name and human-readable label for the type The language the type is defined in (C++ or Python) The number of instances that exist The set of compatible types, e.g. things that this type can be thought of a "deriving" from.

Internally, it also knows the enum entry associated with the type. The type registration system has an enumeration of types associated with it - this is the EnumType template argument. This type corresponds to a distinct entry in that enumeration.

Definition at line 39 of file PDGT_BaseType.h.

Member Typedef Documentation

template<typename EnumType>
using PDGT_BaseType< EnumType >::TypeSet = UT_Set<const PDGT_BaseType*>

Definition at line 48 of file PDGT_BaseType.h.

Member Enumeration Documentation

template<typename EnumType>
enum PDGT_BaseType::Language
Enumerator
ePython 
eCpp 

Definition at line 42 of file PDGT_BaseType.h.

Constructor & Destructor Documentation

template<typename EnumType>
PDGT_BaseType< EnumType >::PDGT_BaseType ( const UT_StringHolder type_name,
const UT_StringHolder type_label,
Language  lang,
EnumType  reg_type 
)
inline

Definition at line 51 of file PDGT_BaseType.h.

template<typename EnumType>
virtual PDGT_BaseType< EnumType >::~PDGT_BaseType ( )
inlinevirtual

Definition at line 63 of file PDGT_BaseType.h.

Member Function Documentation

template<typename EnumType>
void PDGT_BaseType< EnumType >::addParent ( const PDGT_BaseType< EnumType > *  type,
bool  recurse = true 
)
inline

Definition at line 98 of file PDGT_BaseType.h.

template<typename EnumType>
bool PDGT_BaseType< EnumType >::compareType ( const PDGT_BaseType< EnumType > *  type,
bool  deep = true 
) const
inline

Definition at line 88 of file PDGT_BaseType.h.

template<typename EnumType>
virtual UT_StringHolder PDGT_BaseType< EnumType >::displayName ( ) const
inlinevirtual

Definition at line 113 of file PDGT_BaseType.h.

template<typename EnumType>
virtual bool PDGT_BaseType< EnumType >::initialize ( UT_WorkBuffer errors)
pure virtual
template<typename EnumType>
int PDGT_BaseType< EnumType >::instanceCount ( ) const
inline

Definition at line 81 of file PDGT_BaseType.h.

template<typename EnumType>
void PDGT_BaseType< EnumType >::instanceCreated ( ) const
inline

Definition at line 83 of file PDGT_BaseType.h.

template<typename EnumType>
void PDGT_BaseType< EnumType >::instanceDestroyed ( ) const
inline

Definition at line 85 of file PDGT_BaseType.h.

template<typename EnumType>
virtual int64 PDGT_BaseType< EnumType >::instanceMemoryUsage ( ) const
inlinevirtual
template<typename EnumType>
Language PDGT_BaseType< EnumType >::language ( ) const
inline

Definition at line 75 of file PDGT_BaseType.h.

template<typename EnumType>
void PDGT_BaseType< EnumType >::setTypeLabel ( const UT_StringHolder label)
inline

Definition at line 72 of file PDGT_BaseType.h.

template<typename EnumType>
void PDGT_BaseType< EnumType >::setTypeName ( const UT_StringHolder name)
inline

Definition at line 67 of file PDGT_BaseType.h.

template<typename EnumType>
EnumType PDGT_BaseType< EnumType >::type ( ) const
inline

Definition at line 77 of file PDGT_BaseType.h.

template<typename EnumType>
const UT_StringHolder& PDGT_BaseType< EnumType >::typeLabel ( ) const
inline

Definition at line 70 of file PDGT_BaseType.h.

template<typename EnumType>
const UT_StringHolder& PDGT_BaseType< EnumType >::typeName ( ) const
inline

Definition at line 65 of file PDGT_BaseType.h.

Member Data Documentation

template<typename EnumType>
SYS_AtomicInt32 PDGT_BaseType< EnumType >::myInstanceCount
mutableprotected

Definition at line 126 of file PDGT_BaseType.h.

template<typename EnumType>
Language PDGT_BaseType< EnumType >::myLanguage
protected

Definition at line 125 of file PDGT_BaseType.h.

template<typename EnumType>
TypeSet PDGT_BaseType< EnumType >::myParentTypes
protected

Definition at line 122 of file PDGT_BaseType.h.

template<typename EnumType>
EnumType PDGT_BaseType< EnumType >::myType
protected

Definition at line 127 of file PDGT_BaseType.h.

template<typename EnumType>
UT_StringHolder PDGT_BaseType< EnumType >::myTypeLabel
protected

Definition at line 124 of file PDGT_BaseType.h.

template<typename EnumType>
UT_StringHolder PDGT_BaseType< EnumType >::myTypeName
protected

Definition at line 123 of file PDGT_BaseType.h.


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