scim  1.4.18
scim::BackEndBase Class Reference

The interface class to manage a set of IMEngineFactory and IMEngineInstance objects. More...

#include <scim_backend.h>

Public Member Functions

String get_all_locales () const
 Get a list of all locales supported by all IMEngineFactories. More...
 
IMEngineFactoryPointer get_factory (const String &uuid) const
 
Methods to manipulate IMEngine Factories.
uint32 get_factories_for_encoding (std::vector< IMEngineFactoryPointer > &factories, const String &encoding=String("")) const
 Get the IMEngine factories list for specific encoding. More...
 
uint32 get_factories_for_language (std::vector< IMEngineFactoryPointer > &factories, const String &language=String("")) const
 Get the IMEngine factories list for specific language. More...
 
IMEngineFactoryPointer get_default_factory (const String &language, const String &encoding) const
 Get the default IMEngineFactory for a specific language and encoding. More...
 
void set_default_factory (const String &language, const String &uuid)
 Set the default IMEngineFactory for a specific language. More...
 
IMEngineFactoryPointer get_next_factory (const String &language, const String &encoding, const String &cur_uuid) const
 Get the next IMEngineFactory for a specific language and encoding. More...
 
IMEngineFactoryPointer get_previous_factory (const String &language, const String &encoding, const String &cur_uuid) const
 Get the previous IMEngineFactory for a specific language and encoding. More...
 
- Public Member Functions inherited from scim::ReferencedObject
bool is_referenced () const
 
void ref ()
 Increase an object's reference count by one. More...
 
void unref ()
 

Protected Member Functions

 BackEndBase (const ConfigPointer &config)
 Default constructor. More...
 
virtual ~BackEndBase ()
 
bool add_factory (const IMEngineFactoryPointer &factory)
 
void clear ()
 
- Protected Member Functions inherited from scim::ReferencedObject
 ReferencedObject ()
 Constructor. More...
 
virtual ~ReferencedObject ()=0
 Destructor. More...
 
void set_referenced (bool reference)
 

Detailed Description

The interface class to manage a set of IMEngineFactory and IMEngineInstance objects.

This is mainly an accessory interface class used by scim::FrontEndBase. Its responsibility is to hold a set of IMEngineFactory instances and manage the locales list supported by them.

Most developer should just use the default implementation scim::CommonBackEnd.

Constructor & Destructor Documentation

◆ BackEndBase()

scim::BackEndBase::BackEndBase ( const ConfigPointer config)
protected

Default constructor.

Parameters
configConfig object to be used.

◆ ~BackEndBase()

virtual scim::BackEndBase::~BackEndBase ( )
protectedvirtual

Member Function Documentation

◆ get_all_locales()

String scim::BackEndBase::get_all_locales ( ) const

Get a list of all locales supported by all IMEngineFactories.

Returns
A comma separated locales list.

◆ get_factory()

IMEngineFactoryPointer scim::BackEndBase::get_factory ( const String uuid) const
Returns
Return the pointer of a Factory.
Parameters
uuidThe uuid of the IMEngineFactory.

◆ get_factories_for_encoding()

uint32 scim::BackEndBase::get_factories_for_encoding ( std::vector< IMEngineFactoryPointer > &  factories,
const String encoding = String("") 
) const

Get the IMEngine factories list for specific encoding.

Parameters
factoriesthe vector to store the factories which support the encoding.
encodingthe encoding to be queried. If empty, all IMEngine factories will be returned.
Returns
the number of IMEngine factories found.

◆ get_factories_for_language()

uint32 scim::BackEndBase::get_factories_for_language ( std::vector< IMEngineFactoryPointer > &  factories,
const String language = String("") 
) const

Get the IMEngine factories list for specific language.

Parameters
factoriesthe vector to store the factories which support the encoding.
languagethe language to be queried. If empty, all IMEngine factories will be returned.
Returns
the number of IMEngine factories found.

◆ get_default_factory()

IMEngineFactoryPointer scim::BackEndBase::get_default_factory ( const String language,
const String encoding 
) const

Get the default IMEngineFactory for a specific language and encoding.

Parameters
languagethe language to be queried.
encodingthe encoding to be queried, if empty then don't match encoding.
Returns
the pointer of the default IMEngineFactory for this language.

◆ set_default_factory()

void scim::BackEndBase::set_default_factory ( const String language,
const String uuid 
)

Set the default IMEngineFactory for a specific language.

Parameters
languagethe language to be set.
uuidthe uuid of the default IMEngineFactory for this language.

◆ get_next_factory()

IMEngineFactoryPointer scim::BackEndBase::get_next_factory ( const String language,
const String encoding,
const String cur_uuid 
) const

Get the next IMEngineFactory for a specific language and encoding.

Parameters
languagethe language to be queried, if empty then don't match language.
encodingthe encoding to be queried, if empty then don't match encoding.
cur_uuidthe UUID of current IMEngineFactory.
Returns
the pointer of the next IMEngineFactory for this language and encoding corresponding to the current IMEngineFactory.

◆ get_previous_factory()

IMEngineFactoryPointer scim::BackEndBase::get_previous_factory ( const String language,
const String encoding,
const String cur_uuid 
) const

Get the previous IMEngineFactory for a specific language and encoding.

Parameters
languagethe language to be queried, if empty then don't match language.
encodingthe encoding to be queried, if empty then don't match encoding.
cur_uuidthe UUID of current IMEngineFactory.
Returns
the pointer of the previous IMEngineFactory for this language and encoding corresponding to the current IMEngineFactory.

◆ add_factory()

bool scim::BackEndBase::add_factory ( const IMEngineFactoryPointer factory)
protected

◆ clear()

void scim::BackEndBase::clear ( )
protected

The documentation for this class was generated from the following file: