Encapsulate a chat event.
More...
#include <SimpleChatServer.h>
Detailed Description
Encapsulate a chat event.
Definition at line 30 of file SimpleChatServer.h.
Member Enumeration Documentation
Enumeration for the event type.
- Enumerator:
Login |
|
Logout |
|
Rename |
|
Message |
|
Definition at line 35 of file SimpleChatServer.h.
Constructor & Destructor Documentation
Member Function Documentation
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.
{
return WString::fromUTF8("<span class='chat-info'>")
+ WWebWidget::escapeText(
user_) +
" joined.</span>";
return WString::fromUTF8("<span class='chat-info'>")
WString::fromUTF8("You") :
WWebWidget::escapeText(
user_))
+ " logged out.</span>";
return "<span class='chat-info'>"
"You are" :
(WWebWidget::escapeText(
user_) +
" is"))
+
" now known as " + WWebWidget::escapeText(
data_) +
".</span>";
"chat-self" :
"chat-user")
+
"'>" + WWebWidget::escapeText(
user_) +
":</span>";
return result + "<span class='chat-highlight'>" + msg + "</span>";
else
return result + msg;
}
default:
return "";
}
}
Type ChatEvent::type |
( |
| ) |
const |
|
inline |
Friends And Related Function Documentation
Member Data Documentation
The documentation for this class was generated from the following files: