Wt examples
3.7.1
|
Encapsulate a chat event. More...
#include <SimpleChatServer.h>
Public Types | |
enum | Type { Login, Logout, Rename, Message } |
Enumeration for the event type. More... | |
Public Member Functions | |
Type | type () const |
Get the event type. More... | |
const Wt::WString & | user () const |
Get the user who caused the event. More... | |
const Wt::WString & | message () const |
Get the message of the event. More... | |
const Wt::WString & | data () const |
Get the extra data for this event. More... | |
const Wt::WString | formattedHTML (const Wt::WString &user, Wt::TextFormat format) const |
Get the message formatted as HTML, rendered for the given user. More... | |
Private Member Functions | |
ChatEvent (const Wt::WString &user, const Wt::WString &message) | |
ChatEvent (Type type, const Wt::WString &user, const Wt::WString &data=Wt::WString::Empty) | |
Private Attributes | |
Type | type_ |
Wt::WString | user_ |
Wt::WString | data_ |
Wt::WString | message_ |
Friends | |
class | SimpleChatServer |
Encapsulate a chat event.
Definition at line 30 of file SimpleChatServer.h.
enum ChatEvent::Type |
Enumeration for the event type.
Enumerator | |
---|---|
Login | |
Logout | |
Rename | |
Message |
Definition at line 35 of file SimpleChatServer.h.
|
inlineprivate |
Definition at line 69 of file SimpleChatServer.h.
|
inlineprivate |
Definition at line 73 of file SimpleChatServer.h.
|
inline |
const WString ChatEvent::formattedHTML | ( | const Wt::WString & | user, |
Wt::TextFormat | format | ||
) | const |
Get the message formatted as HTML, rendered for the given user.
The format
indicates how the message should be formatted.
Definition at line 15 of file SimpleChatServer.C.
|
inline |
|
inline |
|
inline |
|
friend |
Definition at line 78 of file SimpleChatServer.h.
|
private |
Definition at line 63 of file SimpleChatServer.h.
|
private |
Definition at line 64 of file SimpleChatServer.h.
|
private |
Definition at line 61 of file SimpleChatServer.h.
|
private |
Definition at line 62 of file SimpleChatServer.h.