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

A class abstracting definition of a VOP data type. More...

#include <VOP_TypeDefinition.h>

+ Inheritance diagram for VOP_TypeDefinition:

Public Member Functions

 VOP_TypeDefinition ()
 Constructor and destructor. More...
 
virtual ~VOP_TypeDefinition ()
 
virtual UT_StringHolder getMetaType () const =0
 
virtual bool load (const UT_JSONValue &json)
 
virtual bool save (UT_JSONValue &json) const
 
virtual void getTypeDefinitionSourceCode (UT_String &code, const VOP_Language *language) const
 
const UT_StringHoldergetTypeName () const
 Sets and gets the type definition unique name identifier. More...
 
void setTypeName (const char *name)
 Sets and gets the type definition unique name identifier. More...
 
const UT_StringHoldergetName () const
 Sets and gets the type definition unique name identifier. More...
 
const UT_StringHoldergetTypeLabel () const
 Sets and gets the type definition unique name identifier. More...
 
void setTypeLabel (const char *label)
 Sets and gets the type definition unique name identifier. More...
 
const UT_ColorgetConnectorColor () const
 Methods for the color of the connector of this type. More...
 
void setSpecificConnectorColor (const UT_Color &clr)
 Methods for the color of the connector of this type. More...
 
void setDefaultConnectorColor ()
 Methods for the color of the connector of this type. More...
 
void setCodeTypeName (const char *code_type_name)
 Sets and gets the type name used in the generated code. More...
 
const UT_StringHoldergetCodeTypeName () const
 Sets and gets the type name used in the generated code. More...
 
const UT_StringHoldergetCodeTypeNameRaw () const
 Sets and gets the type name used in the generated code. More...
 
bool operator== (const VOP_TypeDefinition &other) const
 Standard comparison operators. More...
 
bool operator!= (const VOP_TypeDefinition &other) const
 Standard comparison operators. More...
 

Static Public Attributes

static const UT_StringHolder METATYPE_KEY
 

Protected Member Functions

virtual bool isEqual (const VOP_TypeDefinition &other) const =0
 

Detailed Description

A class abstracting definition of a VOP data type.

Definition at line 29 of file VOP_TypeDefinition.h.

Constructor & Destructor Documentation

VOP_TypeDefinition::VOP_TypeDefinition ( )

Constructor and destructor.

virtual VOP_TypeDefinition::~VOP_TypeDefinition ( )
virtual

Member Function Documentation

const UT_StringHolder& VOP_TypeDefinition::getCodeTypeName ( ) const

Sets and gets the type name used in the generated code.

const UT_StringHolder& VOP_TypeDefinition::getCodeTypeNameRaw ( ) const

Sets and gets the type name used in the generated code.

const UT_Color* VOP_TypeDefinition::getConnectorColor ( ) const

Methods for the color of the connector of this type.

virtual UT_StringHolder VOP_TypeDefinition::getMetaType ( ) const
pure virtual

Returns what sort of type this is. (eg, "struct", "class", "custom"). It is used in JSON files to identify the type definition implementation factory and to tell in general the kind of a type.

Implemented in VOP_ClassTypeDefinition, VOP_StructTypeDefinition, and VOP_CustomTypeDefinition.

const UT_StringHolder& VOP_TypeDefinition::getName ( ) const
inline

Sets and gets the type definition unique name identifier.

Definition at line 44 of file VOP_TypeDefinition.h.

virtual void VOP_TypeDefinition::getTypeDefinitionSourceCode ( UT_String code,
const VOP_Language language 
) const
virtual

Obtains the source code that defines the type in the programming (scripting) language.

Reimplemented in VOP_CompositeTypeDefinition.

const UT_StringHolder& VOP_TypeDefinition::getTypeLabel ( ) const

Sets and gets the type definition unique name identifier.

const UT_StringHolder& VOP_TypeDefinition::getTypeName ( ) const

Sets and gets the type definition unique name identifier.

virtual bool VOP_TypeDefinition::isEqual ( const VOP_TypeDefinition other) const
protectedpure virtual

Returns true if the types are the same, even though their identifier name may be different.

Implemented in VOP_CompositeTypeDefinition, and VOP_CustomTypeDefinition.

virtual bool VOP_TypeDefinition::load ( const UT_JSONValue json)
virtual

Loads a type definition from a JSON value. The JSON value parameter is a map (of type JSON_MAP) containing entries relevant to the type. Returns true on success, and false on failure.

Reimplemented in VOP_CompositeTypeDefinition.

Standard comparison operators.

bool VOP_TypeDefinition::operator== ( const VOP_TypeDefinition other) const

Standard comparison operators.

virtual bool VOP_TypeDefinition::save ( UT_JSONValue json) const
virtual

Saves a type definition to a JSON value. The JSON value should be a map (of type JSON_MAP). Returns true on success, and false on failure.

Reimplemented in VOP_CompositeTypeDefinition.

void VOP_TypeDefinition::setCodeTypeName ( const char *  code_type_name)

Sets and gets the type name used in the generated code.

void VOP_TypeDefinition::setDefaultConnectorColor ( )

Methods for the color of the connector of this type.

void VOP_TypeDefinition::setSpecificConnectorColor ( const UT_Color clr)

Methods for the color of the connector of this type.

void VOP_TypeDefinition::setTypeLabel ( const char *  label)

Sets and gets the type definition unique name identifier.

void VOP_TypeDefinition::setTypeName ( const char *  name)

Sets and gets the type definition unique name identifier.

Member Data Documentation

const UT_StringHolder VOP_TypeDefinition::METATYPE_KEY
static

The key in the JSONValue map dictionary that denotes the metatype of the type definition (e.g., "struct" or "custom").

Definition at line 67 of file VOP_TypeDefinition.h.


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