gfactory
Loading...
Searching...
No Matches
TeslaFactory.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
Car.h
"
4
5
class
Tesla
:
public
Car
{
6
public
:
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
15
extern
"C"
Car
*
CarFactory
(
const
std::shared_ptr<GOptions>& g) {
return
static_cast<
Car
*
>
(
new
Tesla
(g)); }
Car.h
CarFactory
Car * CarFactory(const std::shared_ptr< GOptions > &g)
Definition
TeslaFactory.h:15
Car
Definition
Car.h:11
Car::Car
Car(const std::shared_ptr< GOptions > &g)
Definition
Car.h:16
Tesla
Definition
TeslaFactory.h:5
Tesla::go
void go()
Definition
TeslaFactory.cc:6
Tesla::autopilot
double autopilot[2][2]
Definition
TeslaFactory.h:12
Tesla::Tesla
Tesla(const std::shared_ptr< GOptions > &)
Definition
TeslaFactory.cc:16
examples
TeslaFactory.h
Generated by
1.10.0