00001 #ifndef IGUANA_WEB_FRAMEWORK_IG_SESSION_MANAGER_H 00002 # define IGUANA_WEB_FRAMEWORK_IG_SESSION_MANAGER_H 00003 00004 //<<<<<< INCLUDES >>>>>> 00005 00006 # include "Iguana/WebFramework/interface/config.h" 00007 # include "Iguana/Framework/interface/IgStateElement.h" 00008 # include <string> 00009 # include <map> 00010 00011 //<<<<<< PUBLIC DEFINES >>>>>> 00012 //<<<<<< PUBLIC CONSTANTS >>>>>> 00013 //<<<<<< PUBLIC TYPES >>>>>> 00014 //<<<<<< PUBLIC VARIABLES >>>>>> 00015 //<<<<<< PUBLIC FUNCTIONS >>>>>> 00016 //<<<<<< CLASS DECLARATIONS >>>>>> 00017 00018 class IGUANA_WEB_FRAMEWORK_API IgSessionManager : public IgStateElement 00019 { 00020 IG_DECLARE_STATE_ELEMENT (IgSessionManager); 00021 public: 00022 IgSessionManager (IgState *state); 00023 ~IgSessionManager (void); 00024 00025 // implicit copy constructor 00026 // implicit assignment operator 00027 // implicit destructor 00028 void setSession (const std::string &idCookie, IgState *state); 00029 IgState *getSession (const std::string &idCookie); 00030 IgState *createSession (const std::string &idCookie, IgState *parent); 00031 private: 00032 typedef std::map <std::string, IgState *> StateMap; 00033 typedef std::pair <std::string, IgState *> StateMapElement; 00034 00035 IgState * m_state; 00036 StateMap m_stateMap; 00037 }; 00038 00039 //<<<<<< INLINE PUBLIC FUNCTIONS >>>>>> 00040 //<<<<<< INLINE MEMBER FUNCTIONS >>>>>> 00041 00042 #endif // IGUANA_WEB_FRAMEWORK_IG_SESSION_MANAGER_H