#include <datadescriptiondefinitiondatabaseimpl.h>
Allows to create different implementations of data description database stores.
Public Member Functions | |
MAXON_METHOD Bool | Contains (const Id &category, const IdAndVersion &dataType, const LanguageRef &language) const |
MAXON_METHOD Result< DataDescriptionDefinition > | LoadDescription (LOADDESCRIPTIONMODE mode, const Id &category, const LanguageRef &language, const IdAndVersion &dataType, Id *foundInDatabase=nullptr) const |
MAXON_METHOD Result< Tuple< Bool, DataDescriptionDefinition * > > | StoreDescription (const Id &databaseId, const Id &category, const LanguageRef &language, const IdAndVersion &dataType, const DataDescriptionDefinition &description, const DataDescriptionDefinition &overwrittenDescription, Bool usePendingSystem) |
MAXON_METHOD Result< Bool > | DeleteDescription (const Id &category, const LanguageRef &language, const IdAndVersion &dataType) |
MAXON_METHOD Result< BaseArray< IdAndVersion > > | GetRegisteredDescriptions (const Id &category, const LanguageRef &language) const |
MAXON_METHOD Result< BaseArray< LanguageRef > > | GetRegisteredLanguages () const |
MAXON_METHOD Result< void > | WriteDataBases () const |
MAXON_METHOD Result< Int > | RenameId (const Id &oldId, const Id &newId) |
MAXON_METHOD Result< Int > | RenameAttribute (const InternedId &oldId, const InternedId &newId) |
MAXON_METHOD Result< Bool > | CheckUniqueAttributeName (const InternedId &searchId) const |
MAXON_METHOD Result< DataDescription > | UpdateDescriptions (const Id &category, const IdAndVersion &dataTypeId, const LanguageRef &language) const |
MAXON_METHOD Bool | IsWritableDatabase (const Id &languageId) const |
MAXON_METHOD Int | GetChangeCounts () const |
MAXON_METHOD Int | GetUserChangeCount () const |
MAXON_METHOD Result< void > | Write () const |
MAXON_METHOD Result< void > | WriteUserChangedDataBases () |
Private Member Functions | |
MAXON_INTERFACE (DataDescriptionDefinitionDatabaseImplInterface, MAXON_REFERENCE_NORMAL, "net.maxon.interface.datadescriptiondefinitiondatabaseimpl") | |
|
private |
MAXON_METHOD Bool Contains | ( | const Id & | category, |
const IdAndVersion & | dataType, | ||
const LanguageRef & | language | ||
) | const |
checks if the database contains the datatype.
[in] | category | Database category (e.g. DATADESCRIPTION_CATEGORY_DATA / DATADESCRIPTION_CATEGORY_UI). |
[in] | dataType | Data type id to load. |
[in] | language | Language (only valid for category DATADESCRIPTION_CATEGORY_STRING). |
MAXON_METHOD Result<DataDescriptionDefinition> LoadDescription | ( | LOADDESCRIPTIONMODE | mode, |
const Id & | category, | ||
const LanguageRef & | language, | ||
const IdAndVersion & | dataType, | ||
Id * | foundInDatabase = nullptr |
||
) | const |
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 | Data type id to load. |
[out] | foundInDatabase | Optional: Pointer to an Id of the database where the entry was found. |
MAXON_METHOD Result<Tuple<Bool, DataDescriptionDefinition*> > StoreDescription | ( | const Id & | databaseId, |
const Id & | category, | ||
const LanguageRef & | language, | ||
const IdAndVersion & | dataType, | ||
const DataDescriptionDefinition & | description, | ||
const DataDescriptionDefinition & | overwrittenDescription, | ||
Bool | usePendingSystem | ||
) |
Stores the given description under the given values.
[in] | databaseId | Database 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 | Data type id to store. |
[in] | description | Description data to store. |
MAXON_METHOD Result<Bool> DeleteDescription | ( | const Id & | category, |
const LanguageRef & | language, | ||
const IdAndVersion & | dataType | ||
) |
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 | Data type id to delete. |
MAXON_METHOD Result<BaseArray<IdAndVersion> > GetRegisteredDescriptions | ( | const Id & | category, |
const LanguageRef & | language | ||
) | const |
Return all registered descriptions.
[in] | category | Database category (e.g. DATADESCRIPTION_CATEGORY_DATA / DATADESCRIPTION_CATEGORY_UI). |
[in] | language | Language (only valid for category DATADESCRIPTION_CATEGORY_STRING). |
MAXON_METHOD Result<BaseArray<LanguageRef> > GetRegisteredLanguages | ( | ) | const |
Returns all registered languages of this database.
MAXON_METHOD Result<void> WriteDataBases | ( | ) | const |
Save all databases (including user changes and version update changes).
MAXON_METHOD Result<Int> RenameId | ( | const Id & | oldId, |
const Id & | newId | ||
) |
Renames a id in all databases to the new id.
[in] | oldId | Old id to rename |
[in] | newId | Id to replace. |
MAXON_METHOD Result<Int> RenameAttribute | ( | const InternedId & | oldId, |
const InternedId & | newId | ||
) |
Renames an attribute in all databases.
[in] | oldId | Old attribute key. |
[in] | newId | New attribute key. |
MAXON_METHOD Result<Bool> CheckUniqueAttributeName | ( | const InternedId & | searchId | ) | const |
Checks if the given id is unique in all databases.
[in] | searchId | Id to search for. |
MAXON_METHOD Result<DataDescription> UpdateDescriptions | ( | const Id & | category, |
const IdAndVersion & | dataTypeId, | ||
const LanguageRef & | language | ||
) | const |
Updates the description from the given DataDescriptionDefinition.
[in] | category | Category to search. |
[in] | dataTypeId | Data type id to process. |
[in] | language | Language to process. |
MAXON_METHOD Bool IsWritableDatabase | ( | const Id & | languageId | ) | const |
Returns true if the database is writable.
[in] | languageId | Language id to check. |
MAXON_METHOD Int GetChangeCounts | ( | ) | const |
Returns the number of changes made since the last Write(). This includes user changes and all automatic version update changes.
MAXON_METHOD Int GetUserChangeCount | ( | ) | const |
Returns the number of changes made by user since the last Write().
MAXON_METHOD Result<void> Write | ( | ) | const |
Writes all changes permanently to hard drive.
MAXON_METHOD Result<void> WriteUserChangedDataBases | ( | ) |
Save all databases edited by a user.