CS207-HW3/Visit.hpp

36 lines
910 B
C++

#ifndef VISIT_HPP
#define VISIT_HPP
#include <iostream>
#include <istream>
#include <ostream>
#include <string>
#include <sys/types.h>
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