torc-master
|
Configuration setting map. More...
#include <ConfigMap.hpp>
Public Types | |
typedef const_iterator | const_iterator |
Constant iterator to {setting,Config} pairs. More... | |
Public Member Functions | |
ConfigMap (void) | |
Null constructor. More... | |
const_iterator | configBegin (void) const |
Returns the begin constant iterator for configurations. More... | |
const_iterator | configEnd (void) const |
Returns the end constant iterator for configurations. More... | |
size_t | getConfigCount (void) const |
Returns the number of configurations in the map. More... | |
bool | configIsEmpty (void) const |
Returns true if the configuration map is empty. More... | |
void | clearConfig (void) |
Clears the configuration map. More... | |
bool | hasConfig (const string &inSetting) const |
Returns true if the specified setting exists in the map. More... | |
bool | getConfig (const string &inSetting, Config &outConfig) |
Looks up the specified setting in the map. More... | |
bool | getConfig (const string &inSetting, string &outName, string &outValue) |
Looks up the specified setting in the map. More... | |
void | setConfig (const string &inSetting, const Config &inConfig) |
Sets the configuration for the given setting. More... | |
void | setConfig (const string &inSetting, const string &inName, const string &inValue) |
Sets the configuration for the given setting. More... | |
bool | removeConfig (const string &inSetting) |
Removes the named configuration. More... | |
void | addConfigs (const ConfigMap &inConfigMap) |
Merges the configurations from the given ConfigMap into this one. More... | |
std::pair< iterator, iterator > | getMultiConfigValues (const string &inSetting) |
Returns a range that encompasses all of the configurations for the given setting. More... | |
size_type | getMultiConfigCount (const string &inSetting) |
Returns the number of configurations for the given setting. More... | |
Static Public Member Functions | |
static bool | allowConfigDuplicates (const string &inSetting) |
Returns true if multiple configurations are allowed for the given setting. More... | |
Protected Types | |
typedef std::string | string |
Imported type name. More... | |
typedef std::multimap < std::string, Config > | super |
Convenience typedef to represent our superclass. More... | |
Protected Attributes | |
SequenceIndex | mNextSequenceIndex |
Sequence index to use for the next configuration added to this map. More... | |
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.
Definition at line 39 of file ConfigMap.hpp.
Constant iterator to {setting,Config} pairs.
Definition at line 52 of file ConfigMap.hpp.
|
protected |
Imported type name.
Definition at line 43 of file ConfigMap.hpp.
|
protected |
Convenience typedef to represent our superclass.
Definition at line 45 of file ConfigMap.hpp.
|
inline |
Null constructor.
Definition at line 55 of file ConfigMap.hpp.
|
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 159 of file ConfigMap.hpp.
|
inlinestatic |
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 177 of file ConfigMap.hpp.
|
inline |
Clears the configuration map.
Definition at line 67 of file ConfigMap.hpp.
|
inline |
Returns the begin constant iterator for configurations.
Definition at line 58 of file ConfigMap.hpp.
|
inline |
Returns the end constant iterator for configurations.
Definition at line 60 of file ConfigMap.hpp.
|
inline |
Returns true if the configuration map is empty.
Definition at line 65 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.
|
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.
|
inline |
Returns the number of configurations in the map.
Definition at line 63 of file ConfigMap.hpp.
|
inline |
Returns the number of configurations for the given setting.
Definition at line 186 of file ConfigMap.hpp.
|
inline |
Returns a range that encompasses all of the configurations for the given setting.
Definition at line 183 of file ConfigMap.hpp.
|
inline |
Returns true if the specified setting exists in the map.
Definition at line 69 of file ConfigMap.hpp.
|
inline |
Removes the named configuration.
inSetting | The configuration to remove. |
Definition at line 145 of file ConfigMap.hpp.
|
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.
|
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.
|
protected |
Sequence index to use for the next configuration added to this map.
Definition at line 48 of file ConfigMap.hpp.