FeatureProvider Class Reference

#include <Feature.h>

Inheritance diagram for FeatureProvider:

ActiveWindowFeatureProvider AudioFeatureProvider BluetoothFeatureProvider GSMFeatureProvider PHPWrapperFeatureProvider PowerFeatureProvider SystemCommandStringListFeatureProvider TimeFeatureProvider VideoFeatureProvider WlanFeatureProvider List of all members.

Public Member Functions

virtual ~FeatureProvider ()
virtual FeaturegetFeature (string name) const =0
virtual FeaturegetSample (string name) const =0
virtual void nextSample (clock_t checkpoint)=0
string getName () const
stringvectorgetFeatureList () const

Protected Member Functions

 FeatureProvider (string name, stringvector *features)

Detailed Description

FeatureProvider interface

Each feature that is used in the cluster space definition is provided by a feature provider. A feature provider can provide more than one feature and will be refered to by a unique name. A feature can then be unambiguously identified by a combination of its own name and the name of its feature provider. Thus the actual cluster space can be defined in a configuration file and the clustering infrastructure can fetch the according features based on that definition.

See also:
Feature

PersistantFeature


Constructor & Destructor Documentation

FeatureProvider::FeatureProvider string  name,
stringvector features
[inline, protected]
 

Constructor

Initializes the names of the provider and its features.

Parameters:
name Name of the provider.
features List of featurenames provided.

virtual FeatureProvider::~FeatureProvider  )  [inline, virtual]
 

Destructor

Empty virtual destructor to have an entry in the implementing classes method table. This ensures that derived classes get destructed correctly.


Member Function Documentation

virtual Feature* FeatureProvider::getFeature string  name  )  const [pure virtual]
 

Query feature instance

Query the feature provider for a specific feature initialized with random values.

Parameters:
name Name of the requested feature.
Returns:
An instance of the requested feature.

Implemented in ActiveWindowFeatureProvider, AudioFeatureProvider, BluetoothFeatureProvider, GSMFeatureProvider, PHPWrapperFeatureProvider, PowerFeatureProvider, SystemCommandStringListFeatureProvider, TimeFeatureProvider, VideoFeatureProvider, and WlanFeatureProvider.

stringvector* FeatureProvider::getFeatureList  )  const [inline]
 

Query list of provided features

Returns:
A list of feature names provided by that feature provider.

string FeatureProvider::getName  )  const [inline]
 

Query provider name

Returns:
A global unique name for the feature provider.

virtual Feature* FeatureProvider::getSample string  name  )  const [pure virtual]
 

Query sample instance

Query the feature provider for a sample value of the specified feature. Prior to this method you have to invoke nextSample().

Parameters:
name Name of the requested feature.
Returns:
An instance of the sample.
See also:
nextSample

Implemented in ActiveWindowFeatureProvider, AudioFeatureProvider, BluetoothFeatureProvider, BluetoothLinuxFeatureProvider, GSMFeatureProvider, PHPWrapperFeatureProvider, PowerFeatureProvider, SystemCommandStringListFeatureProvider, TimeFeatureProvider, VideoFeatureProvider, WlanFeatureProvider, and WlanLinuxFeatureProvider.

virtual void FeatureProvider::nextSample clock_t  checkpoint  )  [pure virtual]
 

Prepare sample

Prepare the feature provider to return the next sample from the sensor when getSample() is called.

Parameters:
checkpoint This parameter tells the feature extractor that it must not return sensordata sampled earlier than the given clock value.
See also:
getSample

Implemented in ActiveWindowFeatureProvider, AudioFeatureProvider, BluetoothFeatureProvider, GSMFeatureProvider, PHPWrapperFeatureProvider, PowerFeatureProvider, SystemCommandStringListFeatureProvider, TimeFeatureProvider, VideoFeatureProvider, WlanFeatureProvider, and WlanLinuxFeatureProvider.


The documentation for this class was generated from the following file:
Generated on Mon Jun 5 10:20:49 2006 for Intelligence.kdevelop by  doxygen 1.4.6