FactoryFunctions< Factory< T(const DataDictionary &)>, SUPER > Class Template Reference

#include <factory.h>

Inheritance diagram for FactoryFunctions< Factory< T(const DataDictionary &)>, SUPER >:

Detailed Description

template<typename T, typename SUPER>
class maxon::FactoryFunctions< Factory< T(const DataDictionary &)>, SUPER >

Specialization for the case of a Factory with single DataDictionary argument. It allows to call the Create function without any argument, then an empty DataDictionary is used.

Public Types

using type = FactoryFunctions
 
using DelegateType = Delegate< Result< T >(FactoryInterface::ConstPtr, const DataDictionary &)>
 

Public Member Functions

 MAXON_DEFAULT_REFERENCE_CONSTRUCTORS (FactoryFunctions, typename SUPER::type)
 
Result< T > Create (const DataDictionary &args=NullValue< const DataDictionary & >()) const
 
Result< T > Create (Result< DataDictionary > &&args) const
 

Member Typedef Documentation

◆ type

using type = FactoryFunctions

◆ DelegateType

using DelegateType = Delegate<Result<T>(FactoryInterface::ConstPtr, const DataDictionary&)>

Member Function Documentation

◆ MAXON_DEFAULT_REFERENCE_CONSTRUCTORS()

MAXON_DEFAULT_REFERENCE_CONSTRUCTORS ( FactoryFunctions< Factory< T(const DataDictionary &)>, SUPER >  ,
typename SUPER::type   
)

◆ Create() [1/2]

Result<T> Create ( const DataDictionary &  args = NullValue<const DataDictionary&>()) const

Creates a new object of type T given the arguments args.

Parameters
[in]argsArguments for the creation of the new object.
Returns
Created object.

◆ Create() [2/2]

Result<T> Create ( Result< DataDictionary > &&  args) const

Creates a new object of type T given the arguments args. If args has an error, this is returned immediately.

Parameters
[in]argsArguments for the creation of the new object.
Returns
Created object.