Xyce  6.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
N_DEV_CompositeParam.h
Go to the documentation of this file.
1 //-----------------------------------------------------------------------------
2 // Copyright Notice
3 //
4 // Copyright 2002 Sandia Corporation. Under the terms
5 // of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S.
6 // Government retains certain rights in this software.
7 //
8 // Xyce(TM) Parallel Electrical Simulator
9 // Copyright(C) 2002-2014 Sandia Corporation
10 //
11 // This program is free software: you can redistribute it and/or modify
12 // it under the terms of the GNU General Public License as published by
13 // the Free Software Foundation, either version 3 of the License, or
14 // (at your option) any later version.
15 //
16 // This program is distributed in the hope that it will be useful,
17 // but WITHOUT ANY WARRANTY; without even the implied warranty of
18 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 // GNU General Public License for more details.
20 //
21 // You should have received a copy of the GNU General Public License
22 // along with this program. If not, see <http://www.gnu.org/licenses/>.
23 //-----------------------------------------------------------------------------
24 
25 //-----------------------------------------------------------------------------
26 // Filename : $RCSfile: N_DEV_CompositeParam.h,v $
27 //
28 // Purpose : This file contains the device entity base class.
29 //
30 // Special Notes :
31 //
32 // Creator : Dave Shirley, PSSI
33 //
34 // Creation Date : 05/05/05
35 //
36 // Revision Information:
37 // ---------------------
38 //
39 // Revision Number: $Revision: 1.25.2.2 $
40 //
41 // Revision Date : $Date: 2014/03/03 18:29:27 $
42 //
43 // Current Owner : $Author: tvrusso $
44 //-----------------------------------------------------------------------------
45 #ifndef Xyce_N_DEV_CompositeParam_h
46 #define Xyce_N_DEV_CompositeParam_h
47 
48 #include <string>
49 
50 #include <N_DEV_Pars.h>
51 
52 namespace Xyce {
53 namespace Device {
54 
55 ///
56 /// CompositeParam is the base class for classes that wish to only manage the processing of parameter data.
57 ///
58 /// The DeviceEntity class is vary similar, except that it manages a device as well as the device's parameter data.
59 /// During DeviceEntity's processing of parameters, it may create several object of classes derived from CompositeParam
60 /// which hold the processes parametric data. The parametricData_ member holds the parameter descriptions the
61 /// Device::setParameters() function populates the values in the object of the derived class while the processParams()
62 /// virtual function can handle any additional processing of the parameters after they have been set.
63 /// parametricData_ object.
64 ///
65 /// See Device::populateParams() and Device::setParameters() in the DeviceEntity implementation file.
66 ///
67 /// @author David G. Baur Raytheon Sandia National Laboratories 1355
68 /// @date Wed Jan 29 17:26:35 2014
69 ///
71 {
72 public:
73  ///
74  /// CompositeParam sets the parametric data description.
75  ///
76  ///
77  /// @param parametric_data reference to the parametric data description
78  ///
79  /// @author David G. Baur Raytheon Sandia National Laboratories 1355
80  /// @date Wed Jan 29 17:33:22 2014
81  ///
83  : parametricData_(parametric_data)
84  {}
85 
86  virtual ~CompositeParam()
87  {}
88 
89 private:
90  CompositeParam(const CompositeParam &); ///< No copying
91  CompositeParam &operator=(const CompositeParam &); ///< No assignment
92 
93 public:
94  ///
95  /// processParams post processes the parameters that have been set in the object of the derived class.
96  ///
97  /// See Device::populateParams() and Device::setParameters() in the DeviceEntity implementation file.
98  ///
99  /// @author David G. Baur Raytheon Sandia National Laboratories 1355
100  /// @date Wed Jan 29 17:34:53 2014
101  ///
102  virtual void processParams() = 0;
103 
104  bool given(const std::string &parameter_name) const;
105 
106 
107  /// getParameterMap returns the parameter map which describes the parameters.
108  ///
109  /// @return reference to the parameter map
110  ///
111  /// @author David G. Baur Raytheon Sandia National Laboratories 1355
112  /// @date Wed Jan 29 17:49:10 2014
113  ///
115  {
116  return parametricData_.getMap();
117  }
118 
119 private:
120  ParametricData<void> & parametricData_; ///< Parameter data desciptions
121 };
122 
123 } // namespace Device
124 } // namespace Xyce
125 
126 #endif // Xyce_N_DEV_CompositeParam_h