About
Data descriptions list the attributes of MAXON API component. Such a description is created using the Resource Editor and saved to a *.json file.
To use the description, a plugin must load tihs file on program start.
Loading Descriptions
A description can be loaded and freed using MAXON_INITIALIZATION(). The description file can be stored in the plugins "res" folder which can be obtaind using maxon::Application::GetUrl().
The description is then loaded using maxon::DataDescriptionDefinitionDatabaseInterface::RegisterDatabaseWithUrl(). At the end, the description is freed using maxon::DataDescriptionDefinitionDatabaseInterface::UnregisterDatabase().
{
{
err.DiagOutput();
err.CritStop();
return err;
};
}
static void FreeResources()
{
{
err.DiagOutput();
err.CritStop();
return;
};
}
static MAXON_FUNCTION Result< Url > GetUrl(APPLICATION_URLTYPE urlType)
static MAXON_METHOD Result< void > RegisterDatabaseWithUrl(const Id &databaseId, const Url &url, const CString &version=CString::NullValue())
static MAXON_METHOD Result< void > UnregisterDatabase(const Id &databaseId)
Definition: apibaseid.h:253
return OK
Definition: apibase.h:2690
#define MAXON_INITIALIZATION(...)
Definition: module.h:795
@ CURRENT_MODULE_RESOURCE_DIR
Resource directory of the module that invoked this call.
#define iferr_scope_handler
Definition: resultbase.h:1402
#define iferr_return
Definition: resultbase.h:1519
Further Reading