torc::physical::ConfigMap Class Reference

Configuration setting map. More...

#include <ConfigMap.hpp>

Inheritance diagram for torc::physical::ConfigMap:

Inheritance graph
[legend]

List of all members.

Public Types

typedef const_iterator const_iterator
 Constant iterator to {setting,Config} pairs.

Public Member Functions

 ConfigMap (void)
 Null constructor.
const_iterator configBegin (void) const
 Returns the begin constant iterator for configurations.
const_iterator configEnd (void) const
 Returns the end constant iterator for configurations.
size_t getConfigCount (void) const
 Returns the number of configurations in the map.
bool configIsEmpty (void) const
 Returns true if the configuration map is empty.
void clearConfig (void)
 Clears the configuration map.
bool hasConfig (const string &inSetting) const
 Returns true if the specified setting exists in the map.
bool getConfig (const string &inSetting, Config &outConfig)
 Looks up the specified setting in the map.
bool getConfig (const string &inSetting, string &outName, string &outValue)
 Looks up the specified setting in the map.
void setConfig (const string &inSetting, const Config &inConfig)
 Sets the configuration for the given setting.
void setConfig (const string &inSetting, const string &inName, const string &inValue)
 Sets the configuration for the given setting.
void addConfigs (const ConfigMap &inConfigMap)
 Merges the configurations from the given ConfigMap into this one.
std::pair< iterator, iterator > getMultiConfigValues (const string &inSetting)
 Returns a range that encompasses all of the configurations for the given setting.
size_type getMultiConfigCount (const string &inSetting)
 Returns the number of configurations for the given setting.

Static Public Member Functions

static bool allowConfigDuplicates (const string &inSetting)
 Returns true if multiple configurations are allowed for the given setting.

Protected Types

typedef std::string string
 Imported type name.
typedef std::multimap
< std::string, Config
super
 Convenience typedef to represent our superclass.

Protected Attributes

SequenceIndex mNextSequenceIndex
 Sequence index to use for the next configuration added to this map.


Detailed Description

Configuration setting map.

A configuration map is a collection of {setting:name:value} triplets, used to represent additional information for netlist design elements. Every physical netlist element that can be configured inherits from this class: Design, Module, Instance, Net. Special Xilinx settings beginning with underscores are permitted to exist multiple times in the same ConfigMap. This is consistent with XDL usage, particularly in the case of XDL design statements.

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 ConfigMap.hpp.


Member Typedef Documentation

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

typedef std::multimap<std::string, Config> torc::physical::ConfigMap::super [protected]

Convenience typedef to represent our superclass.

Definition at line 45 of file ConfigMap.hpp.

Constant iterator to {setting,Config} pairs.

Definition at line 52 of file ConfigMap.hpp.


Constructor & Destructor Documentation

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

Null constructor.

Definition at line 55 of file ConfigMap.hpp.


Member Function Documentation

const_iterator torc::physical::ConfigMap::configBegin ( void   )  const [inline]

Returns the begin constant iterator for configurations.

Definition at line 58 of file ConfigMap.hpp.

const_iterator torc::physical::ConfigMap::configEnd ( void   )  const [inline]

Returns the end constant iterator for configurations.

Definition at line 60 of file ConfigMap.hpp.

size_t torc::physical::ConfigMap::getConfigCount ( void   )  const [inline]

Returns the number of configurations in the map.

Definition at line 63 of file ConfigMap.hpp.

bool torc::physical::ConfigMap::configIsEmpty ( void   )  const [inline]

Returns true if the configuration map is empty.

Definition at line 65 of file ConfigMap.hpp.

void torc::physical::ConfigMap::clearConfig ( void   )  [inline]

Clears the configuration map.

Definition at line 67 of file ConfigMap.hpp.

bool torc::physical::ConfigMap::hasConfig ( const string inSetting  )  const [inline]

Returns true if the specified setting exists in the map.

Todo:
Acquire mutex.

Todo:
Release mutex.

Definition at line 69 of file ConfigMap.hpp.

bool torc::physical::ConfigMap::getConfig ( const string inSetting,
Config outConfig 
) [inline]

Looks up the specified setting in the map.

Parameters:
inSetting The setting to query.
outConfig Reference to a configuration to be populated if the setting exists in the map. Default values are used if the setting does not exist.
Note:
If this is a special setting with multiple configuration entries, only the first one will be placed in outConfig.
Returns:
true if the settings exists in the map, or false otherwise.

Definition at line 82 of file ConfigMap.hpp.

bool torc::physical::ConfigMap::getConfig ( const string inSetting,
string outName,
string outValue 
) [inline]

Looks up the specified setting in the map.

Parameters:
inSetting The setting to query.
outName Reference to a string to accept the configuration name, or the default name if the setting does not exist.
outValue Reference to a string to accept the configuration value, or the default value if the setting does not exist.
Note:
If this is a special setting with multiple configuration entries, only the first one will be placed in outName and outValue.
Returns:
true if the settings exists in the map, or false otherwise.

Todo:
Acquire mutex.

Todo:
Release mutex.

Definition at line 95 of file ConfigMap.hpp.

void torc::physical::ConfigMap::setConfig ( const string inSetting,
const Config inConfig 
) [inline]

Sets the configuration for the given setting.

If this is a regular setting, then any existing configuration for the setting will be replaced, but if this is a special setting for which multiple configurations are allowed, it will be added to the map alongside the existing configurations.

Parameters:
inSetting The setting of interest.
inConfig The configuration to set.

Definition at line 119 of file ConfigMap.hpp.

void torc::physical::ConfigMap::setConfig ( const string inSetting,
const string inName,
const string inValue 
) [inline]

Sets the configuration for the given setting.

If this is a regular setting, then any existing configuration for the setting will be replaced, but if this is a special setting for which multiple configurations are allowed, it will be added to the map alongside the existing configurations.

Parameters:
inSetting The setting of interest.
inName The configuration name to set.
inValue The configuration value to set.

Todo:
Acquire mutex.

Todo:
Release mutex.

Definition at line 130 of file ConfigMap.hpp.

void torc::physical::ConfigMap::addConfigs ( const ConfigMap inConfigMap  )  [inline]

Merges the configurations from the given ConfigMap into this one.

For each setting, if the setting does not already exist in the map, it is added. If the setting does exist, then the incoming configuration either replaces the existing setting (in the case of regular settings), or is added to the map (in the case of special settings for which multiple configurations are allowed).

Todo:
Acquire mutex.

Todo:
Release mutex.

Definition at line 146 of file ConfigMap.hpp.

static bool torc::physical::ConfigMap::allowConfigDuplicates ( const string inSetting  )  [inline, static]

Returns true if multiple configurations are allowed for the given setting.

Special Xilinx settings prefixed with an underscore may have multiple configurations in the map.

Definition at line 164 of file ConfigMap.hpp.

std::pair<iterator, iterator> torc::physical::ConfigMap::getMultiConfigValues ( const string inSetting  )  [inline]

Returns a range that encompasses all of the configurations for the given setting.

Returns:
An iterator pair that encompasses all configurations for the setting. Refer to std::pair to determine how to extract the iterators.

Definition at line 170 of file ConfigMap.hpp.

size_type torc::physical::ConfigMap::getMultiConfigCount ( const string inSetting  )  [inline]

Returns the number of configurations for the given setting.

Definition at line 173 of file ConfigMap.hpp.


Member Data Documentation

Sequence index to use for the next configuration added to this map.

Definition at line 48 of file ConfigMap.hpp.


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

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