torc::physical::Config Class Reference

Configuration. A {name:value} pair. More...

#include <Config.hpp>

Inheritance diagram for torc::physical::Config:

Inheritance graph
[legend]
Collaboration diagram for torc::physical::Config:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 Config (void)
 Null constructor required by collections.
 Config (const string &inName, const string &inValue)
 Standard constructor.
const stringgetValue (void) const
 Return the configuration value.
SequenceIndex getOrder (void) const
 Return the configuration sequence index.
void setValue (const string &inValue)
 Set the configuration value.
void setName (const string &inName)
 Sets the object name.
bool operator== (const Config &rhs) const
 Comparison operator.

Protected Types

typedef std::string string
 Imported type name.

Protected Member Functions

void setOrder (SequenceIndex inOrder)
 Set the sequence index for this configuration.
 Config (const string &inName, const string &inValue, SequenceIndex inOrder)
 Protected copy constructor. This constructor allows the caller to specify the sequence index.

Protected Attributes

string mValue
 The configuration setting value.
SequenceIndex mOrder
 The sequence in which the configuration was created.

Static Protected Attributes

static const char * sConfigDefaultName = ""
 Default configuration name.
static const char * sConfigDefaultValue = "#OFF"
 Default configuration value.

Friends

class ConfigMap
 The ConfigMap class has direct access to our internals.
class torc::physical::physical::ConfigUnitTest
 Our unit test has direct access to our internals.


Detailed Description

Configuration. A {name:value} pair.

Config elements typically live in a ConfigMap, and by inheritance, in Design, Module, Instance, and Net objects. Within a ConfigMap, a setting name acts as a key that points to a Config, together forming the standard {setting:name:value} triplet.

Note:
The name mentioned here is a user-specified name stemming from the design. It is not the configuration setting name. For example, in configuration "DFF:blink:#FF", "DFF" is the specified setting, "blink" is the name that the design assigns to the corresponding resource, and "#FF" is the value to which "DFF" is set.

Definition at line 39 of file Config.hpp.


Member Typedef Documentation

typedef std::string torc::physical::Config::string [protected]

Imported type name.

Reimplemented from torc::physical::Named.

Reimplemented in torc::physical::Routethrough.

Definition at line 48 of file Config.hpp.


Constructor & Destructor Documentation

torc::physical::Config::Config ( const string inName,
const string inValue,
SequenceIndex  inOrder 
) [inline, protected]

Protected copy constructor. This constructor allows the caller to specify the sequence index.

Parameters:
inName The configuration name. The is a user-specified name, not a setting name.
inValue The configuration value.
inOrder The sequence index.

Definition at line 72 of file Config.hpp.

torc::physical::Config::Config ( void   )  [inline]

Null constructor required by collections.

Definition at line 77 of file Config.hpp.

torc::physical::Config::Config ( const string inName,
const string inValue 
) [inline]

Standard constructor.

Parameters:
inName The configuration name. The is a user-specified name, not a setting name.
inValue The configuration value.

Definition at line 82 of file Config.hpp.


Member Function Documentation

void torc::physical::Config::setOrder ( SequenceIndex  inOrder  )  [inline, protected]

Set the sequence index for this configuration.

Parameters:
inOrder The new sequence index.

Definition at line 65 of file Config.hpp.

const string& torc::physical::Config::getValue ( void   )  const [inline]

Return the configuration value.

Definition at line 86 of file Config.hpp.

SequenceIndex torc::physical::Config::getOrder ( void   )  const [inline]

Return the configuration sequence index.

Definition at line 88 of file Config.hpp.

void torc::physical::Config::setValue ( const string inValue  )  [inline]

Set the configuration value.

Definition at line 90 of file Config.hpp.

void torc::physical::Config::setName ( const string inName  )  [inline]

Sets the object name.

Config names can be changed arbitrarily, but other Named subclasses require more complex semantics to prevent name collisions.

Definition at line 94 of file Config.hpp.

bool torc::physical::Config::operator== ( const Config rhs  )  const [inline]

Comparison operator.

Returns:
true if specified configuration matches this one in both name and value, or false otherwise.

Definition at line 99 of file Config.hpp.


Friends And Related Function Documentation

friend class ConfigMap [friend]

The ConfigMap class has direct access to our internals.

Definition at line 42 of file Config.hpp.

friend class torc::physical::physical::ConfigUnitTest [friend]

Our unit test has direct access to our internals.

Definition at line 44 of file Config.hpp.


Member Data Documentation

const char * torc::physical::Config::sConfigDefaultName = "" [static, protected]

Default configuration name.

Definition at line 51 of file Config.hpp.

const char * torc::physical::Config::sConfigDefaultValue = "#OFF" [static, protected]

Default configuration value.

Definition at line 53 of file Config.hpp.

The configuration setting value.

Todo:
Consider typing mValue to something like SettingValueString.

Definition at line 57 of file Config.hpp.

The sequence in which the configuration was created.

This is used by the XDL exporter to preserve the original order in cases where multiple configurations exist for the same setting name.

Definition at line 61 of file Config.hpp.


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

Generated on Thu Oct 13 16:50:45 2011 for TORC by  doxygen 1.5.6