41 #ifndef GENERIC_DEVICE_HPP 42 #define GENERIC_DEVICE_HPP 46 #include <boost/lexical_cast.hpp> 69 std::map<std::string, std::string>
vars;
121 template <
typename G>
124 if(parameters.find(key) == parameters.end())
126 THROW_ERROR(
"Parameter \"" + key +
"\" not found in target device parameters' list");
128 return boost::lexical_cast<G>(parameters.find(key)->second);
134 template <
typename G>
137 parameters[
key] = std::to_string(value);
146 return parameters.find(key) != parameters.end();
generic device description
void xload(const xml_element *node)
XML load specialization.
This class manages the circuit structures.
int debug_level
The debug level.
exceptions managed by PandA
G get_parameter(const std::string &key) const
Returns a parameter by key.
void load_devices()
Load device characteristics.
virtual ~generic_device()
Destructor of the class.
std::map< std::string, std::string > vars
map between bash variables and values
static generic_deviceRef factory(const ParameterConstRef &Param, const technology_managerRef &TM)
Factory method.
void set_parameter(const std::string &key, G value)
Sets the value of the parameter.
This class manages the technology library structures.
const ParameterConstRef Param
class containing all the parameters
void xwrite(xml_element *node)
XML write specialization.
#define THROW_ERROR(str_expr)
helper function used to throw an error in a standard way
const technology_managerRef TM
technology manager
std::map< std::string, std::string > parameters
Map of the technology parameter.
Template definition of refcount.
CONSTREF_FORWARD_DECL(Parameter)
bool has_parameter(const std::string &key) const
Check if parameter exist.
const std::map< std::string, std::string > & get_device_bash_vars() const
technology_managerRef get_technology_manager() const
Returns the technology manager.
Template borrowed from the ANTLR library by Terence Parr (http://www.jGuru.com - Software rights: htt...
generic_device(const ParameterConstRef &Param, const technology_managerRef &TM)
Constructor of the class.
REF_FORWARD_DECL(structural_manager)
void xload_device_parameters(const xml_element *dev_xml)
XML load of device parameters.