#include <ConfigMap.hpp>
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. |
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.
Definition at line 39 of file ConfigMap.hpp.
typedef std::string torc::physical::ConfigMap::string [protected] |
Imported type name.
Reimplemented in torc::physical::Circuit, torc::physical::Design, torc::physical::Instance, torc::physical::Module, and torc::physical::Net.
Definition at line 43 of file ConfigMap.hpp.
typedef std::multimap<std::string, Config> torc::physical::ConfigMap::super [protected] |
torc::physical::ConfigMap::ConfigMap | ( | void | ) | [inline] |
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] |
size_t torc::physical::ConfigMap::getConfigCount | ( | void | ) | const [inline] |
bool torc::physical::ConfigMap::configIsEmpty | ( | void | ) | const [inline] |
void torc::physical::ConfigMap::clearConfig | ( | void | ) | [inline] |
bool torc::physical::ConfigMap::hasConfig | ( | const string & | inSetting | ) | const [inline] |
Returns true if the specified setting exists in the map.
Definition at line 69 of file ConfigMap.hpp.
Looks up the specified setting in the map.
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. |
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.
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. |
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.
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.
inSetting | The setting of interest. | |
inName | The configuration name to set. | |
inValue | The configuration value to set. |
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).
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.
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.
Sequence index to use for the next configuration added to this map.
Definition at line 48 of file ConfigMap.hpp.