C_CPP/08_PTRN/MP/Vehicle.hpp

19 lines
381 B
C++
Raw Normal View History

2018-03-09 09:47:53 +01:00
#ifndef Vehicle_hpp
#define Vehicle_hpp
#include <iostream>
class Vehicle {
std::string _model;
public:
Vehicle(std::string model);
virtual ~Vehicle();
std::string model();
virtual int payload_kg() = 0;
virtual Vehicle* clone() {return nullptr;} // idiom "virtual constructor"
//virtual Vehicle* newInstance() = 0; // idiom "virtual constructor"
};
#endif