From 835e0c9f674554adf9621fd84b32c9cde9f2bdf6 Mon Sep 17 00:00:00 2001 From: Benoit Jacob Date: Fri, 28 Sep 2007 06:10:34 +0000 Subject: Found a way to have eval() be a member function of class EiObject, instead of a global function. CCMAIL:bensch128@yahoo.com --- src/internal/Object.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/internal/Object.h') 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 class EiObject +template class EiObject { - static const int RowsAtCompileTime = Derived::RowsAtCompileTime, - ColsAtCompileTime = Derived::ColsAtCompileTime; + static const int RowsAtCompileTime = _Derived::RowsAtCompileTime, + ColsAtCompileTime = _Derived::ColsAtCompileTime; public: - typedef typename EiForwardDecl::Ref Ref; + typedef typename EiForwardDecl<_Derived>::Ref Ref; typedef _Scalar Scalar; + typedef _Derived Derived; int rows() const { return static_cast(this)->_rows(); } int cols() const { return static_cast(this)->_cols(); } @@ -109,6 +110,8 @@ template class EiObject Scalar& operator()(int row, int col = 0) { return write(row, col); } + + EiEval eval() const; }; template -- cgit v1.2.3