#ifndef POST_H #define POST_H #include #include #include #include #include "content.h" #include using namespace std; using namespace std::chrono; class Fellow; /** * @brief The Post struct * 定义一次好友发来的请求/数据包 */ class Post { public: static time_point now(){ return time_point_cast(system_clock::now()); } decltype(now()) when = Post::now(); vector extra; string packetNo; IdType cmdId; shared_ptr from; vector> contents; Post() { from = make_shared(); } void addContent(shared_ptr content) { content->setPacketNo(packetNo); contents.push_back(content); } }; #endif // POST_H