Public Types | Public Member Functions | List of all members
iipr::CSingleFeatureConsumer Class Reference

Feature consumer implmentation storing one feature only. More...

#include <CSingleFeatureConsumer.h>

Inheritance diagram for iipr::CSingleFeatureConsumer:
iipr::IFeaturesConsumer iipr::IFeaturesProvider istd::IChangeable istd::IChangeable istd::IPolymorphic istd::IPolymorphic

Public Types

enum  FeaturePolicy { FP_FIRST, FP_LAST, FP_HEAVIEST }
 Control storing of the features in the container. More...
 

Public Member Functions

 CSingleFeatureConsumer (int featurePolicy=FP_FIRST)
 
int GetFeaturePolicy () const
 Get feature adding policy. More...
 
void SetFeaturePolicy (int featurePolicy)
 Set feature adding policy. More...
 
virtual void ResetFeatures ()
 Remove all features from this container. More...
 
virtual bool AddFeature (const imeas::INumericValue *featurePtr, bool *isFullPtr=NULL)
 Add new feature to the set of features. More...
 
virtual int GetFeaturesCount () const
 Get number of stored features. More...
 
virtual const
imeas::INumericValue
GetFeature (int index) const
 Get access to single feature. More...
 

Detailed Description

Feature consumer implmentation storing one feature only.

Definition at line 18 of file CSingleFeatureConsumer.h.

Member Enumeration Documentation

Control storing of the features in the container.

Enumerator
FP_FIRST 

Only first feature is stored in the container.

FP_LAST 

Only last feature is stored in the container.

FP_HEAVIEST 

Only heaviest feature is stored in the container.

Definition at line 27 of file CSingleFeatureConsumer.h.

Constructor & Destructor Documentation

iipr::CSingleFeatureConsumer::CSingleFeatureConsumer ( int  featurePolicy = FP_FIRST)

Member Function Documentation

virtual bool iipr::CSingleFeatureConsumer::AddFeature ( const imeas::INumericValue featurePtr,
bool *  isFullPtr = NULL 
)
virtual

Add new feature to the set of features.

Parameters
featurePtrinstance of feature object. Please note, that the container takes controll over this object, so you cannot destroy this object manually. It cannot be NULL.
isFullPtrOptional parameter pointing at flag idicating that container is full. This flag will be set to true, if this container is full and it will not collect additional features. In other case the flag will be not changed.
Returns
true if the pushed feature is valid for this container and was inserted correctly.

Implements iipr::IFeaturesConsumer.

virtual const imeas::INumericValue& iipr::CSingleFeatureConsumer::GetFeature ( int  index) const
virtual

Get access to single feature.

Implements iipr::IFeaturesProvider.

int iipr::CSingleFeatureConsumer::GetFeaturePolicy ( ) const

Get feature adding policy.

See Also
FeaturePolicy
virtual int iipr::CSingleFeatureConsumer::GetFeaturesCount ( ) const
virtual

Get number of stored features.

Implements iipr::IFeaturesProvider.

virtual void iipr::CSingleFeatureConsumer::ResetFeatures ( )
virtual

Remove all features from this container.

Implements iipr::IFeaturesConsumer.

void iipr::CSingleFeatureConsumer::SetFeaturePolicy ( int  featurePolicy)

Set feature adding policy.

Note
Call of this function removes the current feature.

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

© 2007-2017 Witold Gantzke and Kirill Lepskiy