46 #include <Xyce_config.h>
54 #include <N_ERH_Message.h>
55 #include <N_UTL_Demangle.h>
80 for (ParameterMap::const_iterator it = begin ; it != end ; ++it)
85 param.
setGiven(parameter_base,
false);
87 if (param.
isType<
double>())
91 setDefaultValue<double>(param, device_options.
minRes);
95 setDefaultValue<double>(param, device_options.
minCap);
97 param.
value<
double>(parameter_base) = getDefaultValue<double>(param);
99 else if (param.
isType<
bool>())
100 param.
value<
bool>(parameter_base) = getDefaultValue<bool>(param);
101 else if (param.
isType<
int>())
102 param.
value<
int>(parameter_base) = getDefaultValue<int>(param);
103 else if (param.
isType<
long>())
104 param.
value<
long>(parameter_base) = getDefaultValue<long>(param);
105 else if (param.
isType<std::string>())
106 param.
value<std::string>(parameter_base) = getDefaultValue<std::string>(param);
107 else if (param.
isType<std::vector<int> >())
108 (param.
value<std::vector<int> >(parameter_base)).clear();
109 else if (param.
isType<std::vector<double> >())
110 (param.
value<std::vector<double> >(parameter_base)).clear();
111 else if (param.
isType<std::vector<std::string> >())
112 (param.
value<std::vector<std::string> >(parameter_base)).clear();
132 Report::DevelFatal0() <<
"Parameter " << name <<
" does not exist in " << demangle(entity_type.name());
149 void typeMismatch(
const std::type_info &from_type,
const std::type_info &to_type)
151 Report::DevelFatal0() <<
"Attempting to cast parameter of type " << demangle(from_type.name()) <<
" to type " << demangle(to_type.name());
172 Report::DevelFatal0() <<
"Attempt to set MIN_CAP and MIN_RES on ParameterType::ExprAccess for parameter " << name <<
" in class " << parameter_data_class.name();
200 std::pair<ParameterMap::iterator, bool> result = map_.insert(ParameterMap::value_type(name, descriptor));
203 Report::DevelFatal0() <<
"Parameter " << name <<
" already added to class " << demangle(parameter_data_class.name());
void nonexistentParameter(const std::string &name, const std::type_info &entity_type)
Report casting error when attempting to cast from from_type to to_type.
Pure virtual class to augment a linear system.
void typeMismatch(const std::type_info &from_type, const std::type_info &to_type)
Report casting error when attempting to cast from from_type to to_type.
Base class for all parameters.
Parameter is subject to being set to minimum junction capacitance.
Parameter is subject to being set to minimum lead resistance.
Descriptor & setSerialNumber(int serial_number)
Sets the serial number used to store and retrieve given boolean from the GivenValueMap.
bool hasGivenMember() const
Tests if parameter has a given data member.
const T & value(const ParameterBase &entity) const
Returns the value of the parameter for the entity.
ExprAccess getExpressionAccess() const
Gets the expression access which describes the usage of the paramter.
void setValueGiven(ParameterBase ¶meter_base, int serial_number, bool value)
Set the given value state of a parameter.
Class Descriptor describes the parameters stored in the ParametricData parameter map.
void setDefaultParameters(ParameterBase ¶meter_base, ParameterMap::const_iterator begin, ParameterMap::const_iterator end, const DeviceOptions &device_options)
Set the default values for the parameter.
int getSerialNumber() const
Gets the serial number used to store and retireve given boolean fromt he GivenValueMap.
void setGiven(ParameterBase &entity, bool value) const
Sets the given state of the parameter to value.
bool isType() const
Tests entry data type.
Manages parameter binding for class C.
void checkExprAccess(const std::string &name, ParameterType::ExprAccess &expr_access, const std::type_info ¶meter_data_class)
Report error if both MIN_CAP and MIN_RES have been specified.