diff options
author | 2007-09-28 06:10:34 +0000 | |
---|---|---|
committer | 2007-09-28 06:10:34 +0000 | |
commit | 835e0c9f674554adf9621fd84b32c9cde9f2bdf6 (patch) | |
tree | 4cd4469110466b11a5c7809637279c092e706a3b /src/internal/Object.h | |
parent | 28c44a95c21bb18ec265faba69e750c430045f9c (diff) |
Found a way to have eval() be a member function of class EiObject, instead of a global function.
CCMAIL:bensch128@yahoo.com
Diffstat (limited to 'src/internal/Object.h')
-rw-r--r-- | src/internal/Object.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/internal/Object.h b/src/internal/Object.h index 6bf86f87a..fde835001 100644 --- a/src/internal/Object.h +++ b/src/internal/Object.h @@ -28,13 +28,14 @@ #include "Util.h" -template<typename _Scalar, typename Derived> class EiObject +template<typename _Scalar, typename _Derived> class EiObject { - static const int RowsAtCompileTime = Derived::RowsAtCompileTime, - ColsAtCompileTime = Derived::ColsAtCompileTime; + static const int RowsAtCompileTime = _Derived::RowsAtCompileTime, + ColsAtCompileTime = _Derived::ColsAtCompileTime; public: - typedef typename EiForwardDecl<Derived>::Ref Ref; + typedef typename EiForwardDecl<_Derived>::Ref Ref; typedef _Scalar Scalar; + typedef _Derived Derived; int rows() const { return static_cast<const Derived *>(this)->_rows(); } int cols() const { return static_cast<const Derived *>(this)->_cols(); } @@ -109,6 +110,8 @@ template<typename _Scalar, typename Derived> class EiObject Scalar& operator()(int row, int col = 0) { return write(row, col); } + + EiEval<EiObject> eval() const; }; template<typename Scalar, typename Derived> |