-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cxx
More file actions
25 lines (20 loc) · 725 Bytes
/
main.cxx
File metadata and controls
25 lines (20 loc) · 725 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
//-----------------------------------------------------------------------------
// File: main.cxx
// Author: Enhope
// Date: 31-05-2019
//-----------------------------------------------------------------------------
#include <iostream>
#include "ToyFactory.hxx"
#include "plog/Log.h"
#include "plog/Appenders/ColorConsoleAppender.h"
//-----------------------------------------------------------------------------
int main()
{
static plog::ColorConsoleAppender<plog::TxtFormatter> consoleAppender;
plog::init(plog::debug, &consoleAppender);
PLOGI << "Begin the factory pattern";
ToyFactory tf;
Toy::ToyPtr created_toy = tf.createToy(Factory::BIKE);
created_toy->showProduct();
return 0;
}