![]() |
appkit
1.5.1
RoadNarrows Robotics Application Kit
|
#include <Session.h>
Public Member Functions | |
| Session (int nSessionId=0, const std::string &strSessionName="Session") | |
| Default initialization contructor. More... | |
| ~Session () | |
| Destructor. | |
| StateMach & | sm () |
| Session's state machine. More... | |
| int | getSessionId () const |
| Get session id. More... | |
| std::string | getSessionName () const |
| Get session name. More... | |
| void | setContext (void *pContext) |
| Set state relevant context. More... | |
| void * | getContext () |
| Get state relevant context. More... | |
| void | setError (int ecode, const char *sFmt,...) |
| Set session error. More... | |
| void | setFatal (int ecode, const char *sFmt,...) |
| Set session fatal error. More... | |
| int | getErrorCode () |
| Get the last error code. More... | |
| std::string | getErrorMsg () |
| Get the last error message. More... | |
| bool | isFatal () |
| Test if session is in fatal condition. More... | |
Protected Attributes | |
| int | m_nSessionId |
| session id | |
| std::string | m_strSessionName |
| session name | |
| StateMach | m_sm |
| session state machine | |
| void * | m_pContext |
| state specific data | |
| int | m_ecode |
| last error code | |
| char | m_bufErrorMsg [256] |
| error message | |
| bool | m_bHasFatal |
| does [not] have fatal condition | |
Session Class.
Session state data persist throughout the lifetime of an application or user session. Applications may support multiple sessions simultaneously.
|
inline |
|
inline |
Get state relevant context.
Definition at line 151 of file Session.h.
References m_pContext, setError(), and setFatal().
|
inline |
|
inline |
Get the last error message.
Definition at line 189 of file Session.h.
References m_bufErrorMsg.
|
inline |
Get session id.
Definition at line 121 of file Session.h.
References m_nSessionId.
|
inline |
Get session name.
Definition at line 131 of file Session.h.
References m_strSessionName.
|
inline |
Test if session is in fatal condition.
Definition at line 199 of file Session.h.
References m_bHasFatal.
|
inline |
Set state relevant context.
| pContext | State specific context data. |
Definition at line 141 of file Session.h.
References m_pContext.
| void Session::setError | ( | int | ecode, |
| const char * | sFmt, | ||
| ... | |||
| ) |
Set session error.
| ecode | Application specific error code. |
| sFmt | Format string. |
| ... | Formatted variable arguments. |
Definition at line 72 of file Session.cxx.
Referenced by getContext().
| void Session::setFatal | ( | int | ecode, |
| const char * | sFmt, | ||
| ... | |||
| ) |
Set session fatal error.
| ecode | Application specific error code. |
| sFmt | Format string. |
| ... | Formatted variable arguments. |
Definition at line 85 of file Session.cxx.
Referenced by getContext().
|
inline |