Otawa  0.10
otawa::DynFeature Class Reference

This class is used to resolve feature found in plugins using ProcessorPlugin::getFeature() method. More...

#include <otawa/proc/DynFeature.h>

Public Member Functions

 DynFeature (string name)
 Build the dynamic featue. More...
 
 operator AbstractFeature * (void) const throw (FeatureNotFound)
 if not already done, bind the feature and return a pointer to. More...
 
AbstractFeatureoperator* (void) const throw (FeatureNotFound)
 if not already done, bind the feature and return a pointer to. More...
 
 operator AbstractFeature & (void) const throw (FeatureNotFound)
 

Private Member Functions

void init (void) const throw (FeatureNotFound)
 Bind the feature. More...
 

Private Attributes

AbstractFeaturefeature
 
string _name
 

Detailed Description

This class is used to resolve feature found in plugins using ProcessorPlugin::getFeature() method.

Notice that this class perform late binding: the feature is only resolved when it is used.

Constructor & Destructor Documentation

otawa::DynFeature::DynFeature ( string  name)

Build the dynamic featue.

Parameters
nameName of the feature.

Member Function Documentation

void otawa::DynFeature::init ( void  ) const
throw (FeatureNotFound
)
private

Bind the feature.

Exceptions
FeatureNotFoundLaunched when the feature can not be resolved.

References _name, feature, and otawa::ProcessorPlugin::getFeature().

Referenced by operator AbstractFeature &(), operator AbstractFeature *(), and operator*().

otawa::DynFeature::operator AbstractFeature & ( void  ) const
throw (FeatureNotFound
)
inline

References feature, and init().

otawa::DynFeature::operator AbstractFeature * ( void  ) const
throw (FeatureNotFound
)
inline

if not already done, bind the feature and return a pointer to.

Exceptions
FeatureNotFoundLaunched when the feature can not be resolved.

References feature, and init().

AbstractFeature * otawa::DynFeature::operator* ( void  ) const
throw (FeatureNotFound
)
inline

if not already done, bind the feature and return a pointer to.

Exceptions
FeatureNotFoundLaunched when the feature can not be resolved.

References feature, and init().

Member Data Documentation

string otawa::DynFeature::_name
private

Referenced by init().

AbstractFeature* otawa::DynFeature::feature
mutableprivate

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