FunctionValidator.h

00001 
00004 #ifndef _FunctionValidator_h
00005 #define _FunctionValidator_h
00006 
00007 // SYSTEM INCLUDES
00008 //
00009 
00010 // PROJECT INCLUDES
00011 //
00012 
00013 // LOCAL INCLUDES
00014 //
00015 #include "../CountedPtr.h"
00016 #include "../FunctionBase.h"
00017 #include "../History.h"
00018 #include "../Parser.h"
00019 #include "../VariableNames.h"
00020 
00021 // FORWARD REFERENCES
00022 //
00023 
00024 class FunctionValidator
00025     : public wxValidator
00026 {
00027 public:
00029     enum Type {
00031         ALLOW_UNIVARIATE,
00032         MULTIVARIATE_ONLY,  
00033         CONSTRAINT          
00034     };
00035 
00036 // LIFECYCLE
00037 
00054     FunctionValidator(CountedPtr<const Parser>          cpParser,
00055                       CountedPtr<const FunctionBase>&   rcpFunction,
00056                       CountedPtr<const VariableNames>&  rcpVariables,
00057                       const ProblemBase*                pProblem,
00058                       bool                              resetVariables,
00059                       History&                          rHistory,
00060                       Type                              type);
00061 
00062 
00067     FunctionValidator(const FunctionValidator& from);
00068 
00069 
00072     ~FunctionValidator(void);
00073 
00074 
00075 // OPERATORS
00076 
00077 // OPERATIONS
00078 
00081     virtual wxObject*       Clone() const;
00082 
00088     virtual bool            Validate(wxWindow* parent);
00089 
00092     virtual bool            TransferToWindow();
00093 
00099     virtual bool            TransferFromWindow();
00100 
00101 // ACCESS
00102 
00112     const VariableNames&    PeekTemporaryVariables() const;
00113 
00114 // INQUIRY
00115 
00116 protected:
00117 
00118 private:
00119     CountedPtr<const Parser>            mcpParser;      
00120 
00121     CountedPtr<const FunctionBase>&     mrcpFunction;
00123     CountedPtr<const VariableNames>&    mrcpVariables;
00125     const ProblemBase*              mpProblem;
00126     bool                            mResetVariables;
00127     Type                            mType;          
00128 
00129     History&                        mrHistory;      
00130 
00132     std::auto_ptr<VariableNames>    mapVariablesCache;
00134     std::auto_ptr<FunctionBase>     mapFunctionCache;
00135 };
00136 
00137 // INLINE METHODS
00138 //
00139 
00140 // EXTERNAL REFERENCES
00141 //
00142 
00143 #endif  // _FunctionValidator_h

Wygenerowano Fri Sep 29 21:04:48 2006 dla EduOptim2 programem  doxygen 1.4.6