26 lines
514 B
C++
26 lines
514 B
C++
#pragma once
|
|
|
|
#include <cstdint>
|
|
#include <exception>
|
|
#include <string>
|
|
|
|
namespace state {
|
|
class InvalidSavedStateException : std::exception {
|
|
public:
|
|
inline InvalidSavedStateException(const char *message): message(message) {};
|
|
const char *message;
|
|
};
|
|
|
|
class AppState {
|
|
public:
|
|
inline AppState() {};
|
|
AppState(std::string filename);
|
|
std::string to_string();
|
|
void save();
|
|
|
|
int64_t tgLastPostId = 0;
|
|
int64_t vkLastPostId = 0;
|
|
private:
|
|
std::string m_saveFilename;
|
|
};
|
|
} |