ConstraintsValidator.h

00001 
00006 #ifndef _ConstraintsValidator_h
00007 #define _ConstraintsValidator_h
00008 
00009 // SYSTEM INCLUDES
00010 //
00011 #include <vector>
00012 
00013 // PROJECT INCLUDES
00014 //
00015 #include <wx/validate.h>
00016 
00017 // LOCAL INCLUDES
00018 //
00019 #include "../Constraint.h"
00020 
00021 // FORWARD REFERENCES
00022 //
00023 
00024 
00025 class ConstraintsValidator
00026     : public wxValidator
00027 {
00028 public:
00029 // LIFECYCLE
00030 
00033     ConstraintsValidator(CountedPtr<const FunctionBase>&    rcpFunction,
00034                          CountedPtr<const VariableNames>&   rcpVariables,
00035                          vector<Constraint>&                rConstraints);
00036 
00041     ConstraintsValidator(const ConstraintsValidator& from);
00042 
00045     ~ConstraintsValidator(void);
00046 
00047 
00048 // OPERATORS
00049 
00050 // OPERATIONS
00051 
00054     virtual wxObject*       Clone() const;
00055 
00056     virtual bool            TransferToWindow();
00057 
00058     virtual bool            TransferFromWindow();
00059 
00060     virtual bool            Validate(wxWindow* pParent);
00061 
00062 // ACCESS
00063 // INQUIRY
00064 
00065 protected:
00066 private:
00075     wxArrayInt  FindInvalidConstraints(
00076                         const Constraint::Container&    constraints,
00077                         const VariableNames&            variables) const;
00078 
00085     void        RemoveInvalidConstraints(
00086                         Constraint::Container&  rConstraints,
00087                         const wxArrayInt&       indexes) const;
00088 
00089 
00090     CountedPtr<const FunctionBase>&     mrcpFunction;
00091     CountedPtr<const VariableNames>&    mrcpVariables;
00092     vector<Constraint>&                 mrConstraints;
00093 };
00094 
00095 // INLINE METHODS
00096 //
00097 
00098 // EXTERNAL REFERENCES
00099 //
00100 
00101 #endif  // _ConstraintsValidator_h

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