#include <rdControlSet.h>
Inheritance diagram for rdControlSet:

Public Member Functions | |
| rdControlSet () | |
| Default constructor. | |
| rdControlSet (const char *aFileName) | |
| Construct an control set from file. | |
| virtual | ~rdControlSet () |
| Destructor. | |
| int | getControlIndex (const char *aName) const |
| Get the index of a control. | |
| void | getControlList (const char *aType, rdArray< int > &rList, bool aForModelControls=true) const |
| Get the list of controls of a specified type. | |
| rdControl * | appendControl (rdControl *aControl) |
| Append a control on to the control set. | |
| rdControl * | setControl (int aIndex, rdControl *aControl) |
| Set the control at an index. | |
| rdControl * | getControl (int aIndex) const |
| Get the control at an index. | |
| rdControl * | getControl (const char *aName) const |
| Get the first control that has a specified name. | |
| int | getNumControls (bool aForActuatorControls=true) const |
| Get the number of controls. | |
| void | getControlValues (double aT, double rX[], bool aForModelControls=true) const |
| Get the values of the control curves held in this set at a specified time. | |
| void | getControlValues (double aT, rdArray< double > &rX, bool aForModelControls=true) const |
| Get the values of the control curves held in this set at a specified time. | |
| void | setControlValues (double aT, const double aX[], bool aForModelControls=true) |
| Set the values of the control curves held in this set at a specified time. | |
| void | setControlValues (double aT, const rdArray< double > &aX, bool aForModelControls=true) |
| Set the values of the control curves held in this set at a specified time. | |
| int | getNumParameters (bool aForModelControls=true) const |
| Get the number of control parameters. | |
| void | getParameterList (rdArray< int > &rList, bool aForModelControls=true) const |
| Get a list of parameters for all controls or just the controls that are model controls. | |
| void | getParameterList (double aT, rdArray< int > &rList, bool aForModelControls=true) const |
| Get the list of parameters that affect the control curves at a specified time. | |
| void | getParameterList (double aTLower, double aTUpper, rdArray< int > &rList, bool aForModelControls=true) const |
| Get the list of parameters that affect the control curves between two specified times and that do NOT affect the control curve below the lower of these two times. | |
| void | getParameterMins (rdArray< double > &rMins, const rdArray< int > *aList=NULL) const |
| Get the minimum values allowed for the control parameters. | |
| void | getParameterMaxs (rdArray< double > &rMaxs, const rdArray< int > *aList=NULL) const |
| Get the maximum values allowed for the control parameters. | |
| void | getParameterValues (double rP[], const rdArray< int > *aList=NULL) const |
| Get the values of the control parameters. | |
| void | getParameterValues (rdArray< double > &rP, const rdArray< int > *aList=NULL) const |
| Get the values of the control parameters. | |
| void | setParameterValues (const double aP[], const rdArray< int > *aList=NULL) |
| void | setParameterValues (const rdArray< double > &aP, const rdArray< int > *aList=NULL) |
| Set the values of the control parameters. | |
| int | mapParameterToControl (int aIndex) const |
| Map a control-set parameter to a control. | |
| int | mapParameterToParameter (int aIndex) const |
| Map a control-set parameter to a parameter of a particular control. | |
| void | generateParameterMaps () |
| Generate the maps relating a parmeter in the control set to a control and a parameter of a control. | |
| void | updateObject (bool aDeep=true) |
| Update this object based on its XML node. | |
| void | updateNode (bool aDeep=true) |
| Update the XML node representing this object. | |
| void | generateNode (IDOM_Element *aParent) |
| Generate an XML node representing this object. | |
Static Public Member Functions | |
| void | RegisterType (const rdControl &aControl) |
| Register a supported control type. | |
Protected Attributes | |
| rdPtrArray | _defaultControls |
| Pointer array of default controls. | |
| rdArray< int > | _ptcMap |
| Map from parameters to controls. | |
| rdArray< int > | _ptpMap |
| Map from set parameters to control parameters. | |
Private Member Functions | |
| void | setNull () |
| Set the member variables to their null values. | |
| void | constructDefaultControls () |
| Construct the default controls. | |
Static Private Attributes | |
| rdPtrArray | _ControlTypes |
| Pointer array of supported control types. | |
|
|
Construct an control set from file.
|
|
|
Destructor.
|
|
|
Append a control on to the control set. This method should always return NULL. If it does not return NULL, it means that an model was already stored at what was thought to be the first empty location.
|
|
|
Generate an XML node representing this object.
Reimplemented from rdObject. |
|
|
Generate the maps relating a parmeter in the control set to a control and a parameter of a control. This method should be called any time there is a change in the number or types of controls held in the control set. |
|
|
Get the first control that has a specified name. This method can be slow.
|
|
|
Get the control at an index.
|
|
|
Get the index of a control. This method can be slow, so minimize its use if possible.
|
|
||||||||||||||||
|
Get the list of controls of a specified type. This method can be slow, so minimize its use if possible.
|
|
||||||||||||||||
|
Get the values of the control curves held in this set at a specified time. This is the bread-and-butter method of the controls class; it is called repeatedly throughout an integration.
|
|
||||||||||||||||
|
Get the values of the control curves held in this set at a specified time. This is the bread-and-butter method of the controls class; it is called repeatedly throughout an integration.
|
|
|
Get the number of controls.
|
|
|
Get the number of control parameters.
|
|
||||||||||||||||||||
|
Get the list of parameters that affect the control curves between two specified times and that do NOT affect the control curve below the lower of these two times. This method is useful when solving for a set of controls for a dynamic simulation. When solving for a set of controls, one always wants to go forward in time. Therefore, one does not want to change control parameters that affect the control curve at past times. A control parameter is included in the list only if it affects the control curve in the specified time interval AND does NOT affect the control curve below the lower bound of the specified time interval. So, it is possible that some of the parameters on the returned list could affect the control curve at times greater than the upper bound of the specified time interval.
|
|
||||||||||||||||
|
Get the list of parameters that affect the control curves at a specified time. This list can be used to get parameter mins, maxs, and values.
|
|
||||||||||||
|
Get a list of parameters for all controls or just the controls that are model controls. This list can be used to get parameter mins, maxs, and values.
|
|
||||||||||||
|
Get the maximum values allowed for the control parameters.
|
|
||||||||||||
|
Get the minimum values allowed for the control parameters.
|
|
||||||||||||
|
Get the values of the control parameters.
|
|
||||||||||||
|
Get the values of the control parameters.
|
|
|
Map a control-set parameter to a control. In the control set, the paramters for each of the controls are concatenated into an array. Since there is not a one-to-one correspondence between control-set parameters and controls (i.e., a particular control may have many parameters), it is necessary both to map to which control each control-set parameter belongs and to map to which parameter within a particular control a control-set parameter corresponds.
|
|
|
Map a control-set parameter to a parameter of a particular control. In the control set, the paramters for each of the controls are concatenated into an array. Since there is not a one-to-one correspondence between control-set parameters and controls (i.e., a particular control may have many parameters), it is necessary both to map to which control each control-set parameter belongs and to map to which parameter within a particular control a control-set parameter corresponds.
|
|
|
Register a supported control type. Any control type that is supported can be written to and read from an XML file. The control must have implemented the following methods to be supported: 1) copy constructor 2) virtual rdControl* copy() const, 3) virtual rdControl* copy(IDOM_Element*) const, 4) rdControl& operator=() (!! with the appropriate return type), 5) virtual void updateObject(bool aDeep=true), 6) virtual void updateNode(bool aDeep=true), and 7) virtual void generateNode(IDOM_Element *aParent). Because this method is static, registration of control types needs to be done only once per process and an rdControlSet does not need to be instantiated to do so. This method makes a copy of the specified control, so the caller may continue to use the spacified control (aControl) for whatever purpose.
|
|
||||||||||||
|
Set the control at an index. Sending in NULL for the rdControl pointer essentially removes the control at aIndex from the set. The caller is responsible for deleting any controls that are removed from this list in this way. For this reason, the control pointer previously held at aIndex is returned by this method. It is permissible to send in any positive value for aIndex, and there can be gaps in the array of controls. However, it is advisible to use appendControl(rdControl*) when adding a control so the array of controls remains contiguous.
|
|
||||||||||||||||
|
Set the values of the control curves held in this set at a specified time. Normally to modify the value of a control curve setParameterValues() would be used. The shape of the control curve is determined by the parameters. If parameters exist at the specified time, these parameters are modified to give the control curve the specified value. Otherwise, new parameters are added to the control curve.
|
|
||||||||||||||||
|
Set the values of the control curves held in this set at a specified time. Normally to modify the value of a control curve setParameterValues() would be used. The shape of the control curve is determined by the parameters. If parameters exist at the specified time, these parameters are modified to give the control curve the specified value. Otherwise, new parameters are added to the control curve.
|
|
||||||||||||
|
Set the values of the control parameters.
|
|
|
Update this object based on its XML node.
Reimplemented from rdPtrArray. |
1.3