Question: Hello, this is Storage.h file. Who can write Storage.cpp for that header file ? #ifndef AGENDA_STORAGE_H #define AGENDA_STORAGE_H #include #include #include #include #include Meeting.hpp #include

Hello, this is Storage.h file. Who can write Storage.cpp for that header file ?
#ifndef AGENDA_STORAGE_H
#define AGENDA_STORAGE_H
#include
#include
#include
#include
#include "Meeting.hpp"
#include "User.hpp"
class Storage {
private:
/**
* default constructor
*/
Storage();
/**
* disallow the copy constructor and assign operator
*/
Storage(const Storage &t_another) = delete;
void operator=(const Storage &t_another) = delete;
/**
* read file content into memory
* @return if success, true will be returned
*/
bool readFromFile(void);
/**
* write file content from memory
* @return if success, true will be returned
*/
bool writeToFile(void);
public:
/**
* get Instance of storage
* @return the pointer of the instance
*/
static std::shared_ptr getInstance(void);
/**
* destructor
*/
~Storage();
// CRUD for User & Meeting
// using C++11 Function Template and Lambda Expressions
/**
* create a user
* @param a user object
*/
void createUser(const User &t_user);
/**
* query users
* @param a lambda function as the filter
* @return a list of fitted users
*/
std::list queryUser(std::function filter) const;
/**
* update users
* @param a lambda function as the filter
* @param a lambda function as the method to update the user
* @return the number of updated users
*/
int updateUser(std::function filter,
std::function switcher);
/**
* delete users
* @param a lambda function as the filter
* @return the number of deleted users
*/
int deleteUser(std::function filter);
/**
* create a meeting
* @param a meeting object
*/
void createMeeting(const Meeting &t_meeting);
/**
* query meetings
* @param a lambda function as the filter
* @return a list of fitted meetings
*/
std::list queryMeeting(
std::function filter) const;
/**
* update meetings
* @param a lambda function as the filter
* @param a lambda function as the method to update the meeting
* @return the number of updated meetings
*/
int updateMeeting(std::function filter,
std::function switcher);
/**
* delete meetings
* @param a lambda function as the filter
* @return the number of deleted meetings
*/
int deleteMeeting(std::function filter);
/**
* sync with the file
*/
bool sync(void);
private:
static std::shared_ptr m_instance;
std::list m_userList;
std::list m_meetingList;
bool m_dirty;
};
#endif

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!