Gobelijn API documentation
- generated for commit a0cbea7
|
Main for Abstract Factory demo. More...
#include "constant-factory.h"
#include "employee.h"
#include "ptree-employee-factory.h"
#include "stdin-employee-factory.h"
#include <boost/property_tree/xml_parser.hpp>
#include <iostream>
Go to the source code of this file.
Functions | |
void | printEmployee (const Employee &employee) |
Writes to standard output all information that pertains to the given employee. More... | |
void | printEmployee (Factory< Employee > &factory) |
Instructs the given factory to create an Employee instance, and then writes all information pertaining to that instance to standard output. More... | |
boost::property_tree::ptree | toPtree (const Employee &employee) |
Creates a Boost property tree that represents the given employee instance. More... | |
int | main () |
Main for Abstract Factory demo.
Definition in file abstract-factory/main.cpp.
void printEmployee | ( | const Employee & | employee | ) |
Writes to standard output all information that pertains to the given employee.
Definition at line 52 of file abstract-factory/main.cpp.
References AbstractFactory::Employee::DepartmentName, AbstractFactory::Employee::Name, and AbstractFactory::Employee::Salary.
Referenced by main(), and printEmployee().
Instructs the given factory to create an Employee instance, and then writes all information pertaining to that instance to standard output.
Definition at line 63 of file abstract-factory/main.cpp.
References AbstractFactory::Factory< TResult, TArgs >::Create(), and printEmployee().
boost::property_tree::ptree toPtree | ( | const Employee & | employee | ) |
Creates a Boost property tree that represents the given employee instance.
Definition at line 68 of file abstract-factory/main.cpp.
References AbstractFactory::Employee::DepartmentName, AbstractFactory::PtreeEmployeeFactory::EmployeeDepartmentNameKey, AbstractFactory::PtreeEmployeeFactory::EmployeeNameKey, AbstractFactory::PtreeEmployeeFactory::EmployeeSalaryKey, AbstractFactory::Employee::Name, and AbstractFactory::Employee::Salary.
Referenced by main().
int main | ( | ) |
Definition at line 77 of file abstract-factory/main.cpp.
References AbstractFactory::StdinEmployeeFactory::Create(), AbstractFactory::Employee::DepartmentName, AbstractFactory::Employee::Name, printEmployee(), AbstractFactory::Employee::Salary, and toPtree().