-
首页
-
C4D R23.110 C++ SDK
DataDescriptionDefinitionDatabaseInterface Class Reference
#include <datadescriptiondefinitiondatabase.h>
详细描述
DataDescriptionDefinitionDatabaseInterface
provides functions for loading, storing DescriptionDefinitions.
静态公共成员函数
|
static
MAXON_METHOD
Result
< DataDescriptionDefinition >
|
LoadDescription
(
LOADDESCRIPTIONMODE
mode, const
Id
&category, const LanguageRef &language, const
IdAndVersion
&dataType,
Id
*foundInDatabase=nullptr)
|
static
MAXON_METHOD
Result
< void >
|
StoreDescription
(const
Id
&databaseId, const
Id
&category, const LanguageRef &language, const
IdAndVersion
&dataType, const DataDescriptionDefinition &description, const DataDescriptionDefinition &overwrittenDescription,
Bool
usePendingSystem)
|
static
MAXON_METHOD
Result
<
Bool
>
|
DeleteDescription
(const
Id
&category, const LanguageRef &language, const
IdAndVersion
&dataType)
|
static
MAXON_METHOD
Result
<
BaseArray
<
IdAndVersion
> >
|
GetRegisteredDescriptions
(const
Id
&databaseId, const
Id
&category, const LanguageRef &language)
|
static
MAXON_METHOD
Result
< void >
|
WriteDataBases
()
|
static
MAXON_METHOD
Bool
|
QueryNeedsWriteDataBases
()
|
static
MAXON_METHOD
Result
<
Int
>
|
RenameId
(const
Id
&oldId, const
Id
&newId)
|
static
MAXON_METHOD
Result
<
Int
>
|
RenameAttribute
(const
InternedId
&oldId, const
InternedId
&newId)
|
static
MAXON_METHOD
Result
<
Bool
>
|
CheckUniqueAttributeName
(const
InternedId
&searchId)
|
static
MAXON_METHOD
Result
< DataDescription >
|
UpdateDescription
(const
Id
&databaseId, const
Id
&category, const LanguageRef &language, const
IdAndVersion
&dataType, DataDescriptionDefinition &descRef,
Bool
notifyParents)
|
static
MAXON_METHOD
Result
< DataDescription >
|
UpdateDescriptionI
(const
Id
&databaseId, const
Id
&category, const LanguageRef &language, DataDescriptionDefinition &descRef, const
IdAndVersion
&dataType)
|
static
MAXON_METHOD
Result
< void >
|
RegisterDatabaseWithUrl
(const
Id
&databaseId, const
Url
&url)
|
static
MAXON_METHOD
Result
< void >
|
RegisterDatabase
(const
Id
&databaseId, const DataDescriptionDefinitionDatabaseImplRef &ddb)
|
static
MAXON_METHOD
Result
< void >
|
UnregisterDatabase
(const
Id
&databaseId)
|
static
MAXON_METHOD
Bool
|
IsWritableDatabase
(const
Id
&databaseId, const
Id
&languageId)
|
static
MAXON_METHOD
Result
<
BaseArray
<
Id
> >
|
GetRegisteredDatabases
()
|
static
MAXON_METHOD
Result
< DataDescription >
|
BuildDescription
(const
Id
&category, const
IdAndVersion
&dataTypeId, const LanguageRef &language)
|
static
MAXON_METHOD
Result
< void >
|
RegisterMessage
(const
Id
&dataTypeId, const
Id
&attributeId, const
Id
&cmdId, const
DescriptionMessageFunction
&func)
|
static
MAXON_METHOD
DescriptionMessageFunction
*
|
FindNodeMessage
(const
Id
&dataTypeId, const
Id
&attributeId, const
Id
&cmdId)
|
static
MAXON_METHOD
Result
< void >
|
FixDatabaseProps
(
DBVERSION
version, DataDictionary &entry)
|
成员函数文档编制
◆
MAXON_INTERFACE_NONVIRTUAL()
◆
LoadDescription()
Loads a description from the registered databases.
-
参数
-
[in]
|
category
|
Database category (e.g. DATADESCRIPTION_CATEGORY_DATA / DATADESCRIPTION_CATEGORY_UI).
|
[in]
|
language
|
Language (only valid for category DATADESCRIPTION_CATEGORY_STRING).
|
[in]
|
dataType
|
数据
type id to load.
|
[out]
|
foundInDatabase
|
Optional: Pointer to an
Id
of the database where the entry was found.
|
-
返回
-
DataDescriptionDefinition on success.
◆
StoreDescription()
static
MAXON_METHOD
Result
<void> StoreDescription
|
(
|
const
Id
&
|
databaseId
,
|
|
|
const
Id
&
|
category
,
|
|
|
const LanguageRef &
|
language
,
|
|
|
const
IdAndVersion
&
|
dataType
,
|
|
|
const DataDescriptionDefinition &
|
description
,
|
|
|
const DataDescriptionDefinition &
|
overwrittenDescription
,
|
|
|
Bool
|
usePendingSystem
|
|
)
|
|
|
|
static
|
Stores the given description under the given values.
-
参数
-
[in]
|
databaseId
|
数据
base id (see
RegisterDatabase()
/GetRegisteredDatabases()).
|
[in]
|
category
|
Database category (e.g. DATADESCRIPTION_CATEGORY_DATA / DATADESCRIPTION_CATEGORY_UI).
|
[in]
|
language
|
Language (only valid for category DATADESCRIPTION_CATEGORY_STRING).
|
[in]
|
dataType
|
数据
type id to store.
|
[in]
|
description
|
描述
data to store.
|
-
返回
-
OK on success.
◆
DeleteDescription()
DeleteDescription deletes a description from the database.
-
参数
-
[in]
|
category
|
Database category (e.g. DATADESCRIPTION_CATEGORY_DATA / DATADESCRIPTION_CATEGORY_UI).
|
[in]
|
language
|
Language (only valid for category DATADESCRIPTION_CATEGORY_STRING).
|
[in]
|
dataType
|
数据
type id to delete.
|
-
返回
-
True/False on success. True means the description was found and deleted. False if the description was not found.
◆
GetRegisteredDescriptions()
Return all registered descriptions.
-
参数
-
[in]
|
databaseId
|
Unique id for the database. If Id() is given the result of all databases will be returned.
|
[in]
|
category
|
Database category (e.g. DATADESCRIPTION_CATEGORY_DATA / DATADESCRIPTION_CATEGORY_UI).
|
[in]
|
language
|
Language (only valid for category DATADESCRIPTION_CATEGORY_STRING).
|
-
返回
-
Array
on success.
◆
WriteDataBases()
Save all databases.
-
返回
-
OK on success.
◆
QueryNeedsWriteDataBases()
QueryNeedsWriteDataBases returns true if changes to the databases are pending and not saved.
-
返回
-
True if databases were modified and are still unsaved.
◆
RenameId()
Renames a id in all databases to the new id.
-
参数
-
[in]
|
oldId
|
Old id to rename
|
[in]
|
newId
|
Id
to replace.
|
-
返回
-
Number of values that were renamed.
◆
RenameAttribute()
Renames an attribute in all databases.
-
参数
-
[in]
|
oldId
|
Old attribute key.
|
[in]
|
newId
|
New attribute key.
|
-
返回
-
Number of values that were renamed.
◆
CheckUniqueAttributeName()
Checks if the given id is unique in all data bases.
-
参数
-
[in]
|
searchId
|
Id
to search for.
|
-
返回
-
True if the id is unique. False if the id already exists.
◆
UpdateDescription()
static
MAXON_METHOD
Result
<DataDescription> UpdateDescription
|
(
|
const
Id
&
|
databaseId
,
|
|
|
const
Id
&
|
category
,
|
|
|
const LanguageRef &
|
language
,
|
|
|
const
IdAndVersion
&
|
dataType
,
|
|
|
DataDescriptionDefinition &
|
descRef
,
|
|
|
Bool
|
notifyParents
|
|
)
|
|
|
|
static
|
UpdateDescription description.
-
参数
-
[in]
|
databaseId
|
Unique id for the database.
|
[in]
|
category
|
Database category (e.g. DATADESCRIPTION_CATEGORY_DATA / DATADESCRIPTION_CATEGORY_UI).
|
[in]
|
language
|
Language (only valid for category DATADESCRIPTION_CATEGORY_STRING).
|
[in]
|
dataType
|
数据
type id to store.
|
[in]
|
descRef
|
描述
ref to connect the update observable with.
|
[in]
|
notifyParents
|
True if parents should be notified.
|
-
返回
-
OK on success.
◆
UpdateDescriptionI()
static
MAXON_METHOD
Result
<DataDescription> UpdateDescriptionI
|
(
|
const
Id
&
|
databaseId
,
|
|
|
const
Id
&
|
category
,
|
|
|
const LanguageRef &
|
language
,
|
|
|
DataDescriptionDefinition &
|
descRef
,
|
|
|
const
IdAndVersion
&
|
dataType
|
|
)
|
|
|
|
static
|
UpdateDescription description.
-
参数
-
[in]
|
databaseId
|
Unique id for the database.
|
[in]
|
category
|
Database category (e.g. DATADESCRIPTION_CATEGORY_DATA / DATADESCRIPTION_CATEGORY_UI).
|
[in]
|
language
|
Language (only valid for category DATADESCRIPTION_CATEGORY_STRING).
|
[in]
|
descRef
|
描述
ref to connect the update observable with.
|
[in]
|
dataType
|
TODO: (Tilo) describe
|
-
返回
-
DataDescription on success.
◆
RegisterDatabaseWithUrl()
Registers a data base for a specific module under the given url.
-
参数
-
[in]
|
databaseId
|
Unique id for the database.
|
[in]
|
url
|
Absolute url to look for the data base.
|
-
返回
-
OK on success.
◆
RegisterDatabase()
static
MAXON_METHOD
Result
<void> RegisterDatabase
|
(
|
const
Id
&
|
databaseId
,
|
|
|
const DataDescriptionDefinitionDatabaseImplRef &
|
ddb
|
|
)
|
|
|
|
static
|
Registers a special data base DataDescriptionDefinitionDatabaseImplRef under the given id.
-
参数
-
[in]
|
databaseId
|
Unique id for the database.
|
[in]
|
ddb
|
数据
base implementation to register.
|
-
返回
-
OK on success.
◆
UnregisterDatabase()
Unregisters the database from the system.
-
参数
-
[in]
|
databaseId
|
Unique id of the database.
|
-
返回
-
OK on success.
◆
IsWritableDatabase()
Returns true if the database is writable.
-
参数
-
[in]
|
databaseId
|
Unique id of the database.
|
[in]
|
languageId
|
Language id to check.
|
-
返回
-
True if writable.
◆
GetRegisteredDatabases()
Returns the ids and urls of all registered databases.
-
返回
-
Array
on success.
◆
BuildDescription()
Updates the description from the definition for the given type.
-
参数
-
-
返回
-
OK on success.
◆
RegisterMessage()
Registers a message callback for a datatype, attribute and variadic command.
-
参数
-
[in]
|
dataTypeId
|
数据
type id to register.
|
[in]
|
attributeId
|
Attribute id to register.
|
[in]
|
cmdId
|
命令
Id
to register.
|
[in]
|
func
|
Callback function to register.
|
-
返回
-
OK on success.
◆
FindNodeMessage()
Finds a registered command callback with a given datatype, attribute and variadic command.
-
参数
-
[in]
|
dataTypeId
|
数据
type id to register.
|
[in]
|
attributeId
|
Attribute id to register.
|
[in]
|
cmdId
|
命令
Id
to register.
|
-
返回
-
Pointer to the callback. Nullptr if nothing was found.
◆
FixDatabaseProps()
Fixes an entry of the resource database.
-
参数
-
[in]
|
version
|
last converted version.
|
[in]
|
entry
|
DataDictionary to convert.
|
-
返回
-
OK on success.
◆
MAXON_OBSERVABLE_STATIC()
[1/2]
MAXON_OBSERVABLE_STATIC
|
(
|
Result
< void >
|
,
|
|
|
ObservableSaveDatabase
|
,
|
|
|
(const
Id
&databaseId, const
Url
&dataBaseUrl,
Bool
beforeSave)
|
,
|
|
|
ObservableCombinerRunAllComponent
|
|
|
)
|
|
|
ObservableSaveDatabase will be triggered before and after a database is/was written. This can be used to add source control callbacks etc.
◆
MAXON_OBSERVABLE_STATIC()
[2/2]
MAXON_OBSERVABLE_STATIC
|
(
|
Result
< void >
|
,
|
|
|
ObservableDatabaseRegistrationChange
|
,
|
|
|
(const
Id
&databaseId,
Bool
added)
|
,
|
|
|
ObservableCombinerRunAllComponent
|
|
|
)
|
|
|
ObservableDatabaseRegistrationChange after a database was added or removed to the system. This can be used to update editors.