Gobelijn API documentation
- generated for commit a0cbea7
|
An employee factory implementation that uses Boost property trees to construct employee instances. More...
#include <ptree-employee-factory.h>
Public Member Functions | |
PtreeEmployeeFactory (const boost::property_tree::ptree &ptree) | |
Creates a factory that analyzes the given property tree, and construct an employee instance. More... | |
Employee | Create () final |
Instructs this factory to create a value. More... | |
![]() | |
virtual | ~Factory () |
Destructor needs to be virtual. More... | |
virtual Employee | Create (TArgs...args)=0 |
Instructs this factory to create a value. More... | |
Static Public Attributes | |
static constexpr const char * | EmployeeNameKey = "Name" |
The Boost property tree key for the employees' names. More... | |
static constexpr const char * | EmployeeDepartmentNameKey = "DepartmentName" |
The Boost property tree key for the employees' department names. More... | |
static constexpr const char * | EmployeeSalaryKey = "Salary" |
The Boost property tree key for the employees' salaries. More... | |
Private Attributes | |
boost::property_tree::ptree | m_ptree |
An employee factory implementation that uses Boost property trees to construct employee instances.
Definition at line 30 of file ptree-employee-factory.h.
|
inlineexplicit |
Creates a factory that analyzes the given property tree, and construct an employee instance.
Definition at line 34 of file ptree-employee-factory.h.
|
final |
Instructs this factory to create a value.
Definition at line 27 of file ptree-employee-factory.cpp.
References AbstractFactory::Employee::DepartmentName, EmployeeDepartmentNameKey, EmployeeNameKey, EmployeeSalaryKey, m_ptree, AbstractFactory::Employee::Name, and AbstractFactory::Employee::Salary.
|
static |
The Boost property tree key for the employees' names.
Definition at line 40 of file ptree-employee-factory.h.
|
static |
The Boost property tree key for the employees' department names.
Definition at line 43 of file ptree-employee-factory.h.
|
static |
The Boost property tree key for the employees' salaries.
Definition at line 46 of file ptree-employee-factory.h.
|
private |
Definition at line 49 of file ptree-employee-factory.h.
Referenced by Create().