Dev Essential
Loading...
Searching...
No Matches
ddl::mapping::DDLEnumTableFunction Class Reference

Enum Table function with type string "ddl_enum_table". The callable function retrieved with getCallable() will transform the given value to another mapped value. More...

#include <ddl_enum_table_function.h>

Inherits ddl::mapping::MapperElementBase< Function >.

Classes

struct  TransformParameter
 Internal TransformParameter structure representing the "table" and "default" property. More...
 

Public Member Functions

 DDLEnumTableFunction (std::string name, Properties properties)
 CTOR.
 
Function::Description getDescription () const override
 Get the parameter descriptions.
 
std::shared_ptr< Function::CallablegetCallable () const override
 Get a Function Callable.
 
- Public Member Functions inherited from ddl::mapping::MapperElementBase< Function >
 MapperElementBase (std::string name, Properties properties)
 CTOR.
 
 ~MapperElementBase () override=default
 DTOR.
 
const std::string & getName () const override
 Get the Name.
 
const PropertiesgetProperties () const override
 Get the Properties.
 
const PropertygetProperty (const std::string &property_name) const
 Get the Property.
 
- Public Member Functions inherited from ddl::mapping::MapperElement
virtual ~MapperElement ()=default
 DTOR.
 

Static Public Member Functions

static std::string getType ()
 Get the Type as string to register within factory.
 
static Properties getDefaultProperties ()
 Get the Default Properties to register within factory.
 

Additional Inherited Members

- Public Types inherited from ddl::mapping::Function
using Description = std::unordered_map<std::string, ParameterDescription>
 

Detailed Description

Enum Table function with type string "ddl_enum_table". The callable function retrieved with getCallable() will transform the given value to another mapped value.

Properties:

  • "description" : DDL description for enum types
  • "from" : the enum type name of the source
  • "to" : the enum type name of the target
  • "table" : a value assignment table like: ENUM_VALUE_OF_FROM_1=ENUM_VALUE_OF_TO_5
    ENUM_VALUE_OF_FROM_2=ENUM_VALUE_OF_TO_1
  • "default" : the enum value i.e. ENUM_VALUE_OF_TO_1 if assignment is not defined within "table" property

Constructor & Destructor Documentation

◆ DDLEnumTableFunction()

ddl::mapping::DDLEnumTableFunction::DDLEnumTableFunction ( std::string name,
Properties properties )

CTOR.

Parameters
namethe name of the instance
propertiesthe properties for the instance

Member Function Documentation

◆ getCallable()

std::shared_ptr< Function::Callable > ddl::mapping::DDLEnumTableFunction::getCallable ( ) const
overridevirtual

Get a Function Callable.

Parameters
function_namethe function name
Returns
std::shared_ptr<const FunctionCaller>

Implements ddl::mapping::Function.

◆ getDefaultProperties()

static Properties ddl::mapping::DDLEnumTableFunction::getDefaultProperties ( )
inlinestatic

Get the Default Properties to register within factory.

Returns
Properties

◆ getDescription()

Function::Description ddl::mapping::DDLEnumTableFunction::getDescription ( ) const
overridevirtual

Get the parameter descriptions.

Returns
Description

Implements ddl::mapping::Function.

◆ getType()

static std::string ddl::mapping::DDLEnumTableFunction::getType ( )
inlinestatic

Get the Type as string to register within factory.

Returns
std::string

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