[Solved]Gatecontrolhpp Pragma Include Include Include Include Using Namespace Std Typedef Uint32t Q37025372
// GateControl.hpp //
#pragma once
#include
#include
#include
#include
using namespace std;
typedef uint32_t CardNumber;
typedef uint32_t GateNumber;
struct Authorization
{
Authorization() {}
Authorization(CardNumber number, const string& name, conststring& startTime, const string& endTime):number_(number),name_(name), startTime_(startTime), endTime_(endTime) {}
CardNumber number_;
string name_;
string startTime_;
string endTime_;
};
typedef map AuthorizationMap;
typedef AuthorizationMap::iterator AuthorizationIterator;
typedef AuthorizationVector;
struct Transaction
{
Transaction() {}
Transaction(CardNumber number, const string& name, conststring& date, const string& time, boolaccessAllowed):number_(number), name_(name), date_(date),time_(time), accessAllowed_(accessAllowed) {}
CardNumber number_;
string name_;
string date_;
string time_;
bool accessAllowed_;
};
typedef TransactionVector;
class GateControl
{
public:
bool AccessAllowed(CardNumber number);
bool AddAuthorization(CardNumber number, const string& name,const string& startTime, const string& endTime);
bool ChangeAuthorization(CardNumber number, const string&name, const string& startTime, const string& endTime);
bool DeleteAuthorization(CardNumber number);
void GetAllAuthorizations(AuthorizationVector&authorizationVector);
void GetAllTransactions(TransactionVector&transactionVector);
bool GetCardAuthorization(CardNumber number, Authorization&authorization);
bool GetCardTransaction(CardNumber number,TransactionVector& transactionVector);
private:
AuthorizationMap authorizationMap_;
TransactionVector trasnactionVector_;
};
—————————————————————————————————————————————
// GateControl.cpp //
#include
#include
#include
#include
#include “GateControl.hpp”
using namespace std;
extern string gCurrentDate;
extern string gCurrentTime;
bool AccessAllowed(CardNumber number) {
// FUNCTION BODY HERE. Please help. //
}
bool AddAuthorization(CardNumber number, const string& name,const string& startTime, const string& endTime) {
// FUNCTION BODY HERE. Please help. //
}
bool ChangeAuthorization(CardNumber number, const string&name, const string& startTime, const string& endtTime){
// FUNCTION BODY HERE. Please help. //
}
bool DeleteAuthorization(CardNumber number) {
// FUNCTION BODY HERE. Please help. //
}
void GetAllAuthorizations(AuthorizationVector&authorizationVector) {
AuthorizationIterator iterator;
// FUNCTION BODY HERE. Please help. //
}
void GetAllTransactions(TransactionVector&transactionVector) {
// FUNCTION BODY HERE. Please help. //
}
bool GetCardAuthorization(CardNumber number,AuthorizationVector& authorizationVector) {
// FUNCTION BODY HERE. Please help. //
}
bool GetCardTransaction(CardNumber number,TransactionVector& transactionVector) {
// FUNCTION BODY HERE. Please help. //
}
Here is the project I am working on right now. If someone couldhelp me with these 8 functions that would be great. And maybe asingle comment line, so I can better understand how you obtainedthe solution that would be awesome. Thank you for your help!
UPDATE: I apologize for the lack of information regarding theproblem. It is a software to control access of a company’sfacility. There are several buildings that are protected by anelectric gate. Employees use an authorized card to gain access tothe facility. The gate has a card reader that is connectedto a computer that will receive a card’s identifying number,validate the access, and operate the gate operator’s motor to openthe gate. The computer will record each transaction—the date andtime of each access, allowed or denied. Each table record isidentified by a four-digit card number and contains thecardholder’s name and the permissible access. A cardholder’s accesscan be restricted to a specific time range such as 8 AM to 5 PM.The GateControl software is surrounded by other software, thatprovides functions such as managing the authorization database,checking the transaction log, interfacing to the card reader, andoperating the motor that opens the gate.
Expert Answer
Answer to // GateControl.hpp // #pragma once #include #include #include #include using namespace std; typedef uint32_t CardNumber;… . . .
OR

