Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members

scim::ServerFactoryBase Class Reference
[Server]

The base class of the real input methods' ServerFactory classes. More...

#include <scim_server.h>

Inheritance diagram for scim::ServerFactoryBase:

Inheritance graph
[legend]
Collaboration diagram for scim::ServerFactoryBase:

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual ~ServerFactoryBase ()
 Virtual destructor.

virtual bool validate_encoding (const String &encoding) const
 Check if a encoding is supported by this ServerFactory.

virtual bool validate_locale (const String &locale) const
 Check if a locale is supported by this ServerFactory.

String get_encodings () const
 Get a list of all supported encodings, separated by comma.

String get_locales () const
 Get a list of all supported locales, separated by comma.

String get_default_encoding () const
 Get the default encoding of this input method server.

String get_default_locale () const
 Get the default locale of this input method server.

Pure virtual members.
These member functions must be implemented in derived classes.

virtual WideString get_name () const=0
 Get the name of this input method server.

virtual WideString get_authors () const=0
 Get the authors of this input method server.

virtual WideString get_credits () const=0
 Get the credits information of this input method server.

virtual WideString get_help () const=0
 Get the help information of this input method server.

virtual String get_uuid () const=0
 Get the UUID of this input method server.

virtual String get_icon_file () const=0
 Get the icon file path of this input method server.

virtual ServerInstancePointer create_server_instance (const String &encoding, int id=-1)=0
 Create a new ServerInstance object.


Protected Member Functions

void set_locales (const String &locales)
 Set the locales supported by this input method server.


Detailed Description

The base class of the real input methods' ServerFactory classes.

Each input method should implement a class derived from scim::ServerFactoryBase, which takes charge of holding shared data, creating ServerInstances etc.

Definition at line 126 of file scim_server.h.


Constructor & Destructor Documentation

virtual scim::ServerFactoryBase::~ServerFactoryBase  )  [virtual]
 

Virtual destructor.


Member Function Documentation

virtual WideString scim::ServerFactoryBase::get_name  )  const [pure virtual]
 

Get the name of this input method server.

This name should be a localized string.

Returns:
A WideString containing the name.

Implemented in scim::DummyServerFactory.

virtual WideString scim::ServerFactoryBase::get_authors  )  const [pure virtual]
 

Get the authors of this input method server.

This string should be a localized string.

Returns:
A WideString containing a list of the authors' name.

Implemented in scim::DummyServerFactory.

virtual WideString scim::ServerFactoryBase::get_credits  )  const [pure virtual]
 

Get the credits information of this input method server.

This string should be a localized string.

Returns:
A WideString containing the credits information.

Implemented in scim::DummyServerFactory.

virtual WideString scim::ServerFactoryBase::get_help  )  const [pure virtual]
 

Get the help information of this input method server.

This string should be a localized string.

Returns:
A WideString containing the help information.

Implemented in scim::DummyServerFactory.

virtual String scim::ServerFactoryBase::get_uuid  )  const [pure virtual]
 

Get the UUID of this input method server.

Each input method server has an unique UUID to distinguish itself from other servers.

You may use uuidgen command shipped with e2fsprogs package to generate this UUID.

Returns:
A String containing an unique UUID.

Implemented in scim::DummyServerFactory.

virtual String scim::ServerFactoryBase::get_icon_file  )  const [pure virtual]
 

Get the icon file path of this input method server.

Returns:
A String containing the icon file path on the local filesystem.

Implemented in scim::DummyServerFactory.

virtual ServerInstancePointer scim::ServerFactoryBase::create_server_instance const String encoding,
int  id = -1
[pure virtual]
 

Create a new ServerInstance object.

This method creates a new scim::ServerInstanceBase object with given encoding and id.

Parameters:
encoding - the working encoding.
id - the instance id, should be unique.
Returns:
A smart pointer points to this new ServerInstance object.

Implemented in scim::DummyServerFactory.

virtual bool scim::ServerFactoryBase::validate_encoding const String encoding  )  const [virtual]
 

Check if a encoding is supported by this ServerFactory.

The default implementation of this virtual function validates the encoding against the locale list set by method set_locales.

It should be enough in most case.

Parameters:
encoding - the encoding name to be checked.
Returns:
true if the encoding is supported, otherwise false.

Reimplemented in scim::DummyServerFactory.

virtual bool scim::ServerFactoryBase::validate_locale const String locale  )  const [virtual]
 

Check if a locale is supported by this ServerFactory.

The default implementation of this virtual function validates the locale against the locale list set by method set_locales.

It should be enough in most case.

Parameters:
locale - the locale name to be checked.
Returns:
true if the locale is supported, otherwise false.

Reimplemented in scim::DummyServerFactory.

String scim::ServerFactoryBase::get_encodings  )  const
 

Get a list of all supported encodings, separated by comma.

Returns:
A comma separated encoding list.

String scim::ServerFactoryBase::get_locales  )  const
 

Get a list of all supported locales, separated by comma.

Returns:
A comma separated locale list.

String scim::ServerFactoryBase::get_default_encoding  )  const
 

Get the default encoding of this input method server.

The default encoding is the first locale's encoding in the locale list, which is set by method set_locales.

Returns:
The default encoding name.

String scim::ServerFactoryBase::get_default_locale  )  const
 

Get the default locale of this input method server.

The default locale is the first locale in the locale list, which is set by method set_locales.

Returns:
The default locale name.

void scim::ServerFactoryBase::set_locales const String locales  )  [protected]
 

Set the locales supported by this input method server.

This method should be called within the constructors of the derived classes.

Parameters:
locales - a comma separated list containing all valid locales should be supported by this input method server. The first locale is the default one.


The documentation for this class was generated from the following file:
Generated on Fri May 7 17:27:28 2004 for scim by doxygen 1.3.6