68 lines
2.0 KiB
C++
68 lines
2.0 KiB
C++
|
#ifndef __SICCCOBJECT_H_
|
||
|
#define __SICCCOBJECT_H_
|
||
|
|
||
|
#include <iostream>
|
||
|
#include <chrono>
|
||
|
#include <cstdlib>
|
||
|
|
||
|
class Sicccobject {
|
||
|
public:
|
||
|
Sicccobject() {} // just for test cases
|
||
|
Sicccobject( const std::string& file,
|
||
|
const std::string& ftype,
|
||
|
const std::string& fpath,
|
||
|
const size_t sz)
|
||
|
: filename(file),
|
||
|
filetype(ftype),
|
||
|
path(fpath),
|
||
|
size(sz)
|
||
|
{
|
||
|
upload_date = std::chrono::system_clock::now();
|
||
|
}
|
||
|
|
||
|
Sicccobject( const char *const file,
|
||
|
const char *const ftype,
|
||
|
const char *const fpath,
|
||
|
const size_t sz)
|
||
|
: filename(file),
|
||
|
filetype(ftype),
|
||
|
path(fpath),
|
||
|
size(sz)
|
||
|
{
|
||
|
upload_date = std::chrono::system_clock::now();
|
||
|
}
|
||
|
|
||
|
Sicccobject(const std::string& file,
|
||
|
const std::string& ftype,
|
||
|
const std::string& fpath,
|
||
|
const size_t sz,
|
||
|
const std::chrono::time_point<std::chrono::system_clock>& date)
|
||
|
: filename(file),
|
||
|
filetype(ftype),
|
||
|
path(fpath),
|
||
|
size(sz),
|
||
|
upload_date(date) { }
|
||
|
|
||
|
Sicccobject(const Sicccobject&);
|
||
|
~Sicccobject() {}
|
||
|
Sicccobject& operator = (const Sicccobject&);
|
||
|
|
||
|
std::string get_filename() const { return filename; }
|
||
|
std::string get_filetype() const { return filetype; }
|
||
|
std::string get_path() const { return path; }
|
||
|
size_t get_size() const { return size; }
|
||
|
std::chrono::time_point<std::chrono::system_clock>
|
||
|
get_uploadtime() const { return upload_date; }
|
||
|
|
||
|
private:
|
||
|
std::string filename;
|
||
|
std::string filetype;
|
||
|
std::string path;
|
||
|
size_t size;
|
||
|
std::chrono::time_point<std::chrono::system_clock> upload_date;
|
||
|
};
|
||
|
|
||
|
std::ostream& operator << (std::ostream&, const Sicccobject&);
|
||
|
|
||
|
#endif /* __SICCCOBJECT_H_ */
|