Feature.h File Reference

Feature interface declaration More...

#include "../util/defines.h"
#include <time.h>
#include <assert.h>

Go to the source code of this file.

Classes

class  Feature
class  PersistantFeature
class  FeatureProvider

DLL initialization functions

These functions will be called when a library is loaded or unloaded by the framework.

void library_initialize ()
void library_finalize ()

Defines

#define EXPORT_FEATURE(provider)

Typedefs

typedef parametermap providerparams
typedef parametermap featureparams
typedef pair< time_t, Feature * > aggregatefeature
typedef list< aggregatefeatureaggregatelist
typedef map< unsigned long,
double > 
membershiplist
typedef vector< Feature * > featurevector
typedef FeatureProvider *(* getProvider_t )(const providerparams &params)


Detailed Description

Feature interface declaration

This file contains the interfaces that have to be implemented to enable a sensor to be used by the framework.

© 2003-2004 by Rene Mayrhofer, Harald Radi

Date
2004-02-12 21:08:39 +0100 (Don, 12 Feb 2004)
Revision
612

Since:
Sun Mar 30 2003
Author:
Rene Mayrhofer <rene@mayrhofer.eu.org>

Harald Radi <harald.radi@nme.at>


This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

Id
Feature.h 612 2004-02-12 20:08:39Z harald

Define Documentation

#define EXPORT_FEATURE provider   ) 
 

Value:

 \
        static provider *fp; \
        void INIT_EXPORT library_initialize() { fp = NULL; } \
        void FINI_EXPORT library_finalize() { if (fp != NULL) delete fp; } \ \
        extern "C" FEATURE_EXPORT FeatureProvider* getProvider(providerparams &params) { if (fp == NULL) fp = new provider(params); return fp; }
Export a feature provider

This macro has to be used in global scope and gets substituted with the implementation for exporting a FeatureProvider singleton instance to the framework.

Parameters:
provider The Class that implements the FeatureProvider interface and should be exported to the framework.


Typedef Documentation

typedef pair<time_t, Feature*> aggregatefeature
 

A <timestamp, Feature> tuple

typedef list<aggregatefeature> aggregatelist
 

A list of <timestamp, Feature> tuples

typedef parametermap featureparams
 

Todo:
documentation

typedef vector<Feature*> featurevector
 

Ordered list of features

This is one of the basic datatypes in this framework. It represents an ordered list of features, which describes a single point in the heterogeneous feature space.

Note:
The elements of this vector are pointers to feature objects. Therefore, the memory management of its members is not defined globally but depends on the method which returns or creates a featurevector.

typedef FeatureProvider*(* getProvider_t)(const providerparams &params)
 

Type of the getProvider function

This type definition is needed by the FeatureContainer to query a Feature implementation for an instance of its class.

typedef map<unsigned long, double> membershiplist
 

A map type for returning membership values for each cluster.

typedef parametermap providerparams
 

Parameters passed to feature providers

When initializing a feature provider, an arbitrary number of named (string) parameters can be passed from the application (e.g. read from a config file). These key-value tuples can then be used by the feature provider as configuration or initialization values. They are completely FeatureProvider specific.

The same structure is also used to store and read persistant feature data.

See also:
FeatureProvider

PersistantFeature


Function Documentation

void library_finalize  ) 
 

Unload library

void library_initialize  ) 
 

Load library


Generated on Mon Jun 5 10:20:48 2006 for Intelligence.kdevelop by  doxygen 1.4.6