scim  1.4.18
scim::FilterManager Class Reference

#include <scim_filter_manager.h>

Public Member Functions

 FilterManager (const ConfigPointer &config)
 
 ~FilterManager ()
 
unsigned int number_of_filters () const
 Get the total number of Filters supported by all filter modules. More...
 
bool get_filter_info (unsigned int idx, FilterInfo &info) const
 Get the information of a specific filter by its index. More...
 
bool get_filter_info (const String &uuid, FilterInfo &info) const
 Get the information of a specific filter by its uuid. More...
 
void clear_all_filter_settings () const
 Clear all Filter settings for IMEngines. More...
 
size_t get_filters_for_imengine (const String &uuid, std::vector< String > &filters) const
 Get a list of Filters binded to an IMEngine. More...
 
void set_filters_for_imengine (const String &uuid, const std::vector< String > &filters) const
 Bind one or more Filters to an IMEngine. More...
 
size_t get_filtered_imengines (std::vector< String > &imengines) const
 Get a list of imengines which have one or more filters attached. More...
 
FilterFactoryPointer create_filter (unsigned int idx) const
 Create a FilterFactory according to its index. More...
 
FilterFactoryPointer create_filter (const String &uuid) const
 Create a FilterFactory according to its UUID. More...
 
IMEngineFactoryPointer attach_filters_to_factory (const IMEngineFactoryPointer &factory) const
 Attach all binded Filters to an IMEngineFactory object. More...
 

Constructor & Destructor Documentation

◆ FilterManager()

scim::FilterManager::FilterManager ( const ConfigPointer config)

◆ ~FilterManager()

scim::FilterManager::~FilterManager ( )

Member Function Documentation

◆ number_of_filters()

unsigned int scim::FilterManager::number_of_filters ( ) const

Get the total number of Filters supported by all filter modules.

◆ get_filter_info() [1/2]

bool scim::FilterManager::get_filter_info ( unsigned int  idx,
FilterInfo info 
) const

Get the information of a specific filter by its index.

Parameters
idxThe index of the filter, must between 0 to number_of_filters () - 1.
infoThe FilterInfo object to store the information.
Returns
true if this filter is ok and the information is stored correctly.

◆ get_filter_info() [2/2]

bool scim::FilterManager::get_filter_info ( const String uuid,
FilterInfo info 
) const

Get the information of a specific filter by its uuid.

Parameters
uuidThe uuid of the filter.
infoThe FilterInfo object to store the information.
Returns
true if this filter is ok and the information is stored correctly.

◆ clear_all_filter_settings()

void scim::FilterManager::clear_all_filter_settings ( ) const

Clear all Filter settings for IMEngines.

◆ get_filters_for_imengine()

size_t scim::FilterManager::get_filters_for_imengine ( const String uuid,
std::vector< String > &  filters 
) const

Get a list of Filters binded to an IMEngine.

Parameters
uuidThe uuid of the IMEngine to be queried.
filtersThe list of Filters' UUIDs binded to the IMEngine will be stored here.
Returns
How many filters binded to this IMEngine.

◆ set_filters_for_imengine()

void scim::FilterManager::set_filters_for_imengine ( const String uuid,
const std::vector< String > &  filters 
) const

Bind one or more Filters to an IMEngine.

Parameters
uuidThe uuid of the IMEngine to be binded.
filtersThe list of Filters' UUIDs to be binded to the IMEngine.

◆ get_filtered_imengines()

size_t scim::FilterManager::get_filtered_imengines ( std::vector< String > &  imengines) const

Get a list of imengines which have one or more filters attached.

Parameters
imenginesThe UUIDs of filtered imengines will be stored here.
Returns
How many imengines are being filtered.

◆ create_filter() [1/2]

FilterFactoryPointer scim::FilterManager::create_filter ( unsigned int  idx) const

Create a FilterFactory according to its index.

Parameters
idxThe index of the filter to be created, must be less than number_of_filters() - 1.
Returns
The pointer of the FilterFactory object.

◆ create_filter() [2/2]

FilterFactoryPointer scim::FilterManager::create_filter ( const String uuid) const

Create a FilterFactory according to its UUID.

Parameters
uuidThe UUID of the filter to be created.
Returns
The pointer of the FilterFactory object.

◆ attach_filters_to_factory()

IMEngineFactoryPointer scim::FilterManager::attach_filters_to_factory ( const IMEngineFactoryPointer factory) const

Attach all binded Filters to an IMEngineFactory object.

Parameters
factoryThe pointer to an IMEngineFactory object which would be filtered.
Returns
New pointer of IMEngineFactory object which has Filters binded.

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