HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
VOP_LanguageManager Class Reference

A class for managing the languages and custom data types in VOPs. More...

#include <VOP_LanguageManager.h>

Public Types

typedef void(* EditCallback )(const char *type_name)
 For registering a GUI editor callback. More...
 

Public Member Functions

VOP_LanguageType getLanguageTypeFromRenderMask (const char *mask) const
 Returns language type guessed from shader's render mask. More...
 
bool isMantraVexFromRenderMask (const char *mask) const
 
VOP_LanguagegetLanguage (VOP_LanguageType type) const
 Returns language of a given type. More...
 
void getTypeDefinitionNames (UT_StringArray &type_names) const
 Gets the list of all available type definitions. More...
 
bool hasTypeDefinition (const char *type_name) const
 Tests if the manager has a definition for the given name. More...
 
VOP_TypeDefinitionHandle getTypeDefinitionHandle (const char *type_name) const
 Gets the type definition based on the type name. More...
 
VOP_TypeDefinitionSourcegetTypeDefinitionSource (const char *type_name) const
 Gets the source tha provides the full definition for the type. More...
 
void registerTypeDefinition (const char *type_name, VOP_TypeDefinitionSource &src, const char *old_type_name=NULL)
 
void unregisterTypeDefinition (const char *type_name)
 
void unregisterTypeDefinitionSource (VOP_TypeDefinitionSource &src)
 
void dirtyTypeDefinition (const char *type_name)
 
void generateUniqueTypeName (UT_String &type_name, bool use_guid)
 Obtains a unique type name not used in the manager yet. More...
 
VOP_TypeDefinitionFileLoadergetFileLoader ()
 Returns an object that loads and saves the definitions to and from file. More...
 
void editType (const char *type_name)
 Brings up a type editor GUI for editing the given type. More...
 
UT_NotifierImpl< const
VOP_LanguageManagerEvent & > & 
getEventNotifier ()
 
 VOP_LanguageManager ()
 
 ~VOP_LanguageManager ()
 

Static Public Member Functions

static void setEditCallback (VOP_LanguageManager::EditCallback cb)
 

Detailed Description

A class for managing the languages and custom data types in VOPs.

Definition at line 34 of file VOP_LanguageManager.h.

Member Typedef Documentation

typedef void(* VOP_LanguageManager::EditCallback)(const char *type_name)

For registering a GUI editor callback.

Definition at line 111 of file VOP_LanguageManager.h.

Constructor & Destructor Documentation

VOP_LanguageManager::VOP_LanguageManager ( )

Default constructor and destructor

VOP_LanguageManager::~VOP_LanguageManager ( )

Default constructor and destructor

Member Function Documentation

void VOP_LanguageManager::dirtyTypeDefinition ( const char *  type_name)

Marks the given type definition as dirty. The next time someone requests full definition handle, the manager will ask the source for an update before returning the refreshed definition. Issues an event about type definition change.

void VOP_LanguageManager::editType ( const char *  type_name)

Brings up a type editor GUI for editing the given type.

void VOP_LanguageManager::generateUniqueTypeName ( UT_String type_name,
bool  use_guid 
)

Obtains a unique type name not used in the manager yet.

UT_NotifierImpl<const VOP_LanguageManagerEvent&>& VOP_LanguageManager::getEventNotifier ( )
inline

Gets the notifier that sends events triggered by various changes to the data structures overseen by the manager.

Definition at line 122 of file VOP_LanguageManager.h.

VOP_TypeDefinitionFileLoader& VOP_LanguageManager::getFileLoader ( )

Returns an object that loads and saves the definitions to and from file.

VOP_Language* VOP_LanguageManager::getLanguage ( VOP_LanguageType  type) const

Returns language of a given type.

VOP_LanguageType VOP_LanguageManager::getLanguageTypeFromRenderMask ( const char *  mask) const

Returns language type guessed from shader's render mask.

VOP_TypeDefinitionHandle VOP_LanguageManager::getTypeDefinitionHandle ( const char *  type_name) const

Gets the type definition based on the type name.

void VOP_LanguageManager::getTypeDefinitionNames ( UT_StringArray type_names) const

Gets the list of all available type definitions.

VOP_TypeDefinitionSource* VOP_LanguageManager::getTypeDefinitionSource ( const char *  type_name) const

Gets the source tha provides the full definition for the type.

bool VOP_LanguageManager::hasTypeDefinition ( const char *  type_name) const

Tests if the manager has a definition for the given name.

bool VOP_LanguageManager::isMantraVexFromRenderMask ( const char *  mask) const
void VOP_LanguageManager::registerTypeDefinition ( const char *  type_name,
VOP_TypeDefinitionSource src,
const char *  old_type_name = NULL 
)

Registers a new vop type whose full definition is provided by the source upon request. If 'type_name' already exists, the new source (and new definition) is going to be used after this registration. If 'old_type_name' is provided, the old type is renamed to the new name whose full definition is provided by the given source; after renaming, the old name is unregistered and becomes unavailable. Issues an event about added or renamed type.

static void VOP_LanguageManager::setEditCallback ( VOP_LanguageManager::EditCallback  cb)
static
void VOP_LanguageManager::unregisterTypeDefinition ( const char *  type_name)

Removes the type from the manager. After unregistration, this type definition will no longer be availble from manager. Issues an event about removed type.

void VOP_LanguageManager::unregisterTypeDefinitionSource ( VOP_TypeDefinitionSource src)

A convenience method that unregisters all the types associated with the given source. Equivalent to calling unregisterTypeDefinition() on all types registered with the given source (ie, whose definitions are provided by this source). Issues events about removed types.


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