Otawa  0.10
otawa::script::ScriptItem Class Reference

These objects represents the item of the configuration of a script. More...

#include <otawa/script/Script.h>

Inherited by otawa::script::BoolItem, otawa::script::EnumItem, and otawa::script::StringItem.

Public Types

enum  type_t {
  T_BOOL = 0, T_INT = 1, T_STRING = 2, T_RANGE = 3,
  T_ENUM = 4, T_MAX = 5
}
 

Public Member Functions

virtual ~ScriptItem (void)
 
virtual string makeParam (const string &value)
 Called to generate the string of parameter value before passing it to the XSLT processor. More...
 

Static Public Member Functions

static ScriptItemparse (xom::Element &elt)
 Parse an XML element to build the matching script item. More...
 

Public Attributes

string name
 
type_t type
 
string deflt
 
string label
 
string help
 
bool multi
 

Static Public Attributes

static cstring type_labels []
 Label matching the scripts (as passed in XML item elements). More...
 

Protected Member Functions

 ScriptItem (type_t t, xom::Element &elt)
 Protected constructor. More...
 

Detailed Description

These objects represents the item of the configuration of a script.

Member Enumeration Documentation

Enumerator
T_BOOL 
T_INT 
T_STRING 
T_RANGE 
T_ENUM 
T_MAX 

Constructor & Destructor Documentation

otawa::script::ScriptItem::~ScriptItem ( void  )
virtual
otawa::script::ScriptItem::ScriptItem ( type_t  t,
xom::Element elt 
)
protected

Member Function Documentation

string otawa::script::ScriptItem::makeParam ( const string value)
virtual

Called to generate the string of parameter value before passing it to the XSLT processor.

The result must be an XPath valid expression.

Parameters
valueValue of the parameter.
Returns
XPath expression representing the parameter value.

References elm::value().

ScriptItem * otawa::script::ScriptItem::parse ( xom::Element elt)
static

Parse an XML element to build the matching script item.

Parameters
eltElement to parse.
Returns
Built element.
Exceptions
ParseErrorIf there is an error.

References _, elm::xom::Element::getAttributeValue(), ScriptItem(), T_MAX, and type_labels.

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

Member Data Documentation

string otawa::script::ScriptItem::deflt

Referenced by ScriptItem().

string otawa::script::ScriptItem::help

Referenced by ScriptItem().

string otawa::script::ScriptItem::label

Referenced by ScriptItem().

bool otawa::script::ScriptItem::multi

Referenced by ScriptItem().

string otawa::script::ScriptItem::name
type_t otawa::script::ScriptItem::type
cstring otawa::script::ScriptItem::type_labels
static
Initial value:
= {
"bool",
"int",
"string",
"range",
"enum",
""
}

Label matching the scripts (as passed in XML item elements).

Referenced by parse().


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