#ifndef SNAPSHOT_CLASS_H_INCLUDED #define SNAPSHOT_CLASS_H_INCLUDED #include #include #include "t_extra.h" #include using namespace std; typedef unsigned long long ID_T; typedef unsigned long long ULL; /** * File structure: * * 0 ID * 1 Date * * 2 [list of paths...] */ #define SNAPSHOT_FILE_EXTENSION ".snap" #define SNAPSHOT_FOLDER "Snapshots" struct basic_snap_data{ string date = ""; string path = ""; ID_T id = 0; }; /* prototype declared here for use in other .cpp files...*/ map get_snapshot_info(); /* The snapshot_class will take a filename as an argument. If not given one, it will create a new snapshot.*/ class snapshot_class{ public: //constructors/destructors snapshot_class(const string&); snapshot_class(const char*); snapshot_class(); snapshot_class(const char&); //for memory management purposes... ~snapshot_class(); //public functions ID_T gid(); string gdate(); map gsnap(); void del(); void clear(); private: //variables string filename = string(); string date = chrono_date().asc_time; ID_T id = 0; shared_ptr> snapshot; //functions void constructor_tasks(const string&); void load_snapshot(const string&); }; #endif