Otawa  0.10
otawa::AbstractRegistration Class Referenceabstract

Abstract class to represent the registered processors. More...

#include <otawa/proc/Registration.h>

Inheritance diagram for otawa::AbstractRegistration:
otawa::MetaRegistration otawa::NullRegistration otawa::p::declare otawa::Registration< T > otawa::Registration< BHTGetter > otawa::Registration< otawa::CAT2Builder > otawa::Registration< otawa::CFGChecker > otawa::Registration< otawa::DelayedBuilder > otawa::Registration< otawa::display::ILPSystemDisplayer > otawa::Registration< otawa::FixedTextDecoder > otawa::Registration< otawa::GraphBBTime< G > > otawa::Registration< otawa::GraphBBTime< ParExeGraph > > otawa::Registration< otawa::hard::Dumper > otawa::Registration< otawa::ipet::CachePenaltiesObjectFunctionBuilder > otawa::Registration< otawa::ipet::ConstraintLoader > otawa::Registration< otawa::ipet::VarAssignment > otawa::Registration< otawa::script::Script > otawa::Registration< otawa::SubCFGBuilder > otawa::Registration< otawa::tsim::BBTimeSimulator > otawa::Registration< otawa::tsim::Delta >

Public Member Functions

const stringname (void) const
 Get the name of the processor. More...
 
const Versionversion (void) const
 Get the version of the processor. More...
 
AbstractRegistrationbase (void) const
 
virtual Processormake (void) const =0
 Build the registered processor. More...
 
virtual bool isFinal (void) const =0
 
bool provides (const AbstractFeature &feature)
 Test if the current processor provides the given feature. More...
 
bool requires (const AbstractFeature &feature)
 Test if the current processor requires the given feature. More...
 
bool invalidates (const AbstractFeature &feature)
 Test if the current processor invalidates the given feature. More...
 
bool uses (const AbstractFeature &feature)
 Test if the current processor uses or requires the given feature. More...
 
void initialize (void)
 Internal. More...
 

Protected Member Functions

 AbstractRegistration (void)
 Build the registration. More...
 
 AbstractRegistration (AbstractRegistration *base)
 Build of a custom registration. More...
 
 AbstractRegistration (string name, Version version, AbstractRegistration *base)
 Build a new registration. More...
 
virtual ~AbstractRegistration (void)
 
void init (cstring name, const Version &version, int tag, VarArg &args)
 Initialize a registration from an argument list. More...
 
void setFeatures (const SLList< FeatureUsage > &features)
 Set the features. More...
 
void setConfigs (const SLList< AbstractIdentifier * > &configs)
 Set the configurations. More...
 
void record (void)
 

Private Attributes

string _name
 
Version _version
 
AbstractRegistration_base
 
SLList< AbstractIdentifier * > configs
 
SLList< FeatureUsagefeatures
 

Friends

class declare
 
class Processor
 
class ConfigIter
 
class FeatureIter
 

Detailed Description

Abstract class to represent the registered processors.

Constructor & Destructor Documentation

otawa::AbstractRegistration::AbstractRegistration ( void  )
protected

Build the registration.

otawa::AbstractRegistration::AbstractRegistration ( AbstractRegistration base)
protected

Build of a custom registration.

Parameters
baseBase registration.

References _base, _name, _version, and base().

otawa::AbstractRegistration::AbstractRegistration ( string  name,
Version  version,
AbstractRegistration base 
)
protected

Build a new registration.

Parameters
nameProcessor name.
versionProcessor version.
baseBase processor.
virtual otawa::AbstractRegistration::~AbstractRegistration ( void  )
inlineprotectedvirtual

Member Function Documentation

AbstractRegistration& otawa::AbstractRegistration::base ( void  ) const
inline
void otawa::AbstractRegistration::init ( cstring  name,
const Version version,
int  tag,
VarArg args 
)
protected
void otawa::AbstractRegistration::initialize ( void  )
bool otawa::AbstractRegistration::invalidates ( const AbstractFeature feature)

Test if the current processor invalidates the given feature.

Parameters
featureTested feature.
Returns
True if the feature is invalidated, false else.

References otawa::FeatureUsage::invalidate.

const string & otawa::AbstractRegistration::name ( void  ) const
inline

Get the name of the processor.

Returns
Processor name.

Referenced by init(), initialize(), and otawa::Processor::process().

bool otawa::AbstractRegistration::provides ( const AbstractFeature feature)

Test if the current processor provides the given feature.

Parameters
featureTested feature.
Returns
True if the feature is provided, false else.

References otawa::FeatureUsage::provide.

void otawa::AbstractRegistration::record ( void  )
protected
bool otawa::AbstractRegistration::requires ( const AbstractFeature feature)

Test if the current processor requires the given feature.

Parameters
featureTested feature.
Returns
True if the feature is required, false else.

References otawa::FeatureUsage::require.

Referenced by otawa::AlternativeProcessor::AlternativeProcessor().

void otawa::AbstractRegistration::setConfigs ( const SLList< AbstractIdentifier * > &  coll)
protected

Set the configurations.

Parameters
collConfigures to set.

References configs, and otawa::p::use.

Referenced by otawa::p::declare::declare().

void otawa::AbstractRegistration::setFeatures ( const SLList< FeatureUsage > &  coll)
protected

Set the features.

Parameters
collFeatures to set.

References features, and otawa::p::use.

Referenced by otawa::p::declare::declare().

bool otawa::AbstractRegistration::uses ( const AbstractFeature feature)

Test if the current processor uses or requires the given feature.

Parameters
featureTested feature.
Returns
True if the feature is used or required, false else.

References otawa::FeatureUsage::require, and otawa::FeatureUsage::use.

Referenced by otawa::Processor::process().

const Version & otawa::AbstractRegistration::version ( void  ) const
inline

Get the version of the processor.

Returns
Processor version.

Referenced by init().

Friends And Related Function Documentation

friend class ConfigIter
friend
friend class declare
friend
friend class FeatureIter
friend
friend class Processor
friend

Member Data Documentation

AbstractRegistration* otawa::AbstractRegistration::_base
private
string otawa::AbstractRegistration::_name
private
Version otawa::AbstractRegistration::_version
private
SLList<AbstractIdentifier *> otawa::AbstractRegistration::configs
private

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