Gobelijn API documentation
- generated for commit a0cbea7
|
Represents a simple Bicycle. More...
#include <Bicycle.h>
Public Member Functions | |
Bicycle () | |
Default constructor. More... | |
Bicycle (std::string model, std::string color) | |
Parametrized contructor, initialize model and color. More... | |
Bicycle (const Bicycle &ori) | |
Copy constructor. More... | |
Bicycle (Bicycle &&ori) noexcept | |
Move constructor. More... | |
Bicycle & | operator= (const Bicycle &rhs) |
Copy assignment. More... | |
Bicycle & | operator= (Bicycle &&rhs) noexcept |
Move assignment. More... | |
~Bicycle () override | |
Destructor. More... | |
std::string | getModel () const |
Return the model of the bike. More... | |
std::string | getColor () const |
Return the color of the bike. More... | |
void | setModel (std::string model) |
Set the model of the bike. More... | |
void | setColor (std::string color) |
Set the color of the bike. More... | |
void | info () const override |
Display info on model and color of the bike. More... | |
![]() | |
PassengerRoadVehicle (int numSeats) | |
Parametrized constructor, initializes number of seats. More... | |
PassengerRoadVehicle (PassengerRoadVehicle const &ori) | |
Copy constructor. More... | |
PassengerRoadVehicle (PassengerRoadVehicle &&ori) noexcept | |
Move constructor. More... | |
PassengerRoadVehicle & | operator= (PassengerRoadVehicle const &rhs) |
Copy assignment. More... | |
PassengerRoadVehicle & | operator= (PassengerRoadVehicle &&rhs) noexcept |
Move assignment. More... | |
~PassengerRoadVehicle () override | |
Destructor. More... | |
bool | add_passenger () |
Take an additional passenger on board, if possible. More... | |
bool | remove_passenger () |
Remove a passenger, if possible. More... | |
int | get_capacity () const |
Return the number of seats on the vehicle. More... | |
int | get_free () const |
Return the number of seats still free. More... | |
void | info () const override |
Return identification info. More... | |
![]() | |
RoadVehicle () | |
Default constructor. More... | |
RoadVehicle (const RoadVehicle &ori) | |
Copy constructor. More... | |
RoadVehicle (RoadVehicle &&ori) noexcept | |
Move constructor. More... | |
RoadVehicle & | operator= (const RoadVehicle &rhs) |
Copy assignment operator. More... | |
RoadVehicle & | operator= (RoadVehicle &&rhs) noexcept |
Move assignment operator. More... | |
~RoadVehicle () override | |
Destructor. More... | |
void | info () const override |
Return identification info. More... | |
void | move (double speed, std::vector< double > direction) override |
Motion of the vehicle. More... | |
![]() | |
LandVehicle () | |
default constructor. More... | |
LandVehicle (const LandVehicle &ori) | |
Copy constructor. More... | |
LandVehicle (LandVehicle &&ori) noexcept | |
Move constructor. More... | |
LandVehicle & | operator= (const LandVehicle &rhs) |
Copy assignment. More... | |
LandVehicle & | operator= (LandVehicle &&rhs) noexcept |
Move assignment. More... | |
~LandVehicle () override | |
Destructor. More... | |
![]() | |
virtual | ~Vehicle ()=default |
Destructor. More... | |
Private Attributes | |
std::string | m_model |
std::string | m_color |
ODemo::Bicycle::Bicycle | ( | ) |
ODemo::Bicycle::Bicycle | ( | std::string | model, |
std::string | color | ||
) |
Parametrized contructor, initialize model and color.
Definition at line 19 of file Bicycle.cpp.
References COMP_MISC_MEMBER_TRACER.
ODemo::Bicycle::Bicycle | ( | const Bicycle & | ori | ) |
|
noexcept |
|
override |
Copy assignment.
Definition at line 36 of file Bicycle.cpp.
References COMP_MISC_MEMBER_TRACER, m_color, m_model, and ODemo::PassengerRoadVehicle::operator=().
Move assignment.
Definition at line 47 of file Bicycle.cpp.
References COMP_MISC_MEMBER_TRACER, m_color, m_model, and ODemo::PassengerRoadVehicle::operator=().
string ODemo::Bicycle::getModel | ( | ) | const |
Return the model of the bike.
Definition at line 64 of file Bicycle.cpp.
References COMP_MISC_MEMBER_TRACER, and m_model.
string ODemo::Bicycle::getColor | ( | ) | const |
Return the color of the bike.
Definition at line 70 of file Bicycle.cpp.
References COMP_MISC_MEMBER_TRACER, and m_color.
void ODemo::Bicycle::setModel | ( | std::string | model | ) |
Set the model of the bike.
Definition at line 76 of file Bicycle.cpp.
References COMP_MISC_MEMBER_TRACER, and m_model.
void ODemo::Bicycle::setColor | ( | std::string | color | ) |
Set the color of the bike.
Definition at line 82 of file Bicycle.cpp.
References COMP_MISC_MEMBER_TRACER, and m_color.
|
overridevirtual |
Display info on model and color of the bike.
Implements ODemo::Vehicle.
Definition at line 88 of file Bicycle.cpp.
References COMP_MISC_LOG_TRACER, COMP_MISC_MEMBER_TRACER, m_color, and m_model.
Referenced by app_exception(), and app_hierarchies().
|
private |
Definition at line 56 of file Bicycle.h.
Referenced by getModel(), info(), operator=(), and setModel().
|
private |
Definition at line 57 of file Bicycle.h.
Referenced by getColor(), info(), operator=(), and setColor().