modules::Interface Class Reference

Common ancestor for interfaces. More...

#include <interface.h>

Inheritance diagram for modules::Interface:

databases::Database modules::ErrorInterface password::Encrypter databases::DBRemove databases::XMLExport databases::XMLImport filecomp::Compressor mail::Transport List of all members.

Public Member Functions

virtual ~Interface ()
 Destructor.
virtual Interfacesupports (PSIID sid)
 Determines whether the interface supports an optional feature.

Static Public Attributes

static PSIID const IID = 0x4227894c
 The interface unique identifier.

Detailed Description

Interface is the base class for all interfaces.

Interfaces are used by modules to expose functionality that may or may not be available depending on the module. They are obtained by other modules through the Module::factory() and Module::interface() functions, depending on whether the interface object returned is unique to the module (and owned by it) of if it is owned by the caller.

Each interface must have its own IID (Interface IDentifier), a unique number that will be used for identification when a module is looking for the availability of a specific interface.

Optionally, interfaces may override the supports() function to add a way to query for optional feature support.


Member Function Documentation

virtual Interface* modules::Interface::supports ( PSIID  sid  )  [inline, virtual]

Determines whether the interface supports an optional feature.

The default implementation always returns 0.

Parameters:
[in] fid The ID of the feature to test for availability. The possible values for this parameter is up to the implementer.
Returns:
The interface implementing the feature (which may be the same as interface being queried, depending on the implementation) if the feature is available, 0 otherwise.

Reimplemented in databases::Database.


The documentation for this class was generated from the following file:
Generated on Wed Aug 15 00:37:23 2007 for Epona API by  doxygen 1.5.2