CS207-HW3/Visit.hpp

39 lines
973 B
C++
Raw Normal View History

2024-12-04 08:51:16 +00:00
#ifndef VISIT_HPP
#define VISIT_HPP
#include <iostream>
#include <istream>
#include <ostream>
#include <string>
2024-12-04 08:55:46 +00:00
// Fix u_int_32_t not on windows
#include <cstdint>
typedef std::uint32_t u_int32_t;
2024-12-04 08:51:16 +00:00
class Visit {
// clang-format off
private:
u_int32_t visit_id{};
u_int32_t patient_id{};//.txt
std::string date{}; //"dd/mm/yyyy"
std::string doctor_first_name{};
std::string doctor_last_name{};
// clang-format on
public:
Visit() {}
Visit(u_int32_t visit_id, u_int32_t patient_id, std::string date,
std::string doctor_first_name, std::string doctor_last_name)
: visit_id(visit_id), patient_id(patient_id), date(date),
doctor_first_name(doctor_first_name),
doctor_last_name(doctor_last_name) {}
// clang-format off
// clang-format on
friend std::istream &operator>>(std::istream &in, Visit &visit);
friend std::ostream &operator<<(std::ostream &out, Visit &visit);
};
#endif