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

rdAnalysis.h

00001 // rdAnalysis.h
00002 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
00003 // Copyright 2001 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 #include "rdModel.h"
00010 //============================================================================
00011 #ifndef __rdAnalysis_h__
00012 #define __rdAnalysis_h__
00013 
00014 
00015 const int rdAnalysis_NAME_LENGTH = 2048;
00016 const int rdAnalysis_DESCRIP_LENGTH = 8192;
00017 
00018 
00019 //=============================================================================
00020 //=============================================================================
00028 class RDSIMULATION_API rdAnalysis  
00029 {
00030 
00031 //=============================================================================
00032 // DATA
00033 //=============================================================================
00034 public:
00035    static const int NAME_LENGTH;
00036    static const int DESCRIP_LENGTH;
00037 protected:
00039    bool _inDegrees;
00041    bool _on;
00043    char _name[rdAnalysis_NAME_LENGTH];
00045    char _descrip[rdAnalysis_DESCRIP_LENGTH];
00047    char _labels[rdAnalysis_DESCRIP_LENGTH];
00049    rdModel *_model;
00051    int _storageInterval;
00052 
00053 
00054 //=============================================================================
00055 // METHODS
00056 //=============================================================================
00057    //--------------------------------------------------------------------------
00058    // CONSTRUCTION
00059    //--------------------------------------------------------------------------
00060 public:
00061    rdAnalysis(rdModel *aModel);
00062    virtual ~rdAnalysis();
00063 
00064    //--------------------------------------------------------------------------
00065    // GET AND SET
00066    //--------------------------------------------------------------------------
00067    // DEGREES/RADIANS
00068    void setInDegrees(bool aTrueFalse);
00069    bool getInDegrees() const;
00070    // ON/OFF
00071    void setOn(bool aTrueFalse);
00072    bool getOn() const;
00073    // NAME
00074    void setName(const char *aName);
00075    const char* getName() const;
00076    // DESCRIPTION
00077    void setDescription(const char *aDescrip);
00078    const char* getDescription() const;
00079    // COLUMN LABLES
00080    void setColumnLabels(const char *aLabels);
00081    const char* getColumnLabels() const;
00082    // STORAGE INTERVAL
00083    void setStorageInterval(int aInterval);
00084    int getStorageInterval() const;
00085    // MODEL
00086    rdModel* getModel() const;
00087 
00088 
00089    //--------------------------------------------------------------------------
00090    // ANALYSIS
00091    //--------------------------------------------------------------------------
00092    virtual bool
00093       proceed(int aStep=0);
00094    virtual int
00095       begin(int aStep,double aDT,double aT,double *aX,double *aY,
00096       void *aClientData=NULL);
00097    virtual int
00098       analyze(double *aXPrev,double *aYPrev,
00099       int aStep,double aDT,double aT,double *aX,double *aY,
00100       void *aClientData=NULL);
00101    virtual int
00102       end(int aStep,double aDT,double aT,double *aX,double *aY,
00103       void *aClientData=NULL);
00104 
00105    //--------------------------------------------------------------------------
00106    // IO
00107    //--------------------------------------------------------------------------
00108    virtual int
00109       printResults(char *aBaseName,char *aDir=NULL,double aDT=-1.0,
00110       char *aExtension=".sto");
00111 
00112 //=============================================================================
00113 }; // END of class rdAnalysis
00114 //=============================================================================
00115 //=============================================================================
00116 
00117 #endif // __rdAnalysis_h__
00118 
00119 

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