gfactory
Loading...
Searching...
No Matches
ShapeFactory.h
Go to the documentation of this file.
1
#pragma once
2
3
// gemc
4
#include "gbase.h"
5
6
// gfactory
7
#include "
gfactory_options.h
"
8
9
class
Shape
:
public
GBase<Shape> {
10
public
:
11
~Shape
()
override
=
default
;
12
13
explicit
Shape
(
const
std::shared_ptr<GOptions>& g) : GBase(g,
PLUGIN_LOGGER
) {
14
}
15
16
virtual
void
Area
() = 0;
17
18
};
19
20
class
Triangle
:
public
Shape
{
21
public
:
22
// inherit the base (const std::shared_ptr<GOptions>&) ctor
23
using
Shape::Shape
;
24
void
Area
();
25
};
26
27
28
class
Box
:
public
Shape
{
29
public
:
30
// inherit the base (const std::shared_ptr<GOptions>&) ctor
31
using
Shape::Shape
;
32
void
Area
();
33
};
Box
Definition
ShapeFactory.h:28
Box::Area
void Area()
Definition
ShapeFactory.cc:10
Shape
Definition
ShapeFactory.h:9
Shape::~Shape
~Shape() override=default
Shape::Shape
Shape(const std::shared_ptr< GOptions > &g)
Definition
ShapeFactory.h:13
Shape::Area
virtual void Area()=0
Triangle
Definition
ShapeFactory.h:20
Triangle::Area
void Area()
Definition
ShapeFactory.cc:6
gfactory_options.h
PLUGIN_LOGGER
constexpr const char * PLUGIN_LOGGER
Definition
gfactory_options.h:5
examples
ShapeFactory.h
Generated by
1.10.0