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
9class Shape : public GBase<Shape> {
10public:
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
20class Triangle : public Shape {
21public:
22 // inherit the base (const std::shared_ptr<GOptions>&) ctor
23 using Shape::Shape;
24 void Area();
25};
26
27
28class Box : public Shape {
29public:
30 // inherit the base (const std::shared_ptr<GOptions>&) ctor
31 using Shape::Shape;
32 void Area();
33};
void Area()
~Shape() override=default
Shape(const std::shared_ptr< GOptions > &g)
virtual void Area()=0
void Area()
constexpr const char * PLUGIN_LOGGER