Gobelijn API documentation  - generated for commit a0cbea7
 All Classes Namespaces Files Functions Variables Typedefs Friends Macros Pages
ODemo::Bicycle Class Reference

Represents a simple Bicycle. More...

#include <Bicycle.h>

Inheritance diagram for ODemo::Bicycle:
Inheritance graph
Collaboration diagram for ODemo::Bicycle:
Collaboration graph

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...
 
Bicycleoperator= (const Bicycle &rhs)
 Copy assignment. More...
 
Bicycleoperator= (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...
 
- Public Member Functions inherited from ODemo::PassengerRoadVehicle
 PassengerRoadVehicle (int numSeats)
 Parametrized constructor, initializes number of seats. More...
 
 PassengerRoadVehicle (PassengerRoadVehicle const &ori)
 Copy constructor. More...
 
 PassengerRoadVehicle (PassengerRoadVehicle &&ori) noexcept
 Move constructor. More...
 
PassengerRoadVehicleoperator= (PassengerRoadVehicle const &rhs)
 Copy assignment. More...
 
PassengerRoadVehicleoperator= (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...
 
- Public Member Functions inherited from ODemo::RoadVehicle
 RoadVehicle ()
 Default constructor. More...
 
 RoadVehicle (const RoadVehicle &ori)
 Copy constructor. More...
 
 RoadVehicle (RoadVehicle &&ori) noexcept
 Move constructor. More...
 
RoadVehicleoperator= (const RoadVehicle &rhs)
 Copy assignment operator. More...
 
RoadVehicleoperator= (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...
 
- Public Member Functions inherited from ODemo::LandVehicle
 LandVehicle ()
 default constructor. More...
 
 LandVehicle (const LandVehicle &ori)
 Copy constructor. More...
 
 LandVehicle (LandVehicle &&ori) noexcept
 Move constructor. More...
 
LandVehicleoperator= (const LandVehicle &rhs)
 Copy assignment. More...
 
LandVehicleoperator= (LandVehicle &&rhs) noexcept
 Move assignment. More...
 
 ~LandVehicle () override
 Destructor. More...
 
- Public Member Functions inherited from ODemo::Vehicle
virtual ~Vehicle ()=default
 Destructor. More...
 

Private Attributes

std::string m_model
 
std::string m_color
 

Detailed Description

Represents a simple Bicycle.

Definition at line 16 of file Bicycle.h.

Constructor & Destructor Documentation

ODemo::Bicycle::Bicycle ( )

Default constructor.

Definition at line 14 of file Bicycle.cpp.

References COMP_MISC_MEMBER_TRACER.

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)

Copy constructor.

Definition at line 25 of file Bicycle.cpp.

References COMP_MISC_MEMBER_TRACER.

ODemo::Bicycle::Bicycle ( Bicycle &&  ori)
noexcept

Move constructor.

Definition at line 30 of file Bicycle.cpp.

References COMP_MISC_MEMBER_TRACER.

ODemo::Bicycle::~Bicycle ( )
override

Destructor.

Definition at line 62 of file Bicycle.cpp.

References COMP_MISC_MEMBER_TRACER.

Member Function Documentation

Bicycle & ODemo::Bicycle::operator= ( const Bicycle rhs)

Copy assignment.

Definition at line 36 of file Bicycle.cpp.

References COMP_MISC_MEMBER_TRACER, m_color, m_model, and ODemo::PassengerRoadVehicle::operator=().

Here is the call graph for this function:

Bicycle & ODemo::Bicycle::operator= ( Bicycle &&  rhs)
noexcept

Move assignment.

Definition at line 47 of file Bicycle.cpp.

References COMP_MISC_MEMBER_TRACER, m_color, m_model, and ODemo::PassengerRoadVehicle::operator=().

Here is the call graph for this function:

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.

void ODemo::Bicycle::info ( ) const
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().

Here is the caller graph for this function:

Member Data Documentation

std::string ODemo::Bicycle::m_model
private

Definition at line 56 of file Bicycle.h.

Referenced by getModel(), info(), operator=(), and setModel().

std::string ODemo::Bicycle::m_color
private

Definition at line 57 of file Bicycle.h.

Referenced by getColor(), info(), operator=(), and setColor().


The documentation for this class was generated from the following files: