gfactory
Loading...
Searching...
No Matches
TeslaFactory.h
Go to the documentation of this file.
1#pragma once
2
3#include "Car.h"
4
5class Tesla : public Car {
6public:
7 // inherit the base (const std::shared_ptr<GOptions>&) ctor
8 using Car::Car;
9
10 Tesla(const std::shared_ptr<GOptions>&);
11 void go();
12 double autopilot[2][2];
13};
14
15extern "C" Car* CarFactory(const std::shared_ptr<GOptions>& g) { return static_cast<Car*>(new Tesla(g)); }
Car * CarFactory(const std::shared_ptr< GOptions > &g)
Definition Car.h:11
Car(const std::shared_ptr< GOptions > &g)
Definition Car.h:16
void go()
double autopilot[2][2]
Tesla(const std::shared_ptr< GOptions > &)