Xyce
6.1
|
Class Configuration contains device configuration data. More...
#include <N_DEV_Configuration.h>
Public Types | |
typedef std::map< NameLevelKey, Configuration *, NameLevelLess > | ConfigurationMap |
Public Member Functions | |
virtual | ~Configuration () |
ParametricData< void > & | getInstanceParameters () const |
Returns the instance parameter descriptions. More... | |
ParametricData< void > & | getModelParameters () const |
Returns the model parameter descriptions. More... | |
const std::string & | getName () const |
Returns the device name. More... | |
const std::string & | getDeviceTypeName () const |
Returns the device type name. More... | |
const std::string & | getInstanceDefaultParameterName () const |
Returns the instance default parameter name. More... | |
int | getNumNodes () const |
Returns the number of nodes of this device. More... | |
int | getNumOptionalNodes () const |
Returns the number of optional nodes of this device. More... | |
int | getNumFillNodes () const |
Returns the number of fill nodes of this device. More... | |
bool | getModelRequired () const |
Returns true of the model must be specified when defining an instance of this device. More... | |
bool | getLinearDevice () const |
Returns true of the model is a linear device. More... | |
bool | getPDEDevice () const |
Returns true of the model is a PDE device. More... | |
const std::string & | getPrimaryParameter () const |
Returns the default primary parameter of this device or the empty string if there is no primary parameter. More... | |
const std::vector< std::string > & | getModelTypeNames () const |
Returns a vector of strings that name all the model types defined of this model. More... | |
virtual Device * | factory (const FactoryBlock &factory_block)=0 |
Overriding function creates an instance this device. More... | |
virtual InstanceTypeId | instanceType () const =0 |
Returns the instance type identifier. More... | |
virtual ModelTypeId | modelType () const =0 |
Returns the model type identifier. More... | |
virtual ModelTypeId | modelGroup () const =0 |
Returns the model group identifier. More... | |
Static Public Member Functions | |
static const ConfigurationMap & | getConfigurationMap () |
Returns the configuration map of the system. More... | |
static const Configuration * | findConfiguration (const std::string &device_name, const int level) |
Returns the configuration associated with the device name and level or 0 if not found. More... | |
static Device * | createDevice (ModelTypeId model_type_id, const FactoryBlock &factory_block) |
Creates the specified device. More... | |
static ModelTypeId | getModelType (const std::string &model_name, const int level) |
Returns the model type identifier for the specified device, if the model type and level is not found, return an invalid type. More... | |
static ModelTypeId | getModelGroup (const std::string &device_name) |
Returns the model group of the device name. More... | |
Protected Member Functions | |
Configuration (ParametricData< void > &instance_parameters, ParametricData< void > &model_parameters, const char *name, const char *device_type_name, const char *instance_default_parameter_name, int num_nodes, int num_optional_nodes, int num_fill_nodes, bool model_required, bool linear_device, bool pde_device, const char *primary_parameter) | |
Populates the device configuration object. More... | |
void | addDevice (const char *model_name, const int model_level, ModelTypeId model_type_id, ModelTypeId model_group_id, int model_type_nodes, int model_group_nodes) |
Adds the device to the configuration. More... | |
void | addModel (const char *model_name, const int level, ModelTypeId model_type_id, ModelTypeId model_group_id) |
Adds a model name for the device to the configuration. More... | |
Private Member Functions | |
Configuration (const Configuration &) | |
No copies allowed. More... | |
Configuration & | operator= (const Configuration &) |
No assignment allowed. More... | |
Private Attributes | |
ParametricData< void > & | instanceParameters_ |
Reference to the Instance specific parameter map. More... | |
ParametricData< void > & | modelParameters_ |
Reference to the Model specific parameter map. More... | |
const std::string | name_ |
Name of the devive. More... | |
const std::string | deviceTypeName_ |
Type name of the device. More... | |
const std::string | instanceDefaultParameterName_ |
Default parameter name for the device instance. More... | |
int | numNodes_ |
Number of nodes of this device. More... | |
int | numOptionalNodes_ |
Number of optional nodes of this device. More... | |
int | numFillNodes_ |
Number of fill nodes of this device. More... | |
bool | modelRequired_ |
True if model is required. More... | |
bool | linearDevice_ |
True if model is a linear device. More... | |
bool | pdeDevice_ |
True if model is a PDE device. More... | |
std::string | primaryParameter_ |
Primary parameter name or the empty string if none. More... | |
std::vector< std::string > | modelTypeNames_ |
Vector of defined model type of this device's model. More... | |
Class Configuration contains device configuration data.
The DeviceTraits template describes the device and configuration is an object that holds the data obtained via the traits.
The configuration also maintains several containers that allow device, instance and model data and creation functions to be located by name and level.
Definition at line 332 of file N_DEV_Configuration.h.
typedef std::map<NameLevelKey, Configuration *, NameLevelLess> Xyce::Device::Configuration::ConfigurationMap |
Definition at line 335 of file N_DEV_Configuration.h.
|
inlineprotected |
Populates the device configuration object.
Note that the instanceParameters_ and modelParameters_ each reference the instanceParameters__ and modelParameters__ object of the derived Config<Traits> class. This really just keeps that casting down and could be implemented as ParametricData<void> objects here.
instance_parameters | |
model_parameters | |
name | |
device_type_name | |
num_nodes | |
num_optional_nodes | |
num_fill_nodes | |
model_required | |
primary_parameter |
Definition at line 453 of file N_DEV_Configuration.h.
|
inlinevirtual |
Definition at line 482 of file N_DEV_Configuration.h.
|
private |
No copies allowed.
|
protected |
Adds the device to the configuration.
device_name | const character pointer to the device name |
device_level | device level |
model_type_id | model type identifier of the device |
Definition at line 229 of file N_DEV_Configuration.C.
|
protected |
Adds a model name for the device to the configuration.
model_name | const character pointer to the model name |
level | model level of this model of the device |
model_type_id | model type identifier |
model_group_id | mode group identifier |
Definition at line 281 of file N_DEV_Configuration.C.
|
static |
Creates the specified device.
model_type | model type of the device to create |
factory_block | parameters provided to the factory function |
Definition at line 168 of file N_DEV_Configuration.C.
|
pure virtual |
Overriding function creates an instance this device.
Ownership of this object is passed to the caller which is responsible to destory the created object.
factory_block | reference to the parameter block |
Implemented in Xyce::Device::Config< T >.
|
static |
Returns the configuration associated with the device name and level or 0 if not found.
device_name | const reference to the device name |
level | device level |
Definition at line 153 of file N_DEV_Configuration.C.
|
static |
Returns the configuration map of the system.
The configuration map maps the device name and level pair to its configuration.
Definition at line 140 of file N_DEV_Configuration.C.
|
inline |
Returns the device type name.
Definition at line 521 of file N_DEV_Configuration.h.
|
inline |
Returns the instance default parameter name.
Definition at line 530 of file N_DEV_Configuration.h.
|
inline |
Returns the instance parameter descriptions.
Definition at line 494 of file N_DEV_Configuration.h.
|
inline |
Returns true of the model is a linear device.
Definition at line 578 of file N_DEV_Configuration.h.
|
static |
Returns the model group of the device name.
A device is registered as the model group when its model type identifier equals its model group identifier.
device_name | const reference to the device name |
Definition at line 211 of file N_DEV_Configuration.C.
|
inline |
Returns the model parameter descriptions.
Definition at line 503 of file N_DEV_Configuration.h.
|
inline |
Returns true of the model must be specified when defining an instance of this device.
Definition at line 569 of file N_DEV_Configuration.h.
|
static |
Returns the model type identifier for the specified device, if the model type and level is not found, return an invalid type.
model_name | const reference to the model name |
level | device level |
Definition at line 193 of file N_DEV_Configuration.C.
|
inline |
Returns a vector of strings that name all the model types defined of this model.
Definition at line 605 of file N_DEV_Configuration.h.
|
inline |
Returns the device name.
Definition at line 512 of file N_DEV_Configuration.h.
|
inline |
Returns the number of fill nodes of this device.
Definition at line 560 of file N_DEV_Configuration.h.
|
inline |
Returns the number of nodes of this device.
Definition at line 540 of file N_DEV_Configuration.h.
|
inline |
Returns the number of optional nodes of this device.
Definition at line 550 of file N_DEV_Configuration.h.
|
inline |
Returns true of the model is a PDE device.
Definition at line 587 of file N_DEV_Configuration.h.
|
inline |
Returns the default primary parameter of this device or the empty string if there is no primary parameter.
Definition at line 596 of file N_DEV_Configuration.h.
|
pure virtual |
Returns the instance type identifier.
Implemented in Xyce::Device::Config< T >.
|
pure virtual |
Returns the model group identifier.
Implemented in Xyce::Device::Config< T >.
|
pure virtual |
Returns the model type identifier.
Implemented in Xyce::Device::Config< T >.
|
private |
No assignment allowed.
|
private |
Type name of the device.
Definition at line 723 of file N_DEV_Configuration.h.
|
private |
Default parameter name for the device instance.
Definition at line 724 of file N_DEV_Configuration.h.
|
private |
Reference to the Instance specific parameter map.
Definition at line 720 of file N_DEV_Configuration.h.
|
private |
True if model is a linear device.
Definition at line 729 of file N_DEV_Configuration.h.
|
private |
Reference to the Model specific parameter map.
Definition at line 721 of file N_DEV_Configuration.h.
|
private |
True if model is required.
Definition at line 728 of file N_DEV_Configuration.h.
|
private |
Vector of defined model type of this device's model.
Definition at line 732 of file N_DEV_Configuration.h.
|
private |
Name of the devive.
Definition at line 722 of file N_DEV_Configuration.h.
|
private |
Number of fill nodes of this device.
Definition at line 727 of file N_DEV_Configuration.h.
|
private |
Number of nodes of this device.
Definition at line 725 of file N_DEV_Configuration.h.
|
private |
Number of optional nodes of this device.
Definition at line 726 of file N_DEV_Configuration.h.
|
private |
True if model is a PDE device.
Definition at line 730 of file N_DEV_Configuration.h.
|
private |
Primary parameter name or the empty string if none.
Definition at line 731 of file N_DEV_Configuration.h.