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, const Char *maxonModuleID=MAXON_MODULE_ID)
Definition: application.h:179
static MAXON_METHOD Result< void > RegisterDatabaseWithUrl(const Id &databaseId, const Url &url, const CString &version=CString::DefaultValue())
static MAXON_METHOD Result< void > UnregisterDatabase(const Id &databaseId)
Definition: apibaseid.h:243
return OK
Definition: apibase.h:2735
#define MAXON_INITIALIZATION(...)
Definition: module.h:875
@ CURRENT_MODULE_RESOURCE_DIR
Resource directory of the module that invoked this call.
#define iferr_scope_handler
Definition: resultbase.h:1407
#define iferr_return
Definition: resultbase.h:1524
Further Reading