-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSessionsManager.h
More file actions
32 lines (29 loc) · 865 Bytes
/
SessionsManager.h
File metadata and controls
32 lines (29 loc) · 865 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#pragma once
#include "Session.h"
class SessionsManager
{
private:
unsigned int current_id;
std::vector<Session> all_sessions;
public:
SessionsManager();
SessionsManager(Session& s);
SessionsManager(const SessionsManager& other);
~SessionsManager() {}
int getSize()const { return all_sessions.size(); }
void switchsession(unsigned int id);
void save();
void saveAs(std::string name);
void createSession(Image*);
void addSession(Session s);
void removeCurrentSession();
void removeSessionById(unsigned int id);
void addSessionAndSwitch(Session s);
Session getSessionById(unsigned int id) const;
Session& operator[](unsigned int id);
Session operator[](unsigned int id) const;
Session& operator*();
Session operator*() const;
unsigned int getcurrentId() { return current_id; }
Session& getcurrentSession();
};