Racing Web
Car.h
Go to the documentation of this file.
1// Copyright (c) 2022 Cameron King.
2// Dual licensed under MIT and GPLv2 with OpenSSL exception.
3// See LICENSE for details.
5
6#ifndef RACINGWEB_SRC_CAR_H_
7#define RACINGWEB_SRC_CAR_H_
8
9#include <string>
10#include <utility>
11
13struct Car {
20 explicit Car(const int number, const std::string &car = "",
21 const std::string &driver = "") {
22 this->number = std::to_string(number);
23 this->car = car;
24 this->driver = driver;
25 }
26
33 explicit Car(const std::string &number, const std::string &car = "",
34 const std::string &driver = "") {
35 this->number = number;
36 this->car = car;
37 this->driver = driver;
38 }
39
41 std::string number;
43 std::string car = "";
45 std::string driver = "";
46};
47
48#endif // RACINGWEB_SRC_CAR_H_
a race participant
Definition: Car.h:13
Car(const std::string &number, const std::string &car="", const std::string &driver="")
create a racer
Definition: Car.h:33
Car(const int number, const std::string &car="", const std::string &driver="")
create a racer
Definition: Car.h:20
std::string driver
driver name ("" represents unspecified)
Definition: Car.h:45
std::string number
alphanumeric car number
Definition: Car.h:41
std::string car
car name ("" represents unspecified)
Definition: Car.h:43