HDK
|
A class abstracting definition of a VOP data type. More...
#include <VOP_TypeDefinition.h>
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_StringHolder & | getTypeName () 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_StringHolder & | getName () const |
Sets and gets the type definition unique name identifier. More... | |
const UT_StringHolder & | getTypeLabel () 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_Color * | getConnectorColor () 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_StringHolder & | getCodeTypeName () const |
Sets and gets the type name used in the generated code. More... | |
const UT_StringHolder & | getCodeTypeNameRaw () 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 |
A class abstracting definition of a VOP data type.
Definition at line 29 of file VOP_TypeDefinition.h.
VOP_TypeDefinition::VOP_TypeDefinition | ( | ) |
Constructor and destructor.
|
virtual |
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.
|
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.
|
inline |
Sets and gets the type definition unique name identifier.
Definition at line 44 of file VOP_TypeDefinition.h.
|
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.
|
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 |
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.
bool VOP_TypeDefinition::operator!= | ( | const VOP_TypeDefinition & | other | ) | const |
Standard comparison operators.
bool VOP_TypeDefinition::operator== | ( | const VOP_TypeDefinition & | other | ) | const |
Standard comparison operators.
|
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.
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.
|
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.