Otawa  0.10
otawa::PropList Class Reference

This a list of properties. More...

#include <otawa/prop/PropList.h>

Inheritance diagram for otawa::PropList:
otawa::AbstractIdentifier otawa::ast::AST otawa::ast::ASTInfo otawa::BasicBlock otawa::cat::CATNode otawa::ccg::Edge otawa::ccg::LBlock otawa::CFG otawa::ContextTree otawa::ContextualProperty::Node otawa::dcache::BlockAccess otawa::display::Item otawa::Edge otawa::etime::Event otawa::File otawa::LBlock otawa::PCG otawa::PCGBlock otawa::Process otawa::ProgItem otawa::Segment otawa::SESERegion otawa::sim::State otawa::Symbol otawa::tsim::BBPath otawa::WorkSpace

Classes

class  Getter
 This class is used for accessing all properties of property list with a given identifier. More...
 
class  Iter
 This iterator is used for reading all properties of a property list. More...
 

Public Member Functions

 PropList (const PropList &props)
 Initialize a property list from a sequence of (identifier, value) pairs passed as variable arguments. More...
 
 PropList (void)
 Build an empty property list. More...
 
 ~PropList (void)
 
PropertygetProp (const AbstractIdentifier *id) const
 Find a property by its identifier. More...
 
void setProp (Property *prop)
 Set the property in the property list removing any double. More...
 
void removeProp (const AbstractIdentifier *id)
 Remove a property matching the given identifier. More...
 
void removeProp (const AbstractIdentifier &id)
 
PropertyextractProp (const AbstractIdentifier *id)
 Remove a property matching the given identifier and return it. More...
 
PropertyextractProp (const AbstractIdentifier &id)
 Remove a property matching the given identifier and return it. More...
 
void setProp (const AbstractIdentifier *id)
 
void addProp (Property *prop)
 Add property to the list without checking of duplication. More...
 
void removeAllProp (const AbstractIdentifier *id)
 Remove all the properties matching the given identifier. More...
 
bool hasProp (const AbstractIdentifier &id) const
 Test if the property list contains a property matching the given identifier. More...
 
void clearProps (void)
 Remove all properties from the list. More...
 
void addProps (const PropList &props)
 Add all properties from the given property list, in a reverse order. More...
 
void print (elm::io::Output &out) const
 Display the current property list. More...
 
PropListoperator= (const PropList &props)
 

Static Public Attributes

static const PropList EMPTY
 This is an empty proplist for convenience. More...
 

Private Attributes

Propertyhead
 

Detailed Description

This a list of properties.

This may be inherited for binding properties to other classes or used as-is for passing heterogeneous properties to a function call.

Constructor & Destructor Documentation

otawa::PropList::PropList ( const PropList props)
inline

Initialize a property list from a sequence of (identifier, value) pairs passed as variable arguments.

This list must be ended by an otawa::END identifier.

Parameters
idFirst identifier.
argsVariable arguments.

Build a property list as a copy of another one.

Parameters
propsProperty list to copy.

References addProps().

otawa::PropList::PropList ( void  )
inline

Build an empty property list.

otawa::PropList::~PropList ( void  )
inline

References clearProps().

Member Function Documentation

void otawa::PropList::clearProps ( void  )
Property * otawa::PropList::extractProp ( const AbstractIdentifier id)

Remove a property matching the given identifier and return it.

Caller is responsible of the management of the obtained property.

Parameters
idIdentifier of the property to extract.

References otawa::Property::_next, and otawa::Property::next().

Referenced by otawa::script::Script::makeConfig().

Property * otawa::PropList::extractProp ( const AbstractIdentifier id)
inline

Remove a property matching the given identifier and return it.

Caller is responsible of the management of the obtained property.

Parameters
idIdentifier of the property to extract.

References extractProp().

Referenced by extractProp().

bool otawa::PropList::hasProp ( const AbstractIdentifier id) const
inline

Test if the property list contains a property matching the given identifier.

Parameters
idProperty identifier to look for.
Returns
True if the list contains the matching property, false else.

References getProp().

Referenced by otawa::ipet::BasicConstraintsBuilder::addEntryConstraint(), otawa::Monitor::configure(), otawa::ImmutableRef< T, I >::exists(), and otawa::Manager::setVerbosity().

PropList& otawa::PropList::operator= ( const PropList props)
inline

References addProps(), and clearProps().

void otawa::PropList::print ( elm::io::Output out) const

Display the current property list.

Parameters
outOutput to use.

Referenced by otawa::operator<<(), and otawa::ContextualProperty::print().

void otawa::PropList::removeAllProp ( const AbstractIdentifier id)

Remove all the properties matching the given identifier.

Parameters
idIdentifier of properties to remove.

References otawa::Property::_next, and otawa::Property::next().

Referenced by otawa::LoopUnroller::unroll().

void otawa::PropList::removeProp ( const AbstractIdentifier id)
void otawa::PropList::removeProp ( const AbstractIdentifier id)
inline

References removeProp().

Referenced by removeProp().

void otawa::PropList::setProp ( Property prop)

Set the property in the property list removing any double.

Parameters
propProperty to set.

References otawa::Property::_next, otawa::Property::id(), and otawa::Property::next().

void otawa::PropList::setProp ( const AbstractIdentifier id)
inline

References setProp().

Referenced by setProp().

Member Data Documentation

const PropList otawa::PropList::EMPTY
static

This is an empty proplist for convenience.

Property* otawa::PropList::head
mutableprivate

Referenced by addProps().


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