rewritten: sessions management

(Session, SessionContainer, SessionManager)
           now a Session object don't copy all fields in its copy constructor (only id)
           the rest fields are set after the object is inserted in SessionContainer
added:     after successfully login a session id is changed
added:     plugin.Call() methods with a first argument a pointer to a Session object



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@823 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
2012-03-17 05:11:23 +00:00
parent 70421b7bd1
commit e83fd91423
25 changed files with 444 additions and 183 deletions

View File

@@ -13,7 +13,7 @@
#include <vector>
class Session;
struct PluginDataBase
@@ -21,9 +21,12 @@ struct PluginDataBase
virtual ~PluginDataBase() {}
/*
!! CHECK ME
it is still in use?
when deleting sessions we first call Clear() method
consequently the destructor has nothing to do
(and it doesn not throw an exception)
(and it does not throw an exception)
*/
virtual void Clear() {}
};
@@ -35,6 +38,13 @@ class PluginData
{
public:
PluginData();
PluginData(const PluginData & p);
PluginData & operator=(const PluginData & p);
~PluginData();
void SetSession(Session * ses);
void Assign(size_t index, PluginDataBase * data);
void Assign(PluginDataBase * data);
@@ -43,17 +53,13 @@ public:
void DeleteAll();
PluginData();
PluginData(const PluginData & p);
PluginData & operator=(const PluginData & p);
~PluginData();
size_t Size() const;
void Resize(size_t new_size);
private:
Session * session;
std::vector<PluginDataBase*> table;
};