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

scim::ServerModule Class Reference
[Server]

The class to manipulate the server modules. More...

#include <scim_server_module.h>

Collaboration diagram for scim::ServerModule:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ServerModule ()
 Default constructor.

 ServerModule (const String &name, const ConfigPointer &config)
 Constructor.

bool load (const String &name, const ConfigPointer &config)
 Load a Server Module by its name.

bool unload ()
 Unload the Server Module.

bool valid () const
 Check if a module is loaded and initialized successfully.

unsigned int number_of_servers () const
 Get how many server factories supported by this module.

ServerFactoryPointer create_factory (unsigned int server) const
 Create a server instance for a server factory.


Detailed Description

The class to manipulate the server modules.

This is a wrapper of scim::Module class, which is specially for manipulating the server modules.

Definition at line 72 of file scim_server_module.h.


Constructor & Destructor Documentation

scim::ServerModule::ServerModule  ) 
 

Default constructor.

scim::ServerModule::ServerModule const String name,
const ConfigPointer config
 

Constructor.

Parameters:
name - the module's name, eg. "rawcode".
config - a smart pointer points to a ConfigBase instance.


Member Function Documentation

bool scim::ServerModule::load const String name,
const ConfigPointer config
 

Load a Server Module by its name.

Load a module into memory. If another module has been loaded into this object, then the old module will be unloaded first. If the old module is resident, false will be returned, and the old module will be untouched.

Parameters:
name - the name of the Server Module.
config - the ConfigBase instance to be used for storing/loading configs.
Returns:
true if success.

bool scim::ServerModule::unload  ) 
 

Unload the Server Module.

Returns:
true if sucessfully unloaded.

bool scim::ServerModule::valid  )  const
 

Check if a module is loaded and initialized successfully.

Returns:
true if a module is already loaded and initialized successfully.

unsigned int scim::ServerModule::number_of_servers  )  const
 

Get how many server factories supported by this module.

Returns:
the number of server factories.

ServerFactoryPointer scim::ServerModule::create_factory unsigned int  server  )  const
 

Create a server instance for a server factory.

Parameters:
server - the sequence number of this server factory, must be less than the result of number_of_servers method and greater than zero.
Returns:
A smart pointer to the server instance, NULL if failed.


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