ConfigDB::OuterObjectTemplate< ContainedClassType, UpdaterType, DatabaseClassType, storeIndex, ParentClassType, propIndex, offset > Class Template Reference

Used by code generator. More...

#include <Object.h>

Inheritance diagram for ConfigDB::OuterObjectTemplate< ContainedClassType, UpdaterType, DatabaseClassType, storeIndex, ParentClassType, propIndex, offset >:
Collaboration diagram for ConfigDB::OuterObjectTemplate< ContainedClassType, UpdaterType, DatabaseClassType, storeIndex, ParentClassType, propIndex, offset >:

Public Types

using OuterUpdater = OuterObjectUpdaterTemplate< UpdaterType, DatabaseClassType, storeIndex, ParentClassType, propIndex, offset >
 

Public Member Functions

 OuterObjectTemplate (StoreRef store)
 
 OuterObjectTemplate (DatabaseClassType &db)
 
std::unique_ptr< ExportStreamcreateExportStream (const Format &format, const ExportOptions &options={}) const
 Create a read-only stream for serializing object contents. More...
 
OuterUpdater update ()
 Create an update object. More...
 
bool update (Delegate< void(UpdaterType)> callback)
 Run an update asynchronously. More...
 

Detailed Description

template<class ContainedClassType, class UpdaterType, class DatabaseClassType, unsigned storeIndex, class ParentClassType, unsigned propIndex, unsigned offset>
class ConfigDB::OuterObjectTemplate< ContainedClassType, UpdaterType, DatabaseClassType, storeIndex, ParentClassType, propIndex, offset >

Used by code generator.

Template Parameters
ContainedClassType
UpdaterType
DatabaseClassType
storeIndex
ParentClassType
propIndex
offset

Member Typedef Documentation

◆ OuterUpdater

template<class ContainedClassType , class UpdaterType , class DatabaseClassType , unsigned storeIndex, class ParentClassType , unsigned propIndex, unsigned offset>
using ConfigDB::OuterObjectTemplate< ContainedClassType, UpdaterType, DatabaseClassType, storeIndex, ParentClassType, propIndex, offset >::OuterUpdater = OuterObjectUpdaterTemplate<UpdaterType, DatabaseClassType, storeIndex, ParentClassType, propIndex, offset>

Constructor & Destructor Documentation

◆ OuterObjectTemplate() [1/2]

template<class ContainedClassType , class UpdaterType , class DatabaseClassType , unsigned storeIndex, class ParentClassType , unsigned propIndex, unsigned offset>
ConfigDB::OuterObjectTemplate< ContainedClassType, UpdaterType, DatabaseClassType, storeIndex, ParentClassType, propIndex, offset >::OuterObjectTemplate ( StoreRef  store)
inline

◆ OuterObjectTemplate() [2/2]

template<class ContainedClassType , class UpdaterType , class DatabaseClassType , unsigned storeIndex, class ParentClassType , unsigned propIndex, unsigned offset>
ConfigDB::OuterObjectTemplate< ContainedClassType, UpdaterType, DatabaseClassType, storeIndex, ParentClassType, propIndex, offset >::OuterObjectTemplate ( DatabaseClassType &  db)
inline

Member Function Documentation

◆ createExportStream()

template<class ContainedClassType , class UpdaterType , class DatabaseClassType , unsigned storeIndex, class ParentClassType , unsigned propIndex, unsigned offset>
std::unique_ptr<ExportStream> ConfigDB::OuterObjectTemplate< ContainedClassType, UpdaterType, DatabaseClassType, storeIndex, ParentClassType, propIndex, offset >::createExportStream ( const Format format,
const ExportOptions options = {} 
) const
inline

Create a read-only stream for serializing object contents.

Parameters
formatFormatter used to generate output
pathJSONPath-like expression to restrict output to specific store or object
optionsOptions for customising output

◆ update() [1/2]

template<class ContainedClassType , class UpdaterType , class DatabaseClassType , unsigned storeIndex, class ParentClassType , unsigned propIndex, unsigned offset>
OuterUpdater ConfigDB::OuterObjectTemplate< ContainedClassType, UpdaterType, DatabaseClassType, storeIndex, ParentClassType, propIndex, offset >::update ( )
inline

Create an update object.

Return values
UpdaterInstance to allow setting values Caller must check validity of returned updater as update may already be in progress.
    if (auto upd = myobject.update()) {
        // OK, proceed with update
        upd.setValue(...);
} else {
    // Cannot update at the moment
}

◆ update() [2/2]

template<class ContainedClassType , class UpdaterType , class DatabaseClassType , unsigned storeIndex, class ParentClassType , unsigned propIndex, unsigned offset>
bool ConfigDB::OuterObjectTemplate< ContainedClassType, UpdaterType, DatabaseClassType, storeIndex, ParentClassType, propIndex, offset >::update ( Delegate< void(UpdaterType)>  callback)
inline

Run an update asynchronously.

Parameters
callbackUser callback which will receive an updater instance
Return values
booltrue if update was performed immediately, false if it's been queued

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