ChatEvent Class Reference
[Chat example]

Encapsulate a chat event. More...

#include <SimpleChatServer.h>

List of all members.

Public Types

enum  Type { Login, Logout, Message }
 Enumeration for the event type. More...

Public Member Functions

Type type () const
 Get the event type.
const Wt::WStringuser () const
 Get the user who caused the event.
const Wt::WStringmessage () const
 Get the message of the event.
const Wt::WString formattedHTML (const Wt::WString &user) const
 Get the message formatted as HTML, rendered for the given user.

Private Member Functions

 ChatEvent (const Wt::WString &user, const Wt::WString &message)
 ChatEvent (Type type, const Wt::WString &user)

Private Attributes

Type type_
Wt::WString user_
Wt::WString message_

Friends

class SimpleChatServer


Detailed Description

Encapsulate a chat event.

Definition at line 24 of file SimpleChatServer.h.


Member Enumeration Documentation

enum ChatEvent::Type

Enumeration for the event type.

Enumerator:
Login 
Logout 
Message 

Definition at line 29 of file SimpleChatServer.h.


Constructor & Destructor Documentation

ChatEvent::ChatEvent ( const Wt::WString user,
const Wt::WString message 
) [inline, private]

Definition at line 55 of file SimpleChatServer.h.

ChatEvent::ChatEvent ( Type  type,
const Wt::WString user 
) [inline, private]

Definition at line 59 of file SimpleChatServer.h.


Member Function Documentation

Type ChatEvent::type (  )  const [inline]

Get the event type.

Definition at line 33 of file SimpleChatServer.h.

const Wt::WString& ChatEvent::user (  )  const [inline]

Get the user who caused the event.

Definition at line 37 of file SimpleChatServer.h.

const Wt::WString& ChatEvent::message (  )  const [inline]

Get the message of the event.

Definition at line 41 of file SimpleChatServer.h.

const WString ChatEvent::formattedHTML ( const Wt::WString user  )  const

Get the message formatted as HTML, rendered for the given user.

Definition at line 14 of file SimpleChatServer.C.


Friends And Related Function Documentation

friend class SimpleChatServer [friend]

Definition at line 63 of file SimpleChatServer.h.


Member Data Documentation

Type ChatEvent::type_ [private]

Definition at line 48 of file SimpleChatServer.h.

Wt::WString ChatEvent::user_ [private]

Definition at line 49 of file SimpleChatServer.h.

Wt::WString ChatEvent::message_ [private]

Definition at line 50 of file SimpleChatServer.h.


The documentation for this class was generated from the following files:
Generated on Mon Apr 14 15:15:04 2008 for Wt by doxygen 1.5.3