00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef _SCSOLVER_NUMERIC_CELLFUNCOBJ_HXX_
00029 #define _SCSOLVER_NUMERIC_CELLFUNCOBJ_HXX_
00030
00031 #include "numeric/funcobj.hxx"
00032 #include "unoglobal.hxx"
00033 #include <memory>
00034 #include <vector>
00035 #include <string>
00036
00037 namespace com { namespace sun { namespace star { namespace table {
00038 class CellAddress;
00039 }}}}
00040
00041 namespace scsolver {
00042
00043 class CalcInterface;
00044
00045 namespace numeric {
00046
00047 struct CellFuncObjImpl;
00048
00049 class CellFuncObj : public BaseFuncObj
00050 {
00051 public:
00052 CellFuncObj( ::scsolver::CalcInterface* pCalc );
00053 virtual ~CellFuncObj() throw();
00054
00055 virtual const ::std::vector<double>& getVars() const;
00056
00057 virtual void setVars(const std::vector<double>& vars) const;
00058
00059 virtual void setVar(size_t index, double var) const;
00060
00061 virtual double eval() const;
00062
00068 virtual const std::string getFuncString() const;
00069
00070 void setTargetCell( const ::com::sun::star::table::CellAddress& addr );
00071 void appendDecVarCell( const ::com::sun::star::table::CellAddress& addr );
00072
00073 private:
00074 CellFuncObj();
00075
00076 ::std::vector<double> mFakeVars;
00077 ::std::auto_ptr<CellFuncObjImpl> m_pImpl;
00078 };
00079
00080
00081 }}
00082
00083 #endif