9 TSession(
const QByteArray &
id = QByteArray());
13 QByteArray
id()
const {
return sessionId; }
15 iterator insert(
const QString &key,
const QVariant &value);
16 int remove(
const QString &key);
17 QVariant take(
const QString &key);
18 const QVariant value(
const QString &key)
const;
19 const QVariant value(
const QString &key,
const QVariant &defaultValue)
const;
20 static QByteArray sessionName();
26 friend class TSessionCookieStore;
27 friend class TActionContext;
37 QVariantMap(*static_cast<const QVariantMap *>(&other)), sessionId(other.sessionId)
43 QVariantMap::operator=(*
static_cast<const QVariantMap *
>(&other));
44 sessionId = other.sessionId;
50 return QVariantMap::insert(key,
value);
55 return QVariantMap::remove(key);
60 return QVariantMap::take(key);
65 return QVariantMap::value(key);
68inline const QVariant
TSession::value(
const QString &key,
const QVariant &defaultValue)
const
70 return QVariantMap::value(key, defaultValue);
The TSession class holds information associated with individual visitors.
Definition tsession.h:7
TSession & operator=(const TSession &other)
Definition tsession.h:41
QVariant take(const QString &key)
Definition tsession.h:58
TSession(const QByteArray &id=QByteArray())
Constructs a empty session with the ID id.
Definition tsession.h:31
const QVariant value(const QString &key) const
Returns the value associated with the key.
Definition tsession.h:63
int remove(const QString &key)
Definition tsession.h:53
iterator insert(const QString &key, const QVariant &value)
Inserts a new item with the key and a value of value.
Definition tsession.h:48
QByteArray id() const
Returns the ID.
Definition tsession.h:13
#define T_CORE_EXPORT
Definition tdeclexport.h:28