VoiceMan
Public Member Functions | Public Attributes | List of all members
ClientFactory Class Reference

The new client object factory. More...

Public Member Functions

auto_ptr< ClientcreateFakeClient () const
 Creates new fake client object. More...
 
auto_ptr< ClientcreateNewClient (auto_ptr< Socket > socket) const
 Creates new client object and sets initial values to all parameters. More...
 

Public Attributes

TextParam defaultPitch
 The default pitch value for new connections.
 
TextParam defaultRate
 The default rate value for new connections.
 
TextParam defaultVolume
 The default volume value for new connections.
 

Detailed Description

This class performs new client object creation. It contains initial values for text processing parameters and sets them to all newly created objects. The reference to this factory must be provided to main loop class for proper creation of new client objects.

See also
Client MainLoop

Member Function Documentation

auto_ptr<Client> ClientFactory::createFakeClient ( ) const
inline

This method creates new fake client object. "Fake" means this object is not associated with the real connection and only stores client specific data.

Returns
The new prepared fake client object
auto_ptr<Client> ClientFactory::createNewClient ( auto_ptr< Socket socket) const
inline

This method creates new "real" client and initiates all its internal variables. "Real" client means it is the client associated with the socket. The also can be "fake" client used to store client specific data but not associated with the socket.

Parameters
[in]socketThe socket object new client must be associated with
Returns
The prepared client object