TreeFrogFramework  2.8
twebsocketsession.h
Go to the documentation of this file.
1 #pragma once
2 #include <QVariant>
3 #include <TGlobal>
4 
5 class TSession;
6 
7 
8 class T_CORE_EXPORT TWebSocketSession : public QVariantMap {
9 public:
12  TWebSocketSession &operator=(const TWebSocketSession &);
13 
14  iterator insert(const QString &key, const QVariant &value);
15  const QVariant value(const QString &key) const;
16  const QVariant value(const QString &key, const QVariant &defaultValue) const;
17  TWebSocketSession &unite(const TSession &session);
18  void reset();
19 
20 private:
21  void clear() { } // disabled
22 };
23 
24 
26  QVariantMap()
27 {
28 }
29 
31  QVariantMap(*static_cast<const QVariantMap *>(&other))
32 {
33 }
34 
36 {
37  QVariantMap::operator=(*static_cast<const QVariantMap *>(&other));
38  return *this;
39 }
40 
41 inline TWebSocketSession::iterator TWebSocketSession::insert(const QString &key, const QVariant &value)
42 {
43  return QVariantMap::insert(key, value);
44 }
45 
46 inline const QVariant TWebSocketSession::value(const QString &key) const
47 {
48  return QVariantMap::value(key);
49 }
50 
51 inline const QVariant TWebSocketSession::value(const QString &key, const QVariant &defaultValue) const
52 {
53  return QVariantMap::value(key, defaultValue);
54 }
55 
57 {
58  QVariantMap::clear();
59 }
60 
The TSession class holds information associated with individual visitors.
Definition: tsession.h:7
The TWebSocketSession class holds information associated with individual visitors for WebSocket conne...
Definition: twebsocketsession.h:8
const QVariant value(const QString &key) const
Returns the value associated with the key.
Definition: twebsocketsession.h:46
TWebSocketSession()
Constructor.
Definition: twebsocketsession.h:25
void reset()
Resets the session.
Definition: twebsocketsession.h:56
iterator insert(const QString &key, const QVariant &value)
Inserts a new item with the key and a value of value.
Definition: twebsocketsession.h:41
TWebSocketSession & operator=(const TWebSocketSession &)
Definition: twebsocketsession.h:35
#define T_CORE_EXPORT
Definition: tdeclexport.h:28