Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   Related Pages  

rdControlLinear.h

00001 // rdControlLinear.h:
00002 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
00003 // Copyright 2000, 2003 Realistic Dynamics, Inc.
00004 // All rights reserved.
00005 //
00006 // Please do not read, copy, distribute, or use without permission.
00007 // Contact: Frank C. Anderson, fca@RealisticDynamics.com
00008 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
00009 #ifndef __rdControlLinear_h__
00010 #define __rdControlLinear_h__
00011 
00012 
00013 // INCLUDES
00014 #include <rdObject.h>
00015 #include "rdCntr.h"
00016 #include "rdControl.h"
00017 #include "rdControlLinearNode.h"
00018 
00019 
00020 // EXPORT LINE FOR MICROSOFT VISUAL C++
00021 #ifndef UNIX
00022 template class RDSIMULATION_API rdArray<int>;
00023 template class RDSIMULATION_API rdArray<rdControlLinearNode>;
00024 #endif
00025 
00026 
00027 //=============================================================================
00028 //=============================================================================
00040 class RDSIMULATION_API rdControlLinear : public rdControl
00041 {
00042 
00043 //=============================================================================
00044 // MEMBER DATA
00045 //=============================================================================
00046 public:
00048    static const char PROP_USE_STEPS[];
00050    static const char PROP_T[];
00052    static const char PROP_X[];
00054    static const char PROP_MIN[];
00056    static const char PROP_MAX[];
00058    static const rdControlLinearNode DEFAULT_NODE;
00059 protected:
00062    bool _useSteps;
00064    rdArray<rdControlLinearNode> _nodes;
00065 
00066 //=============================================================================
00067 // METHODS
00068 //=============================================================================
00069 public:
00070    rdControlLinear(rdArray<rdControlLinearNode> *aX=NULL,const char *aName="UNKOWN");
00071    rdControlLinear(IDOM_Element *aElement);
00072    rdControlLinear(const rdControlLinear &aControl);
00073    virtual ~rdControlLinear();
00074    virtual rdControl* copy() const;
00075    virtual rdControl* copy(IDOM_Element *aElement) const;
00076 private:
00077    void setNull();
00078    void copyData(const rdControlLinear &aControl);
00079 
00080    //--------------------------------------------------------------------------
00081    // OPERATORS
00082    //--------------------------------------------------------------------------
00083 public:
00084    rdControlLinear& operator=(const rdControlLinear &aControl);
00085 
00086    //--------------------------------------------------------------------------
00087    // GET AND SET
00088    //--------------------------------------------------------------------------
00089    void setUseSteps(bool aTrueFalse);
00090    bool getUseSteps() const;
00091    // PARAMETERS
00092    // Number
00093    virtual int getNumParameters() const;
00094    // Parameter Min
00095    virtual void setParameterMin(int aI,double aMin);
00096    virtual double getParameterMin(int aI) const;
00097    // Parameter Max
00098    virtual void setParameterMax(int aI,double aMax);
00099    virtual double getParameterMax(int aI) const;
00100    // Parameter Time and Neighborhood
00101    virtual double getParameterTime(int aI) const;
00102    virtual void getParameterNeighborhood(int aI,double &rTLower,double &rTUpper) const;
00103    // Parmeter List
00104    virtual int getParameterList(double aT,rdArray<int> &rList) const;
00105    virtual int getParameterList(double aT1,double aT2,rdArray<int> &rList) const;
00106    // Parameter Value
00107    virtual void setParameterValue(int aI,double aP);
00108    virtual double getParameterValue(int aI) const;
00109    // CONTROL VALUE
00110    virtual void setControlValue(double aT,double aX);
00111    virtual double getControlValue(double aT) const;
00112    // NODE ARRAY
00113    const rdArray<rdControlLinearNode>& getNodeArray() const; 
00114 
00115    //--------------------------------------------------------------------------
00116    // XML
00117    //--------------------------------------------------------------------------
00118    virtual void updateObject(bool aDeep=true);
00119    void updateData();
00120    virtual void updateNode(bool aDeep=true);
00121    virtual void generateNode(IDOM_Element *aParent);
00122 
00123 //=============================================================================
00124 }; // END of class rdControlLinear
00125 //=============================================================================
00126 //=============================================================================
00127 
00128 #endif // __rdControlLinear_h__

Generated on Wed Aug 20 02:17:05 2003 for Simulation Software by doxygen1.3