[mapguide-commits] r7742 - sandbox/jng/stylization_refactor/Common/Stylization

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Wed Aug 7 08:40:11 PDT 2013


Author: jng
Date: 2013-08-07 08:40:11 -0700 (Wed, 07 Aug 2013)
New Revision: 7742

Added:
   sandbox/jng/stylization_refactor/Common/Stylization/FdoEvaluator.cpp
   sandbox/jng/stylization_refactor/Common/Stylization/FdoEvaluator.h
   sandbox/jng/stylization_refactor/Common/Stylization/SE_Evaluator.cpp
   sandbox/jng/stylization_refactor/Common/Stylization/SE_Evaluator.h
Modified:
   sandbox/jng/stylization_refactor/Common/Stylization/DefaultStylizer.cpp
   sandbox/jng/stylization_refactor/Common/Stylization/GeometryAdapter.cpp
   sandbox/jng/stylization_refactor/Common/Stylization/GeometryAdapter.h
   sandbox/jng/stylization_refactor/Common/Stylization/PointAdapter.cpp
   sandbox/jng/stylization_refactor/Common/Stylization/PointAdapter.h
   sandbox/jng/stylization_refactor/Common/Stylization/PolygonAdapter.cpp
   sandbox/jng/stylization_refactor/Common/Stylization/PolygonAdapter.h
   sandbox/jng/stylization_refactor/Common/Stylization/PolylineAdapter.cpp
   sandbox/jng/stylization_refactor/Common/Stylization/PolylineAdapter.h
   sandbox/jng/stylization_refactor/Common/Stylization/RasterAdapter.cpp
   sandbox/jng/stylization_refactor/Common/Stylization/RasterAdapter.h
   sandbox/jng/stylization_refactor/Common/Stylization/SE_ExpressionBase.cpp
   sandbox/jng/stylization_refactor/Common/Stylization/SE_ExpressionBase.h
   sandbox/jng/stylization_refactor/Common/Stylization/SE_StyleVisitor.cpp
   sandbox/jng/stylization_refactor/Common/Stylization/SE_SymbolDefProxies.cpp
   sandbox/jng/stylization_refactor/Common/Stylization/SE_SymbolDefProxies.h
   sandbox/jng/stylization_refactor/Common/Stylization/Stylization.vcxproj
   sandbox/jng/stylization_refactor/Common/Stylization/Stylization.vcxproj.filters
   sandbox/jng/stylization_refactor/Common/Stylization/StylizationEngine.cpp
   sandbox/jng/stylization_refactor/Common/Stylization/StylizationEngine.h
   sandbox/jng/stylization_refactor/Common/Stylization/StylizationUtil.cpp
   sandbox/jng/stylization_refactor/Common/Stylization/StylizationUtil.h
Log:
Refactor the stylization library to better abstract out the FDO dependency.
 - Introduce a new abstract SE_Evaluator class that provides the necessary methods for evaluating expressions and filters
 - Introduce a new FdoEvaluator class inheriting from SE_Evaluator that delegates such operations to the FdoExpressionEngine and retains the Expression/Filter caching code from GeometryAdapter
 - Replace all usages of FdoExpressionEngine to use SE_Evaluator instead. Only FdoEvaluator will use FdoExpressionEngine directly and create/parse FdoExpression and FdoFilter objects.

These changes should allow us in the future to have a stylization library without a dependency to FDO by providing an alternate implementation of SE_Evaluator and #ifdef'ing out all the classes that use FDO classes and data types.

Running our Rendering Service test suite and observing the rendered images shows at first glance that these changes have not affected or broken stylization behaviour.

Modified: sandbox/jng/stylization_refactor/Common/Stylization/DefaultStylizer.cpp
===================================================================
--- sandbox/jng/stylization_refactor/Common/Stylization/DefaultStylizer.cpp	2013-08-07 11:46:58 UTC (rev 7741)
+++ sandbox/jng/stylization_refactor/Common/Stylization/DefaultStylizer.cpp	2013-08-07 15:40:11 UTC (rev 7742)
@@ -27,7 +27,7 @@
 #include "ElevationSettings.h"
 #include "FeatureTypeStyleVisitor.h"
 #include "StylizationEngine.h"
-#include "ExpressionHelper.h"
+#include "FdoEvaluator.h"
 #ifdef _DEBUG
 #include <cstdio>
 #endif
@@ -316,7 +316,8 @@
     //       engine stores a weak reference to the RS_FeatureReader's internal
     //       FdoIFeatureReader, and this internal reader is different for each
     //       call to StylizeVLHelper.
-    FdoPtr<FdoExpressionEngine> exec = ExpressionHelper::GetExpressionEngine(renderer, features);
+    //FdoPtr<FdoExpressionEngine> eval = ExpressionHelper::GetExpressionEngine(renderer, features);
+    FdoEvaluator eval(renderer, features);
 
     // main loop over feature data
     int nFeatures = 0;
@@ -364,7 +365,7 @@
             for (int i=0; i<ftsc->GetCount(); ++i)
             {
                 MdfModel::FeatureTypeStyle* fts = ftsc->GetAt(i);
-                adapter->Stylize(renderer, features, initialPass, exec, lb, fts, lrTip, lrUrl, elevSettings);
+                adapter->Stylize(renderer, features, initialPass, &eval, lb, fts, lrTip, lrUrl, elevSettings);
             }
         }
 
@@ -409,7 +410,7 @@
     renderer->SetBufferPool(&m_lbPool);
 
     // create an expression engine with our custom functions
-    FdoPtr<FdoExpressionEngine> exec = ExpressionHelper::GetExpressionEngine(renderer, features);
+    FdoEvaluator eval(renderer, features);
 
     // find the FeatureTypeStyle
     MdfModel::GridColorStyle* gcs = range->GetColorStyle();
@@ -428,7 +429,7 @@
 
         // at this point raster is in the raster layer's cs
         if (m_pRasterAdapter)
-            m_pRasterAdapter->Stylize(renderer, features, true, exec, raster, gcs, gss, NULL, NULL, NULL, layer2mapxformer);
+            m_pRasterAdapter->Stylize(renderer, features, true, &eval, raster, gcs, gss, NULL, NULL, NULL, layer2mapxformer);
 
         // need to free returned raster
         delete raster;

Added: sandbox/jng/stylization_refactor/Common/Stylization/FdoEvaluator.cpp
===================================================================
--- sandbox/jng/stylization_refactor/Common/Stylization/FdoEvaluator.cpp	                        (rev 0)
+++ sandbox/jng/stylization_refactor/Common/Stylization/FdoEvaluator.cpp	2013-08-07 15:40:11 UTC (rev 7742)
@@ -0,0 +1,437 @@
+//
+//  Copyright (C) 2007-2013 by Autodesk, Inc.
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of version 2.1 of the GNU Lesser
+//  General Public License as published by the Free Software Foundation.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#include "Stylization.h"
+#include "RendererStyles.h"
+#include "FdoEvaluator.h"
+#include "ExpressionHelper.h"
+
+FdoEvaluator::FdoEvaluator(Renderer* renderer, RS_FeatureReader* reader)
+{
+    m_exec = ExpressionHelper::GetExpressionEngine(renderer, reader);
+}
+
+FdoEvaluator::~FdoEvaluator()
+{
+    // free up cached fdo filters
+    for (std::map<const void*, FdoFilter*>::iterator iter = m_hFilterCache.begin();
+        iter != m_hFilterCache.end(); ++iter)
+    {
+        if (iter->second)
+            iter->second->Release();
+    }
+
+    m_hFilterCache.clear();
+
+    // free up cached fdo expressions
+    for (std::map<const void*, FdoExpression*>::iterator iter = m_hExpressionCache.begin();
+        iter != m_hExpressionCache.end(); ++iter)
+    {
+        if (iter->second)
+            iter->second->Release();
+    }
+
+    m_hExpressionCache.clear();
+
+    m_exec = NULL;
+}
+
+bool FdoEvaluator::EvalInt32(const MdfModel::MdfString& exprstr, int& res, bool bSuppressErrors)
+{
+    // darn, it must be an expression, so evaluate it
+    if (!m_exec)
+    {
+        // hmmm... we can't eval as expression, what to do?
+        _ASSERT(false);
+        return false;
+    }
+
+    FdoExpression* expr = ObtainFdoExpression(&exprstr);
+    // make sure we have a parsed expression
+    if (!expr)
+    {
+        _ASSERT(false);
+        return false;
+    }
+
+    try
+    {
+        FdoPtr<FdoLiteralValue> lval = m_exec->Evaluate(expr);
+        res = ExpressionHelper::GetAsInt32(lval.p);
+        return true;
+    }
+    catch (FdoException* e)
+    {
+        if (bSuppressErrors)
+            e->Release();
+        else
+            ProcessStylizerException(e, __LINE__, __WFILE__);
+    }
+    catch (...)
+    {
+    }
+
+    return false;
+}
+
+bool FdoEvaluator::EvalBoolean(const MdfModel::MdfString& exprstr, bool& res, bool bSuppressErrors)
+{
+    // check for boolean constants first...
+    const wchar_t* sb = exprstr.c_str();
+
+    if (_wcsnicmp(sb, L"true", 5) == 0)
+    {
+        // value was constant, return true
+        res = true;
+        return true;
+    }
+
+    if (_wcsnicmp(sb, L"false", 6) == 0)
+    {
+        // value was constant, return true
+        res = false;
+        return true;
+    }
+
+    // darn, it must be an expression, so evaluate it
+    if (!m_exec)
+    {
+        // hmmm... we can't eval as expression, what to do?
+        _ASSERT(false);
+        return false;
+    }
+
+    FdoExpression* expr = ObtainFdoExpression(&exprstr);
+
+    // make sure we have a parsed expression
+    if (!expr)
+    {
+        _ASSERT(false);
+        return false;
+    }
+
+    // and then hope evaluation succeeds
+    try
+    {
+        FdoPtr<FdoLiteralValue> lval = m_exec->Evaluate(expr);
+        res = ExpressionHelper::GetAsBoolean(lval.p);
+    }
+    catch (FdoException* e)
+    {
+        if (bSuppressErrors)
+            e->Release();
+        else
+            ProcessStylizerException(e, __LINE__, __WFILE__);
+    }
+    catch (...)
+    {
+    }
+
+    // value was expression, so not cacheable
+    return false;
+}
+
+bool FdoEvaluator::EvalDouble(const MdfModel::MdfString& exprstr, double& res, bool bSuppressErrors)
+{
+    // TODO: needs an expression processor argument to eval expressions
+
+    const wchar_t* sd = exprstr.c_str();
+
+    double d = 0.0;
+
+    // We will look if there is any other stuff behind any numeric data in
+    // order to detect if we are dealing with just a number or an expression.
+    // For example "100 + stuff" would successfully parse a number, yet it
+    // is not just a number.
+    wchar_t* tmp = (wchar_t*)alloca((wcslen(sd)+1)*sizeof(wchar_t));
+    *tmp = L'\0';
+    int status = swscanf(sd, L"%lf%s", &d, tmp);
+
+    if (status == 1 || (status && !wcslen(tmp)))
+    {
+        // value is constant
+        res = d;
+        return true;
+    }
+
+    // try to evaluate as expression if it was not constant
+    if (!m_exec)
+    {
+        // hmmm... we can't eval as expression, what to do?
+        _ASSERT(false);
+        return false;
+    }
+
+    FdoExpression* expr = ObtainFdoExpression(&exprstr);
+
+    // make sure we have a parsed expression
+    if (!expr)
+    {
+        _ASSERT(false);
+        return false;
+    }
+
+    // and then hope evaluation succeeds
+    try
+    {
+        FdoPtr<FdoLiteralValue> lval = m_exec->Evaluate(expr);
+        res = ExpressionHelper::GetAsDouble(lval.p);
+    }
+    catch (FdoException* e)
+    {
+        if (bSuppressErrors)
+            e->Release();
+        else
+            ProcessStylizerException(e, __LINE__, __WFILE__);
+    }
+    catch (...)
+    {
+    }
+
+    // if we are here, the value was not constant so it is not cacheable
+    return false;
+}
+
+bool FdoEvaluator::EvalString(const MdfModel::MdfString& exprstr, RS_String& res, bool bSuppressErrors)
+{
+    if (!m_exec)
+    {
+        // no execution engine... spit the string back out
+        _ASSERT(false);
+        res = exprstr;
+        return false;
+    }
+
+    // TODO: need a scheme to check if a string is a constant expression
+    //       so that we can cache it instead of evaluating every time
+    FdoExpression* expr = ObtainFdoExpression(&exprstr);
+
+    if (!expr)
+    {
+        // this should not happen...
+        res = exprstr;
+        return false;
+    }
+
+    // try-catch the expression evaluation - I think we want
+    // a silent failure here...
+    try
+    {
+        FdoPtr<FdoLiteralValue> lval = m_exec->Evaluate(expr);
+        const wchar_t* str = ExpressionHelper::GetAsString(lval.p);
+        res = str? str : L"";
+    }
+    catch (FdoException* e)
+    {
+        if (bSuppressErrors)
+            e->Release();
+        else
+            ProcessStylizerException(e, __LINE__, __WFILE__);
+    }
+    catch (...)
+    {
+    }
+
+    // not cacheable
+    return false;
+}
+
+bool FdoEvaluator::EvalColor(const MdfModel::MdfString& exprstr, RS_Color& rscolor, bool bSuppressErrors)
+{
+    // TODO: needs an expression processor argument to eval expressions
+
+    // string is in the form "AARRGGBB"
+    const wchar_t* scolor = exprstr.c_str();
+
+    size_t len = wcslen(scolor);
+    unsigned int color = 0;
+    bool isConst = false;
+
+    // try to check if the expression is constant
+    int status = 0;
+    if (len == 0)
+    {
+        // error or a color was not set
+        // use transparent black which indicates "not set"
+        rscolor = RS_Color(RS_Color::EMPTY_COLOR_RGBA);
+        return true;
+    }
+    else if (len == 8)
+    {
+        status = swscanf(scolor, L"%8X", &color);
+    }
+    else if (len == 6)
+    {
+        status = swscanf(scolor, L"%6X", &color);
+
+        // there was no alpha specified in the constant string, add it
+        color |= 0xFF000000;
+    }
+
+    if (status != 1)
+    {
+        // if not constant try to evaluate as expression
+        if (!m_exec)
+        {
+            _ASSERT(false);
+            rscolor = RS_Color(0x000000FF);
+            return true;
+        }
+
+        FdoExpression* expr = ObtainFdoExpression(&exprstr);
+
+        // make sure we have a parsed expression
+        if (!expr)
+        {
+            _ASSERT(false);
+            rscolor = RS_Color(0x000000FF);
+            return false;
+        }
+
+        try
+        {
+            FdoPtr<FdoLiteralValue> lval = m_exec->Evaluate(expr);
+            color = (unsigned int)ExpressionHelper::GetAsInt32(lval.p);
+        }
+        catch (FdoException* e)
+        {
+            if (bSuppressErrors)
+                e->Release();
+            else
+                ProcessStylizerException(e, __LINE__, __WFILE__);
+            rscolor = RS_Color(0x000000FF);
+            return false;
+        }
+        catch (...)
+        {
+            return false;
+        }
+    }
+    else
+    {
+        isConst = true;
+    }
+
+    rscolor.alpha() =  color >> 24;
+    rscolor.red()   = (color >> 16) & 0xFF;
+    rscolor.green() = (color >>  8) & 0xFF;
+    rscolor.blue()  =  color        & 0xFF;
+
+    return isConst;
+}
+
+bool FdoEvaluator::ExecFilter(const MdfModel::MdfString* pExprstr, bool bSuppressErrors)
+{
+    // TODO: we use pointers to the MDF strings for caching -
+    //       this may be risky but all caching in the stylizer is
+    //       based on the MDF pointer staying the same throughout the
+    //       stylization process
+
+    // empty expression - no filter
+    // pass trivially
+    if (pExprstr->empty())
+        return true;
+
+    // get from cache
+    FdoFilter* filter = m_hFilterCache[pExprstr];
+
+    // if in cache, return existing
+    // NOTE: do not addref, it is not needed
+    if (!filter)
+    {
+        try
+        {
+            // otherwise parse and cache it
+            filter = FdoFilter::Parse(pExprstr->c_str());
+            m_hFilterCache[pExprstr] = filter;
+        }
+        catch (FdoException* e)
+        {
+            if (bSuppressErrors)
+                e->Release();
+            else
+                ProcessStylizerException(e, __LINE__, __WFILE__);
+            filter = NULL;
+        }
+    }
+
+    // no filter means pass in this case
+    if (!filter)
+        return true;
+
+    // m_exec should be set in the Stylize call
+    // of the inheriting geometry adapter
+    _ASSERT(m_exec);
+
+    bool res = false;
+    try
+    {
+        res = m_exec->ProcessFilter(filter);
+    }
+    catch (FdoException* e)
+    {
+        if (bSuppressErrors)
+            e->Release();
+        else
+            ProcessStylizerException(e, __LINE__, __WFILE__);
+    }
+
+    return res;
+}
+
+void FdoEvaluator::ProcessStylizerException(FdoException* exception, int line, wchar_t* file)
+{
+
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// parses and caches an FDO filter from a pointer to an MDF string.
+// Once cached, the filter will be reused next time the same expression
+// is asked for.
+FdoExpression* FdoEvaluator::ObtainFdoExpression(const MdfModel::MdfString* pExprstr)
+{
+    // TODO: we use pointers to the MDF strings for caching -
+    //       this may be risky but all caching in the stylizer is
+    //       based on the MDF pointer staying the same throughout the
+    //       stylization process
+
+    // empty expression - no filter
+    if (pExprstr->empty())
+        return NULL;
+
+    // get from cache
+    FdoExpression* expr = m_hExpressionCache[pExprstr];
+
+    // if in cache, return existing
+    // NOTE: do not addref, it is not needed
+    if (expr)
+        return expr;
+
+    try
+    {
+        // otherwise parse and cache it
+        expr = FdoExpression::Parse(pExprstr->c_str());
+        m_hExpressionCache[pExprstr] = expr;
+    }
+    catch (FdoException* e)
+    {
+        ProcessStylizerException(e, __LINE__, __WFILE__);
+        expr = NULL;
+    }
+
+    return expr;
+}
\ No newline at end of file

Added: sandbox/jng/stylization_refactor/Common/Stylization/FdoEvaluator.h
===================================================================
--- sandbox/jng/stylization_refactor/Common/Stylization/FdoEvaluator.h	                        (rev 0)
+++ sandbox/jng/stylization_refactor/Common/Stylization/FdoEvaluator.h	2013-08-07 15:40:11 UTC (rev 7742)
@@ -0,0 +1,50 @@
+//
+//  Copyright (C) 2007-2013 by Autodesk, Inc.
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of version 2.1 of the GNU Lesser
+//  General Public License as published by the Free Software Foundation.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#ifndef FDO_EVALUATOR_H_
+#define FDO_EVALUATOR_H_
+
+#include "Stylization.h"
+#include "RendererStyles.h"
+#include "SE_Evaluator.h"
+#include "Renderer.h"
+#include <map>
+
+class FdoEvaluator : public SE_Evaluator
+{
+public:
+    FdoEvaluator(Renderer* renderer, RS_FeatureReader* reader);
+    virtual ~FdoEvaluator();
+
+    STYLIZATION_API virtual bool EvalInt32(const MdfModel::MdfString& exprstr, int& res, bool bSuppressErrors);
+    STYLIZATION_API virtual bool EvalBoolean(const MdfModel::MdfString& exprstr, bool& res, bool bSuppressErrors);
+    STYLIZATION_API virtual bool EvalDouble(const MdfModel::MdfString& exprstr, double& res, bool bSuppressErrors);
+    STYLIZATION_API virtual bool EvalString(const MdfModel::MdfString& exprstr, RS_String& res, bool bSuppressErrors);
+    STYLIZATION_API virtual bool EvalColor(const MdfModel::MdfString& exprstr, RS_Color& color, bool bSuppressErrors);
+    STYLIZATION_API virtual bool ExecFilter(const MdfModel::MdfString* pExprstr, bool bSuppressErrors);
+private:
+    FdoExpression* ObtainFdoExpression(const MdfModel::MdfString* pExprstr);
+    void ProcessStylizerException(FdoException* exception, int line, wchar_t* file);
+
+    FdoPtr<FdoExpressionEngine> m_exec;
+    // FdoFilter cache
+    std::map<const void*, FdoFilter*> m_hFilterCache;
+    // FdoExpression cache
+    std::map<const void*, FdoExpression*> m_hExpressionCache;
+};
+
+#endif
\ No newline at end of file

Modified: sandbox/jng/stylization_refactor/Common/Stylization/GeometryAdapter.cpp
===================================================================
--- sandbox/jng/stylization_refactor/Common/Stylization/GeometryAdapter.cpp	2013-08-07 11:46:58 UTC (rev 7741)
+++ sandbox/jng/stylization_refactor/Common/Stylization/GeometryAdapter.cpp	2013-08-07 15:40:11 UTC (rev 7742)
@@ -20,15 +20,14 @@
 #include "GeometryAdapter.h"
 #include "SymbolVisitor.h"
 #include "SLDSymbols.h"
-#include "ExpressionHelper.h"
+#include "SE_Evaluator.h"
 
-
 extern void ProcessStylizerException(FdoException* exception, int line, wchar_t* file);
 
 //////////////////////////////////////////////////////////////////////////////
 GeometryAdapter::GeometryAdapter(LineBufferPool* lbp)
 {
-    m_exec = NULL;
+    m_eval = NULL;
     m_lbPool = lbp;
 }
 
@@ -79,38 +78,15 @@
     }
 
     // darn, it must be an expression, so evaluate it
-    if (!m_exec)
+    if (!m_eval)
     {
         // hmmm... we can't eval as expression, what to do?
         _ASSERT(false);
         return false;
     }
 
-    FdoExpression* expr = ObtainFdoExpression(&exprstr);
-
-    // make sure we have a parsed expression
-    if (!expr)
-    {
-        _ASSERT(false);
-        return false;
-    }
-
     // and then hope evaluation succeeds
-    try
-    {
-        FdoPtr<FdoLiteralValue> lval = m_exec->Evaluate(expr);
-        res = ExpressionHelper::GetAsBoolean(lval.p);
-    }
-    catch (FdoException* e)
-    {
-        ProcessStylizerException(e, __LINE__, __WFILE__);
-    }
-    catch (...)
-    {
-    }
-
-    // value was expression, so not cacheable
-    return false;
+    return m_eval->EvalBoolean(exprstr, res);
 }
 
 
@@ -139,45 +115,22 @@
     }
 
     // try to evaluate as expression if it was not constant
-    if (!m_exec)
+    if (!m_eval)
     {
         // hmmm... we can't eval as expression, what to do?
         _ASSERT(false);
         return false;
     }
 
-    FdoExpression* expr = ObtainFdoExpression(&exprstr);
-
-    // make sure we have a parsed expression
-    if (!expr)
-    {
-        _ASSERT(false);
-        return false;
-    }
-
     // and then hope evaluation succeeds
-    try
-    {
-        FdoPtr<FdoLiteralValue> lval = m_exec->Evaluate(expr);
-        res = ExpressionHelper::GetAsDouble(lval.p);
-    }
-    catch (FdoException* e)
-    {
-        ProcessStylizerException(e, __LINE__, __WFILE__);
-    }
-    catch (...)
-    {
-    }
-
-    // if we are here, the value was not constant so it is not cacheable
-    return false;
+    return m_eval->EvalDouble(exprstr, res);
 }
 
 
 //////////////////////////////////////////////////////////////////////////////
 bool GeometryAdapter::EvalString(const MdfModel::MdfString& exprstr, RS_String& res)
 {
-    if (!m_exec)
+    if (!m_eval)
     {
         // no execution engine... spit the string back out
         _ASSERT(false);
@@ -187,33 +140,7 @@
 
     // TODO: need a scheme to check if a string is a constant expression
     //       so that we can cache it instead of evaluating every time
-    FdoExpression* expr = ObtainFdoExpression(&exprstr);
-
-    if (!expr)
-    {
-        // this should not happen...
-        res = exprstr;
-        return false;
-    }
-
-    // try-catch the expression evaluation - I think we want
-    // a silent failure here...
-    try
-    {
-        FdoPtr<FdoLiteralValue> lval = m_exec->Evaluate(expr);
-        const wchar_t* str = ExpressionHelper::GetAsString(lval.p);
-        res = str? str : L"";
-    }
-    catch (FdoException* e)
-    {
-        ProcessStylizerException(e, __LINE__, __WFILE__);
-    }
-    catch (...)
-    {
-    }
-
-    // not cacheable
-    return false;
+    return m_eval->EvalString(exprstr, res);
 }
 
 
@@ -253,38 +180,14 @@
     if (status != 1)
     {
         // if not constant try to evaluate as expression
-        if (!m_exec)
+        if (!m_eval)
         {
             _ASSERT(false);
             rscolor = RS_Color(0x000000FF);
             return true;
         }
 
-        FdoExpression* expr = ObtainFdoExpression(&exprstr);
-
-        // make sure we have a parsed expression
-        if (!expr)
-        {
-            _ASSERT(false);
-            rscolor = RS_Color(0x000000FF);
-            return false;
-        }
-
-        try
-        {
-            FdoPtr<FdoLiteralValue> lval = m_exec->Evaluate(expr);
-            color = (unsigned int)ExpressionHelper::GetAsInt32(lval.p);
-        }
-        catch (FdoException* e)
-        {
-            ProcessStylizerException(e, __LINE__, __WFILE__);
-            rscolor = RS_Color(0x000000FF);
-            return false;
-        }
-        catch (...)
-        {
-            return false;
-        }
+        return m_eval->EvalColor(exprstr, rscolor);
     }
     else
     {
@@ -679,7 +582,7 @@
 void GeometryAdapter::Stylize(Renderer*                   /*renderer*/,
                               RS_FeatureReader*           /*features*/,
                               bool                        /*initialPass*/,
-                              FdoExpressionEngine*        /*exec*/,
+                              SE_Evaluator*               /*eval*/,
                               LineBuffer*                 /*lb*/,
                               MdfModel::FeatureTypeStyle* /*style*/,
                               const MdfModel::MdfString*  /*tooltip*/,
@@ -721,7 +624,7 @@
 // Parses and caches an FDO filter from a pointer to an MDF string.
 // Once cached, the filter will be reused next time the same expression
 // is asked for.  Also executes the filter and returns failure or success.
-bool GeometryAdapter::ExecFdoFilter(const MdfModel::MdfString* pExprstr)
+bool GeometryAdapter::ExecFilter(const MdfModel::MdfString* pExprstr)
 {
     // TODO: we use pointers to the MDF strings for caching -
     //       this may be risky but all caching in the stylizer is
@@ -733,88 +636,14 @@
     if (pExprstr->empty())
         return true;
 
-    // get from cache
-    FdoFilter* filter = m_hFilterCache[pExprstr];
-
-    // if in cache, return existing
-    // NOTE: do not addref, it is not needed
-    if (!filter)
-    {
-        try
-        {
-            // otherwise parse and cache it
-            filter = FdoFilter::Parse(pExprstr->c_str());
-            m_hFilterCache[pExprstr] = filter;
-        }
-        catch (FdoException* e)
-        {
-            ProcessStylizerException(e, __LINE__, __WFILE__);
-            filter = NULL;
-        }
-    }
-
-    // no filter means pass in this case
-    if (!filter)
-        return true;
-
     // m_exec should be set in the Stylize call
     // of the inheriting geometry adapter
-    _ASSERT(m_exec);
+    _ASSERT(m_eval);
 
-    bool res = false;
-    try
-    {
-        res = m_exec->ProcessFilter(filter);
-    }
-    catch (FdoException* e)
-    {
-        ProcessStylizerException(e, __LINE__, __WFILE__);
-    }
-
-    return res;
+    return m_eval->ExecFilter(pExprstr);
 }
 
-
 //////////////////////////////////////////////////////////////////////////////
-// parses and caches an FDO filter from a pointer to an MDF string.
-// Once cached, the filter will be reused next time the same expression
-// is asked for.
-FdoExpression* GeometryAdapter::ObtainFdoExpression(const MdfModel::MdfString* pExprstr)
-{
-    // TODO: we use pointers to the MDF strings for caching -
-    //       this may be risky but all caching in the stylizer is
-    //       based on the MDF pointer staying the same throughout the
-    //       stylization process
-
-    // empty expression - no filter
-    if (pExprstr->empty())
-        return NULL;
-
-    // get from cache
-    FdoExpression* expr = m_hExpressionCache[pExprstr];
-
-    // if in cache, return existing
-    // NOTE: do not addref, it is not needed
-    if (expr)
-        return expr;
-
-    try
-    {
-        // otherwise parse and cache it
-        expr = FdoExpression::Parse(pExprstr->c_str());
-        m_hExpressionCache[pExprstr] = expr;
-    }
-    catch (FdoException* e)
-    {
-        ProcessStylizerException(e, __LINE__, __WFILE__);
-        expr = NULL;
-    }
-
-    return expr;
-}
-
-
-//////////////////////////////////////////////////////////////////////////////
 bool GeometryAdapter::GetElevationParams(RS_ElevationSettings* elevSettings,
                                          double& zOffset, double& zExtrusion,
                                          RS_ElevationType& elevType)

Modified: sandbox/jng/stylization_refactor/Common/Stylization/GeometryAdapter.h
===================================================================
--- sandbox/jng/stylization_refactor/Common/Stylization/GeometryAdapter.h	2013-08-07 11:46:58 UTC (rev 7741)
+++ sandbox/jng/stylization_refactor/Common/Stylization/GeometryAdapter.h	2013-08-07 15:40:11 UTC (rev 7742)
@@ -24,6 +24,7 @@
 
 class LineBuffer;
 class LineBufferPool;
+class SE_Evaluator;
 
 //-----------------------------------------------------------------------------
 // Base class for helper classes which know how to stylize a particular
@@ -60,7 +61,7 @@
     STYLIZATION_API virtual void Stylize(Renderer*                   renderer,
                                          RS_FeatureReader*           features,
                                          bool                        initialPass,
-                                         FdoExpressionEngine*        exec,
+                                         SE_Evaluator*               eval,
                                          LineBuffer*                 lb,
                                          MdfModel::FeatureTypeStyle* style,
                                          const MdfModel::MdfString*  tooltip = NULL,
@@ -78,8 +79,7 @@
                                           Renderer*        renderer,
                                           LineBuffer*      lb);
 
-    STYLIZATION_API bool ExecFdoFilter(const MdfModel::MdfString* pExprstr);
-    STYLIZATION_API FdoExpression* ObtainFdoExpression(const MdfModel::MdfString* pExprstr);
+    STYLIZATION_API bool ExecFilter(const MdfModel::MdfString* pExprstr);
 
 protected:
     STYLIZATION_API bool GetElevationParams(RS_ElevationSettings* elevationSettings,
@@ -88,7 +88,7 @@
 
     double GetClipOffset(RS_LineStroke& lineStroke, double mapScale);
 
-    FdoExpressionEngine* m_exec;
+    SE_Evaluator* m_eval;
     LineBufferPool* m_lbPool;
 
     // BOGUS:

Modified: sandbox/jng/stylization_refactor/Common/Stylization/PointAdapter.cpp
===================================================================
--- sandbox/jng/stylization_refactor/Common/Stylization/PointAdapter.cpp	2013-08-07 11:46:58 UTC (rev 7741)
+++ sandbox/jng/stylization_refactor/Common/Stylization/PointAdapter.cpp	2013-08-07 15:40:11 UTC (rev 7742)
@@ -46,7 +46,7 @@
 void PointAdapter::Stylize(Renderer*                   renderer,
                            RS_FeatureReader*           features,
                            bool                        initialPass,
-                           FdoExpressionEngine*        exec,
+                           SE_Evaluator*               eval,
                            LineBuffer*                 geometry,
                            MdfModel::FeatureTypeStyle* style,
                            const MdfModel::MdfString*  tooltip,
@@ -54,7 +54,7 @@
                            RS_ElevationSettings*       elevSettings,
                            CSysTransformer*            /*layer2mapxformer*/)
 {
-    m_exec = exec;
+    m_eval = eval;
 
     // no need to do anything if the style is not a point style, so quit
     if (FeatureTypeStyleVisitor::DetermineFeatureTypeStyle(style) != FeatureTypeStyleVisitor::ftsPoint)
@@ -72,7 +72,7 @@
         rule = static_cast<MdfModel::PointRule*>(prc->GetAt(i));
 
         // apply any filter on the rule - if it fails move to the next rule
-        if (!ExecFdoFilter(&rule->GetFilter()))
+        if (!ExecFilter(&rule->GetFilter()))
         {
             // don't stylize with failed rule
             rule = NULL;

Modified: sandbox/jng/stylization_refactor/Common/Stylization/PointAdapter.h
===================================================================
--- sandbox/jng/stylization_refactor/Common/Stylization/PointAdapter.h	2013-08-07 11:46:58 UTC (rev 7741)
+++ sandbox/jng/stylization_refactor/Common/Stylization/PointAdapter.h	2013-08-07 15:40:11 UTC (rev 7742)
@@ -29,7 +29,7 @@
     virtual void Stylize(Renderer*                   renderer,
                          RS_FeatureReader*           features,
                          bool                        initialPass,
-                         FdoExpressionEngine*        exec,
+                         SE_Evaluator*               eval,
                          LineBuffer*                 geometry,
                          MdfModel::FeatureTypeStyle* style,
                          const MdfModel::MdfString*  tooltip = NULL,

Modified: sandbox/jng/stylization_refactor/Common/Stylization/PolygonAdapter.cpp
===================================================================
--- sandbox/jng/stylization_refactor/Common/Stylization/PolygonAdapter.cpp	2013-08-07 11:46:58 UTC (rev 7741)
+++ sandbox/jng/stylization_refactor/Common/Stylization/PolygonAdapter.cpp	2013-08-07 15:40:11 UTC (rev 7742)
@@ -46,7 +46,7 @@
 void PolygonAdapter::Stylize(Renderer*                   renderer,
                              RS_FeatureReader*           features,
                              bool                        initialPass,
-                             FdoExpressionEngine*        exec,
+                             SE_Evaluator*               eval,
                              LineBuffer*                 geometry,
                              MdfModel::FeatureTypeStyle* style,
                              const MdfModel::MdfString*  tooltip,
@@ -54,7 +54,7 @@
                              RS_ElevationSettings*       elevSettings,
                              CSysTransformer*            /*layer2mapxformer*/)
 {
-    m_exec = exec;
+    m_eval = eval;
 
     // no need to do anything if the style is not an area style, so quit
     if (FeatureTypeStyleVisitor::DetermineFeatureTypeStyle(style) != FeatureTypeStyleVisitor::ftsArea)
@@ -72,7 +72,7 @@
         rule = static_cast<MdfModel::AreaRule*>(arc->GetAt(i));
 
         // apply any filter on the rule - if it fails move to the next rule
-        if (!ExecFdoFilter(&rule->GetFilter()))
+        if (!ExecFilter(&rule->GetFilter()))
         {
             // don't stylize with failed rule
             rule = NULL;

Modified: sandbox/jng/stylization_refactor/Common/Stylization/PolygonAdapter.h
===================================================================
--- sandbox/jng/stylization_refactor/Common/Stylization/PolygonAdapter.h	2013-08-07 11:46:58 UTC (rev 7741)
+++ sandbox/jng/stylization_refactor/Common/Stylization/PolygonAdapter.h	2013-08-07 15:40:11 UTC (rev 7742)
@@ -29,7 +29,7 @@
     virtual void Stylize(Renderer*                   renderer,
                          RS_FeatureReader*           features,
                          bool                        initialPass,
-                         FdoExpressionEngine*        exec,
+                         SE_Evaluator*               eval,
                          LineBuffer*                 geometry,
                          MdfModel::FeatureTypeStyle* style,
                          const MdfModel::MdfString*  tooltip = NULL,

Modified: sandbox/jng/stylization_refactor/Common/Stylization/PolylineAdapter.cpp
===================================================================
--- sandbox/jng/stylization_refactor/Common/Stylization/PolylineAdapter.cpp	2013-08-07 11:46:58 UTC (rev 7741)
+++ sandbox/jng/stylization_refactor/Common/Stylization/PolylineAdapter.cpp	2013-08-07 15:40:11 UTC (rev 7742)
@@ -54,7 +54,7 @@
 void PolylineAdapter::Stylize(Renderer*                   renderer,
                               RS_FeatureReader*           features,
                               bool                        initialPass,
-                              FdoExpressionEngine*        exec,
+                              SE_Evaluator*               eval,
                               LineBuffer*                 geometry,
                               MdfModel::FeatureTypeStyle* style,
                               const MdfModel::MdfString*  tooltip,
@@ -62,7 +62,7 @@
                               RS_ElevationSettings*       elevSettings,
                               CSysTransformer*            /*layer2mapxformer*/)
 {
-    m_exec = exec;
+    m_eval = eval;
 
     // no need to do anything if the style is not a line style, so quit
     if (FeatureTypeStyleVisitor::DetermineFeatureTypeStyle(style) != FeatureTypeStyleVisitor::ftsLine)
@@ -80,7 +80,7 @@
         rule = static_cast<MdfModel::LineRule*>(lrc->GetAt(i));
 
         // apply any filter on the rule - if it fails move to the next rule
-        if (!ExecFdoFilter(&rule->GetFilter()))
+        if (!ExecFilter(&rule->GetFilter()))
         {
             // don't stylize with failed rule
             rule = NULL;

Modified: sandbox/jng/stylization_refactor/Common/Stylization/PolylineAdapter.h
===================================================================
--- sandbox/jng/stylization_refactor/Common/Stylization/PolylineAdapter.h	2013-08-07 11:46:58 UTC (rev 7741)
+++ sandbox/jng/stylization_refactor/Common/Stylization/PolylineAdapter.h	2013-08-07 15:40:11 UTC (rev 7742)
@@ -29,7 +29,7 @@
     virtual void Stylize(Renderer*                   renderer,
                          RS_FeatureReader*           features,
                          bool                        initialPass,
-                         FdoExpressionEngine*        exec,
+                         SE_Evaluator*               eval,
                          LineBuffer*                 geometry,
                          MdfModel::FeatureTypeStyle* style,
                          const MdfModel::MdfString*  tooltip = NULL,

Modified: sandbox/jng/stylization_refactor/Common/Stylization/RasterAdapter.cpp
===================================================================
--- sandbox/jng/stylization_refactor/Common/Stylization/RasterAdapter.cpp	2013-08-07 11:46:58 UTC (rev 7741)
+++ sandbox/jng/stylization_refactor/Common/Stylization/RasterAdapter.cpp	2013-08-07 15:40:11 UTC (rev 7742)
@@ -42,7 +42,7 @@
 void RasterAdapter::Stylize(Renderer*                   renderer,
                             RS_FeatureReader*           features,
                             bool                        initialPass,
-                            FdoExpressionEngine*        exec,
+                            SE_Evaluator*               eval,
                             RS_Raster*                  raster,
                             MdfModel::GridColorStyle*   style,
                             MdfModel::GridSurfaceStyle* surfStyle,
@@ -55,7 +55,7 @@
     //printf("\n---===+++ Enter RasterAdapter::Stylize(() +++===---\n");
 #endif
 
-    m_exec = exec;
+    m_eval = eval;
 
     // get the map data extent
     // this is in map cs

Modified: sandbox/jng/stylization_refactor/Common/Stylization/RasterAdapter.h
===================================================================
--- sandbox/jng/stylization_refactor/Common/Stylization/RasterAdapter.h	2013-08-07 11:46:58 UTC (rev 7741)
+++ sandbox/jng/stylization_refactor/Common/Stylization/RasterAdapter.h	2013-08-07 15:40:11 UTC (rev 7742)
@@ -32,7 +32,7 @@
     virtual void Stylize(Renderer*                   renderer,
                          RS_FeatureReader*           features,
                          bool                        initialPass,
-                         FdoExpressionEngine*        exec,
+                         SE_Evaluator*               eval,
                          RS_Raster*                  raster,
                          MdfModel::GridColorStyle*   style,
                          MdfModel::GridSurfaceStyle* surfStyle = NULL,

Added: sandbox/jng/stylization_refactor/Common/Stylization/SE_Evaluator.cpp
===================================================================
--- sandbox/jng/stylization_refactor/Common/Stylization/SE_Evaluator.cpp	                        (rev 0)
+++ sandbox/jng/stylization_refactor/Common/Stylization/SE_Evaluator.cpp	2013-08-07 15:40:11 UTC (rev 7742)
@@ -0,0 +1,19 @@
+//
+//  Copyright (C) 2007-2013 by Autodesk, Inc.
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of version 2.1 of the GNU Lesser
+//  General Public License as published by the Free Software Foundation.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#include "stdafx.h"
+#include "SE_Evaluator.h"
\ No newline at end of file

Added: sandbox/jng/stylization_refactor/Common/Stylization/SE_Evaluator.h
===================================================================
--- sandbox/jng/stylization_refactor/Common/Stylization/SE_Evaluator.h	                        (rev 0)
+++ sandbox/jng/stylization_refactor/Common/Stylization/SE_Evaluator.h	2013-08-07 15:40:11 UTC (rev 7742)
@@ -0,0 +1,35 @@
+//
+//  Copyright (C) 2007-2013 by Autodesk, Inc.
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of version 2.1 of the GNU Lesser
+//  General Public License as published by the Free Software Foundation.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#ifndef SE_EXPRESSIONEVALUATOR_H_
+#define SE_EXPRESSIONEVALUATOR_H_
+
+#include "Stylization.h"
+#include "RendererStyles.h"
+
+class SE_Evaluator
+{
+public:
+    STYLIZATION_API virtual bool EvalInt32(const MdfModel::MdfString& exprstr, int& res, bool bSuppressErrors = false) = 0;
+    STYLIZATION_API virtual bool EvalBoolean(const MdfModel::MdfString& exprstr, bool& res, bool bSuppressErrors = false) = 0;
+    STYLIZATION_API virtual bool EvalDouble(const MdfModel::MdfString& exprstr, double& res, bool bSuppressErrors = false) = 0;
+    STYLIZATION_API virtual bool EvalString(const MdfModel::MdfString& exprstr, RS_String& res, bool bSuppressErrors = false) = 0;
+    STYLIZATION_API virtual bool EvalColor(const MdfModel::MdfString& exprstr, RS_Color& color, bool bSuppressErrors = false) = 0;
+    STYLIZATION_API virtual bool ExecFilter(const MdfModel::MdfString* pExprstr, bool bSuppressErrors = false) = 0;
+};
+
+#endif
\ No newline at end of file

Modified: sandbox/jng/stylization_refactor/Common/Stylization/SE_ExpressionBase.cpp
===================================================================
--- sandbox/jng/stylization_refactor/Common/Stylization/SE_ExpressionBase.cpp	2013-08-07 11:46:58 UTC (rev 7741)
+++ sandbox/jng/stylization_refactor/Common/Stylization/SE_ExpressionBase.cpp	2013-08-07 15:40:11 UTC (rev 7742)
@@ -134,7 +134,6 @@
 void SE_ExpressionBase::ParseColorExpression(const MdfModel::MdfString& exprstr, SE_Color& val, unsigned int defaultValue)
 {
     // set to schema default
-    val.expression = NULL;
     val.defValue.argb = defaultValue;
 
     // process any parameters in the expression
@@ -169,23 +168,13 @@
         return;
     }
 
-    // We have an expression - parse it using FDO.  If the parse
-    // call fails then the value stays at the default.
-    try
-    {
-        val.expression = FdoExpression::Parse(cstr);
-    }
-    catch (FdoException* e)
-    {
-        ProcessStylizerException(e, __LINE__, __WFILE__);
-    }
+    val.expression = cstr;
 }
 
 
 void SE_ExpressionBase::ParseDoubleExpression(const MdfModel::MdfString& exprstr, SE_Double& val, const double defaultValue)
 {
     // set to schema default
-    val.expression = NULL;
     val.defValue = defaultValue;
 
     // process any parameters in the expression
@@ -220,23 +209,13 @@
         return;
     }
 
-    // We have an expression - parse it using FDO.  If the parse
-    // call fails then the value stays at the default.
-    try
-    {
-        val.expression = FdoExpression::Parse(cstr);
-    }
-    catch (FdoException* e)
-    {
-        ProcessStylizerException(e, __LINE__, __WFILE__);
-    }
+    val.expression = cstr;
 }
 
 
 void SE_ExpressionBase::ParseIntegerExpression(const MdfModel::MdfString& exprstr, SE_Integer& val, const int defaultValue)
 {
     // set to schema default
-    val.expression = NULL;
     val.defValue = defaultValue;
 
     // process any parameters in the expression
@@ -271,23 +250,13 @@
         return;
     }
 
-    // We have an expression - parse it using FDO.  If the parse
-    // call fails then the value stays at the default.
-    try
-    {
-        val.expression = FdoExpression::Parse(cstr);
-    }
-    catch (FdoException* e)
-    {
-        ProcessStylizerException(e, __LINE__, __WFILE__);
-    }
+    val.expression = cstr;
 }
 
 
 void SE_ExpressionBase::ParseBooleanExpression(const MdfModel::MdfString& exprstr, SE_Boolean& val, const bool defaultValue)
 {
     // set to schema default
-    val.expression = NULL;
     val.defValue = defaultValue;
 
     // process any parameters in the expression
@@ -322,16 +291,7 @@
         return;
     }
 
-    // We have an expression - parse it using FDO.  If the parse
-    // call fails then the value stays at the default.
-    try
-    {
-        val.expression = FdoExpression::Parse(cstr);
-    }
-    catch (FdoException* e)
-    {
-        ProcessStylizerException(e, __LINE__, __WFILE__);
-    }
+    val.expression = cstr;
 }
 
 
@@ -389,9 +349,6 @@
 
 void SE_ExpressionBase::ParseStringExpression(const MdfModel::MdfString& exprstr, SE_String& val, const wchar_t* defaultValue, const wchar_t* allowedValues)
 {
-    // set to default - we set the value later on
-    val.expression = NULL;
-
     // process any parameters in the expression
     const wchar_t* defValue = ReplaceParameters(exprstr);
     val.setDefValue(UnquoteLiteral(defValue? defValue : defaultValue));
@@ -424,14 +381,5 @@
         return;
     }
 
-    // We have an expression - parse it using FDO.  If the parse
-    // call fails then the value stays at the default.
-    try
-    {
-        val.expression = FdoExpression::Parse(str);
-    }
-    catch (FdoException* e)
-    {
-        ProcessStylizerException(e, __LINE__, __WFILE__);
-    }
+    val.expression = str;
 }

Modified: sandbox/jng/stylization_refactor/Common/Stylization/SE_ExpressionBase.h
===================================================================
--- sandbox/jng/stylization_refactor/Common/Stylization/SE_ExpressionBase.h	2013-08-07 11:46:58 UTC (rev 7741)
+++ sandbox/jng/stylization_refactor/Common/Stylization/SE_ExpressionBase.h	2013-08-07 15:40:11 UTC (rev 7742)
@@ -19,7 +19,7 @@
 #define SE_EXPRESSIONBASE_H_
 
 #include "Stylization.h"
-#include "ExpressionHelper.h"
+#include "SE_Evaluator.h"
 #include <map>
 #include <string>
 
@@ -56,26 +56,19 @@
         unsigned int argb;
     } value; //g++ doesn't like nameless structs, otherwise things would be far cleaner
 
-    FdoExpression* expression;
+    MdfModel::MdfString expression;
 
-    SE_INLINE SE_Color() : expression(NULL) { defValue.argb = 0; value.argb = 0; }
-    ~SE_Color() { if (expression) expression->Release(); }
+    SE_INLINE SE_Color() { defValue.argb = 0; value.argb = 0; }
+    ~SE_Color() { }
 
     // Retrieve argb color
-    SE_INLINE unsigned int evaluate(FdoExpressionEngine* exec)
+    SE_INLINE unsigned int evaluate(SE_Evaluator* eval)
     {
-        if (expression)
+        if (!expression.empty())
         {
-            value.argb = defValue.argb;
-            try
-            {
-                FdoPtr<FdoLiteralValue> lval = exec->Evaluate(expression);
-                value.argb = (unsigned int)ExpressionHelper::GetAsInt32(lval.p);
-            }
-            catch (FdoException* e)
-            {
-                e->Release();
-            }
+            RS_Color color = RS_Color::FromARGB(defValue.argb);
+            eval->EvalColor(expression, color);
+            value.argb = color.argb();
         }
 
         // return the value
@@ -84,14 +77,14 @@
 
     SE_INLINE bool empty()
     {
-        return defValue.argb == 0 && value.argb == 0 && expression == NULL;
+        return defValue.argb == 0 && value.argb == 0 && expression.empty();
     }
 
     SE_INLINE void operator=(SE_Color& c)
     {
         defValue.argb = c.defValue.argb;
         value.argb = c.value.argb;
-        expression = FDO_SAFE_ADDREF(c.expression);
+        expression = c.expression;
     }
 };
 
@@ -101,25 +94,18 @@
 {
     double defValue;
     double value;
-    FdoExpression* expression;
+    MdfModel::MdfString expression;
 
-    SE_INLINE SE_Double() : defValue(0.0), value(0.0), expression(NULL) { }
-    ~SE_Double() { if (expression) expression->Release(); }
+    SE_INLINE SE_Double() : defValue(0.0), value(0.0) { }
+    ~SE_Double() { }
 
-    SE_INLINE double evaluate(FdoExpressionEngine* exec)
+    SE_INLINE double evaluate(SE_Evaluator* eval)
     {
-        if (expression)
+        if (!expression.empty())
         {
-            value = defValue;
-            try
-            {
-                FdoPtr<FdoLiteralValue> lval = exec->Evaluate(expression);
-                value = ExpressionHelper::GetAsDouble(lval.p);
-            }
-            catch (FdoException* e)
-            {
-                e->Release();
-            }
+            double d = defValue;
+            eval->EvalDouble(expression, d);
+            value = d;
         }
 
         // return the value
@@ -130,7 +116,7 @@
     {
         defValue = d.defValue;
         value = d.value;
-        expression = FDO_SAFE_ADDREF(d.expression);
+        expression = d.expression;
     }
 };
 
@@ -140,25 +126,18 @@
 {
     int defValue;
     int value;
-    FdoExpression* expression;
+    MdfModel::MdfString expression;
 
-    SE_INLINE SE_Integer() : defValue(0), value(0), expression(NULL) { }
-    ~SE_Integer() { if (expression) expression->Release(); }
+    SE_INLINE SE_Integer() : defValue(0), value(0) { }
+    ~SE_Integer() { }
 
-    SE_INLINE int evaluate(FdoExpressionEngine* exec)
+    SE_INLINE int evaluate(SE_Evaluator* eval)
     {
-        if (expression)
+        if (!expression.empty())
         {
-            value = defValue;
-            try
-            {
-                FdoPtr<FdoLiteralValue> lval = exec->Evaluate(expression);
-                value = ExpressionHelper::GetAsInt32(lval.p);
-            }
-            catch (FdoException* e)
-            {
-                e->Release();
-            }
+            int i = defValue;
+            eval->EvalInt32(expression, i);
+            value = i;
         }
 
         // return the value
@@ -169,7 +148,7 @@
     {
         defValue = i.defValue;
         value = i.value;
-        expression = FDO_SAFE_ADDREF(i.expression);
+        expression = i.expression;
     }
 };
 
@@ -179,25 +158,18 @@
 {
     bool defValue;
     bool value;
-    FdoExpression* expression;
+    MdfModel::MdfString expression;
 
-    SE_INLINE SE_Boolean() : defValue(false), value(false), expression(NULL) { }
-    ~SE_Boolean() { if (expression) expression->Release(); }
+    SE_INLINE SE_Boolean() : defValue(false), value(false) { }
+    ~SE_Boolean() { }
 
-    SE_INLINE bool evaluate(FdoExpressionEngine* exec)
+    SE_INLINE bool evaluate(SE_Evaluator* eval)
     {
-        if (expression)
+        if (!expression.empty())
         {
-            value = defValue;
-            try
-            {
-                FdoPtr<FdoLiteralValue> lval = exec->Evaluate(expression);
-                value = ExpressionHelper::GetAsBoolean(lval.p);
-            }
-            catch (FdoException* e)
-            {
-                e->Release();
-            }
+            bool b = defValue;
+            eval->EvalBoolean(expression, b);
+            value = b;
         }
 
         // return the value
@@ -208,7 +180,7 @@
     {
         defValue = b.defValue;
         value = b.value;
-        expression = FDO_SAFE_ADDREF(b.expression);
+        expression = b.expression;
     }
 };
 
@@ -218,15 +190,13 @@
 {
     wchar_t* defValue;
     wchar_t* value;
-    FdoExpression* expression;
+    MdfModel::MdfString expression;
 
-    SE_INLINE SE_String() : defValue(NULL), value(NULL), expression(NULL) { }
+    SE_INLINE SE_String() : defValue(NULL), value(NULL) { }
     ~SE_String()
     {
         delete[] value;
         delete[] defValue;
-        if (expression)
-            expression->Release();
     }
 
     void setDefValue(wchar_t* newDefValue)
@@ -260,29 +230,23 @@
         return sEmpty;
     }
 
-    SE_INLINE const wchar_t* evaluate(FdoExpressionEngine* exec)
+    SE_INLINE const wchar_t* evaluate(SE_Evaluator* eval)
     {
-        if (expression)
+        if (!expression.empty())
         {
             delete[] value;
             value = NULL;
 
-            try
+            RS_String str;
+            eval->EvalString(expression, str);
+            if (!str.empty())
             {
-                FdoPtr<FdoLiteralValue> lval = exec->Evaluate(expression);
-                const wchar_t* newValue = ExpressionHelper::GetAsString(lval.p);
-                if (newValue)
-                {
-                    // the expression was successfully evaluated - update the value
-                    size_t len = wcslen(newValue) + 1;
-                    value = new wchar_t[len];
-                    wcscpy(value, newValue);
-                }
+                // the expression was successfully evaluated - update the value
+                size_t len = str.length() + 1;
+                value = new wchar_t[len];
+                const wchar_t* src = str.c_str();
+                wcscpy(value, src);
             }
-            catch (FdoException* e)
-            {
-                e->Release();
-            }
         }
 
         // return the value
@@ -327,7 +291,7 @@
         else
             value = NULL;
 
-        expression = FDO_SAFE_ADDREF(s.expression);
+        expression = s.expression;
     }
 };
 

Modified: sandbox/jng/stylization_refactor/Common/Stylization/SE_StyleVisitor.cpp
===================================================================
--- sandbox/jng/stylization_refactor/Common/Stylization/SE_StyleVisitor.cpp	2013-08-07 11:46:58 UTC (rev 7741)
+++ sandbox/jng/stylization_refactor/Common/Stylization/SE_StyleVisitor.cpp	2013-08-07 15:40:11 UTC (rev 7742)
@@ -55,10 +55,10 @@
     ParseDoubleExpression(pointUsage.GetOriginOffsetY(), style->originOffset[1], 0.0);
 
     // set flag if all properties are constant
-    style->cacheable = !(style->angleDeg.expression
-                      || style->angleControl.expression
-                      || style->originOffset[0].expression
-                      || style->originOffset[1].expression);
+    style->cacheable = (!style->angleDeg.expression.empty()
+                     && !style->angleControl.expression.empty()
+                     && !style->originOffset[0].expression.empty()
+                     && !style->originOffset[1].expression.empty());
 
     return style;
 }
@@ -95,22 +95,22 @@
     }
 
     // set flag if all properties are constant
-    style->cacheable = !(style->angleDeg.expression
-                      || style->angleControl.expression
-                      || style->unitsControl.expression
-                      || style->vertexControl.expression
-                      || style->startOffset.expression
-                      || style->endOffset.expression
-                      || style->repeat.expression
-                      || style->vertexAngleLimit.expression
-                      || style->vertexJoin.expression
-                      || style->vertexMiterLimit.expression
-                      || style->dpWeight.expression
-                      || style->dpColor.expression
-                      || style->dpWeightScalable.expression
-                      || style->dpCap.expression
-                      || style->dpJoin.expression
-                      || style->dpMiterLimit.expression);
+    style->cacheable = (!style->angleDeg.expression.empty()
+                     && !style->angleControl.expression.empty()
+                     && !style->unitsControl.expression.empty()
+                     && !style->vertexControl.expression.empty()
+                     && !style->startOffset.expression.empty()
+                     && !style->endOffset.expression.empty()
+                     && !style->repeat.expression.empty()
+                     && !style->vertexAngleLimit.expression.empty()
+                     && !style->vertexJoin.expression.empty()
+                     && !style->vertexMiterLimit.expression.empty()
+                     && !style->dpWeight.expression.empty()
+                     && !style->dpColor.expression.empty()
+                     && !style->dpWeightScalable.expression.empty()
+                     && !style->dpCap.expression.empty()
+                     && !style->dpJoin.expression.empty()
+                     && !style->dpMiterLimit.expression.empty());
 
     return style;
 }
@@ -130,15 +130,15 @@
     ParseDoubleExpression(areaUsage.GetBufferWidth(), style->bufferWidth, 0.0);
 
     // set flag if all properties are constant
-    style->cacheable = !(style->angleDeg.expression
-                      || style->angleControl.expression
-                      || style->originControl.expression
-                      || style->clippingControl.expression
-                      || style->origin[0].expression
-                      || style->origin[1].expression
-                      || style->repeat[0].expression
-                      || style->repeat[1].expression
-                      || style->bufferWidth.expression);
+    style->cacheable =  (!style->angleDeg.expression.empty()
+                      && !style->angleControl.expression.empty()
+                      && !style->originControl.expression.empty()
+                      && !style->clippingControl.expression.empty()
+                      && !style->origin[0].expression.empty()
+                      && !style->origin[1].expression.empty()
+                      && !style->repeat[0].expression.empty()
+                      && !style->repeat[1].expression.empty()
+                      && !style->bufferWidth.expression.empty());
 
     return style;
 }
@@ -667,15 +667,15 @@
         if (primitive->color.value.argb == 0)
             primitive->color.value.comps.a = 255;
 
-        primitive->cacheable = !(primitive->weight.expression
-                              || primitive->color.expression
-                              || primitive->weightScalable.expression
-                              || primitive->cap.expression
-                              || primitive->join.expression
-                              || primitive->miterLimit.expression
-                              || primitive->resizeControl.expression
-                              || primitive->scaleX.expression
-                              || primitive->scaleY.expression);
+        primitive->cacheable = (!primitive->weight.expression.empty()
+                             && !primitive->color.expression.empty()
+                             && !primitive->weightScalable.expression.empty()
+                             && !primitive->cap.expression.empty()
+                             && !primitive->join.expression.empty()
+                             && !primitive->miterLimit.expression.empty()
+                             && !primitive->resizeControl.expression.empty()
+                             && !primitive->scaleX.expression.empty()
+                             && !primitive->scaleY.expression.empty());
     }
     else
     {
@@ -694,16 +694,16 @@
         ParseDoubleExpression(path.GetScaleY(), primitive->scaleY, 1.0);
         ParseStringExpression(path.GetResizeControl(), primitive->resizeControl, GraphicElement::sResizeControlDefault, GraphicElement::sResizeControlValues);
 
-        primitive->cacheable = !(primitive->weight.expression
-                              || primitive->color.expression
-                              || primitive->fill.expression
-                              || primitive->weightScalable.expression
-                              || primitive->cap.expression
-                              || primitive->join.expression
-                              || primitive->miterLimit.expression
-                              || primitive->resizeControl.expression
-                              || primitive->scaleX.expression
-                              || primitive->scaleY.expression);
+        primitive->cacheable =  (!primitive->weight.expression.empty()
+                              && !primitive->color.expression.empty()
+                              && !primitive->fill.expression.empty()
+                              && !primitive->weightScalable.expression.empty()
+                              && !primitive->cap.expression.empty()
+                              && !primitive->join.expression.empty()
+                              && !primitive->miterLimit.expression.empty()
+                              && !primitive->resizeControl.expression.empty()
+                              && !primitive->scaleX.expression.empty()
+                              && !primitive->scaleY.expression.empty());
     }
 }
 
@@ -745,7 +745,7 @@
         ParseStringExpression(image.GetResourceId(), primitive->pngResourceId, image.GetResourceId().c_str());
         ParseStringExpression(image.GetLibraryItemName(), primitive->pngResourceName, image.GetLibraryItemName().c_str());
 
-        if (primitive->pngResourceId.expression == NULL && primitive->pngResourceName.expression == NULL) // constant path
+        if (primitive->pngResourceId.expression.empty() && primitive->pngResourceName.expression.empty()) // constant path
         {
             // if we have non-empty resource ID then use it, otherwise
             // use the ID of any parent symbol definition
@@ -771,13 +771,13 @@
     ParseBooleanExpression(image.GetSizeScalable(), primitive->sizeScalable, true);
     ParseStringExpression(image.GetResizeControl(), primitive->resizeControl, GraphicElement::sResizeControlDefault, GraphicElement::sResizeControlValues);
 
-    primitive->cacheable = !(primitive->position[0].expression
-                          || primitive->position[1].expression
-                          || primitive->extent[0].expression
-                          || primitive->extent[1].expression
-                          || primitive->angleDeg.expression
-                          || primitive->sizeScalable.expression
-                          || primitive->resizeControl.expression)
+    primitive->cacheable =  (!primitive->position[0].expression.empty()
+                          && !primitive->position[1].expression.empty()
+                          && !primitive->extent[0].expression.empty()
+                          && !primitive->extent[1].expression.empty()
+                          && !primitive->angleDeg.expression.empty()
+                          && !primitive->sizeScalable.expression.empty()
+                          && !primitive->resizeControl.expression.empty())
                           && primitive->imageData.data;
 }
 
@@ -821,31 +821,31 @@
         ParseDoubleExpression(frame->GetOffsetY(), primitive->frameOffset[1], 0.0);
     }
 
-    primitive->cacheable = !(primitive->content.expression
-                          || primitive->fontName.expression
-                          || primitive->height.expression
-                          || primitive->angleDeg.expression
-                          || primitive->position[0].expression
-                          || primitive->position[1].expression
-                          || primitive->lineSpacing.expression
-                          || primitive->heightScalable.expression
-                          || primitive->bold.expression
-                          || primitive->italic.expression
-                          || primitive->underlined.expression
-                          || primitive->overlined.expression
-                          || primitive->obliqueAngle.expression
-                          || primitive->trackSpacing.expression
-                          || primitive->hAlignment.expression
-                          || primitive->vAlignment.expression
-                          || primitive->justification.expression
-                          || primitive->textColor.expression
-                          || primitive->ghostColor.expression
-                          || primitive->frameLineColor.expression
-                          || primitive->frameFillColor.expression
-                          || primitive->frameOffset[0].expression
-                          || primitive->frameOffset[1].expression
-                          || primitive->markup.expression
-                          || primitive->resizeControl.expression);
+    primitive->cacheable =  (!primitive->content.expression.empty()
+                          && !primitive->fontName.expression.empty()
+                          && !primitive->height.expression.empty()
+                          && !primitive->angleDeg.expression.empty()
+                          && !primitive->position[0].expression.empty()
+                          && !primitive->position[1].expression.empty()
+                          && !primitive->lineSpacing.expression.empty()
+                          && !primitive->heightScalable.expression.empty()
+                          && !primitive->bold.expression.empty()
+                          && !primitive->italic.expression.empty()
+                          && !primitive->underlined.expression.empty()
+                          && !primitive->overlined.expression.empty()
+                          && !primitive->obliqueAngle.expression.empty()
+                          && !primitive->trackSpacing.expression.empty()
+                          && !primitive->hAlignment.expression.empty()
+                          && !primitive->vAlignment.expression.empty()
+                          && !primitive->justification.expression.empty()
+                          && !primitive->textColor.expression.empty()
+                          && !primitive->ghostColor.expression.empty()
+                          && !primitive->frameLineColor.expression.empty()
+                          && !primitive->frameFillColor.expression.empty()
+                          && !primitive->frameOffset[0].expression.empty()
+                          && !primitive->frameOffset[1].expression.empty()
+                          && !primitive->markup.expression.empty()
+                          && !primitive->resizeControl.expression.empty());
 }
 
 
@@ -925,16 +925,16 @@
         ParseDoubleExpression(box->GetPositionY(), m_style->resizePosition[1], 0.0);
         ParseStringExpression(box->GetGrowControl(), m_style->growControl, ResizeBox::sGrowControlDefault, ResizeBox::sGrowControlValues);
 
-        m_style->cacheable &= !(m_style->resizeSize[0].expression
-                             || m_style->resizeSize[1].expression
-                             || m_style->resizePosition[0].expression
-                             || m_style->resizePosition[1].expression
-                             || m_style->growControl.expression);
+        m_style->cacheable &=  (!m_style->resizeSize[0].expression.empty()
+                             && !m_style->resizeSize[1].expression.empty()
+                             && !m_style->resizePosition[0].expression.empty()
+                             && !m_style->resizePosition[1].expression.empty()
+                             && !m_style->growControl.expression.empty());
     }
 
     // the symbol instance scales also affect the evaluated style
-    m_style->cacheable &= !(m_symbolInstance->scale[0].expression
-                         || m_symbolInstance->scale[1].expression);
+    m_style->cacheable &=  (!m_symbolInstance->scale[0].expression.empty()
+                         && !m_symbolInstance->scale[1].expression.empty());
 
     m_symbolInstance->styles.push_back(m_style);
 }

Modified: sandbox/jng/stylization_refactor/Common/Stylization/SE_SymbolDefProxies.cpp
===================================================================
--- sandbox/jng/stylization_refactor/Common/Stylization/SE_SymbolDefProxies.cpp	2013-08-07 11:46:58 UTC (rev 7741)
+++ sandbox/jng/stylization_refactor/Common/Stylization/SE_SymbolDefProxies.cpp	2013-08-07 15:40:11 UTC (rev 7742)
@@ -98,7 +98,7 @@
 
     SE_RenderPolyline* ret = new SE_RenderPolyline();
 
-    const wchar_t* sResizeCtrl = resizeControl.evaluate(ctx->exec);
+    const wchar_t* sResizeCtrl = resizeControl.evaluate(ctx->eval);
     if (wcscmp(sResizeCtrl, L"AddToResizeBox") == 0)
         ret->resizeControl = SE_ResizeControl_AddToResizeBox;
     else if (wcscmp(sResizeCtrl, L"AdjustToResizeBox") == 0)
@@ -108,10 +108,10 @@
 
     ret->geometry = geometry->Clone();
 
-    double wx                  = weightScalable.evaluate(ctx->exec)? fabs(ctx->xform->x0) : ctx->mm2su;
-    ret->lineStroke.weight     = weight.evaluate(ctx->exec) * wx;
-    ret->lineStroke.color      = color.evaluate(ctx->exec);
-    ret->lineStroke.miterLimit = miterLimit.evaluate(ctx->exec);
+    double wx                  = weightScalable.evaluate(ctx->eval)? fabs(ctx->xform->x0) : ctx->mm2su;
+    ret->lineStroke.weight     = weight.evaluate(ctx->eval) * wx;
+    ret->lineStroke.color      = color.evaluate(ctx->eval);
+    ret->lineStroke.miterLimit = miterLimit.evaluate(ctx->eval);
     if (ret->lineStroke.miterLimit < 0.0)
         ret->lineStroke.miterLimit = 0.0;
 
@@ -122,7 +122,7 @@
     else if (devWeightInMM < 0.0)
         ret->lineStroke.weight = 0.0;
 
-    const wchar_t* sCap = cap.evaluate(ctx->exec);
+    const wchar_t* sCap = cap.evaluate(ctx->eval);
     if (wcscmp(sCap, L"Round") == 0)    // check this first since it's the most common
         ret->lineStroke.cap = SE_LineCap_Round;
     else if (wcscmp(sCap, L"None") == 0)
@@ -134,7 +134,7 @@
     else // default is Round
         ret->lineStroke.cap = SE_LineCap_Round;
 
-    const wchar_t* sJoin = join.evaluate(ctx->exec);
+    const wchar_t* sJoin = join.evaluate(ctx->eval);
     if (wcscmp(sJoin, L"Round") == 0)   // check this first since it's the most common
         ret->lineStroke.join = SE_LineJoin_Round;
     else if (wcscmp(sJoin, L"None") == 0)
@@ -149,8 +149,8 @@
     else // default is Round
         ret->lineStroke.join = SE_LineJoin_Round;
 
-    double dScaleX = scaleX.evaluate(ctx->exec);
-    double dScaleY = scaleY.evaluate(ctx->exec);
+    double dScaleX = scaleX.evaluate(ctx->eval);
+    double dScaleY = scaleY.evaluate(ctx->eval);
 
     // populate the line buffer
     if(dScaleX != 1.0 || dScaleY != 1.0)
@@ -226,7 +226,7 @@
 
     SE_RenderPolygon* ret = new SE_RenderPolygon();
 
-    const wchar_t* sResizeCtrl = resizeControl.evaluate(ctx->exec);
+    const wchar_t* sResizeCtrl = resizeControl.evaluate(ctx->eval);
     if (wcscmp(sResizeCtrl, L"AddToResizeBox") == 0)
         ret->resizeControl = SE_ResizeControl_AddToResizeBox;
     else if (wcscmp(sResizeCtrl, L"AdjustToResizeBox") == 0)
@@ -235,12 +235,12 @@
         ret->resizeControl = SE_ResizeControl_ResizeNone;
 
     ret->geometry = geometry->Clone();
-    ret->fill     = fill.evaluate(ctx->exec);
+    ret->fill     = fill.evaluate(ctx->eval);
 
-    double wx                  = weightScalable.evaluate(ctx->exec)? fabs(ctx->xform->x0) : ctx->mm2su;
-    ret->lineStroke.weight     = weight.evaluate(ctx->exec) * wx;
-    ret->lineStroke.color      = color.evaluate(ctx->exec);
-    ret->lineStroke.miterLimit = miterLimit.evaluate(ctx->exec);
+    double wx                  = weightScalable.evaluate(ctx->eval)? fabs(ctx->xform->x0) : ctx->mm2su;
+    ret->lineStroke.weight     = weight.evaluate(ctx->eval) * wx;
+    ret->lineStroke.color      = color.evaluate(ctx->eval);
+    ret->lineStroke.miterLimit = miterLimit.evaluate(ctx->eval);
     if (ret->lineStroke.miterLimit < 0.0)
         ret->lineStroke.miterLimit = 0.0;
 
@@ -251,7 +251,7 @@
     else if (devWeightInMM < 0.0)
         ret->lineStroke.weight = 0.0;
 
-    const wchar_t* sCap = cap.evaluate(ctx->exec);
+    const wchar_t* sCap = cap.evaluate(ctx->eval);
     if (wcscmp(sCap, L"Round") == 0)    // check this first since it's the most common
         ret->lineStroke.cap = SE_LineCap_Round;
     else if (wcscmp(sCap, L"None") == 0)
@@ -263,7 +263,7 @@
     else // default is Round
         ret->lineStroke.cap = SE_LineCap_Round;
 
-    const wchar_t* sJoin = join.evaluate(ctx->exec);
+    const wchar_t* sJoin = join.evaluate(ctx->eval);
     if (wcscmp(sJoin, L"Round") == 0)   // check this first since it's the most common
         ret->lineStroke.join = SE_LineJoin_Round;
     else if (wcscmp(sJoin, L"None") == 0)
@@ -279,8 +279,8 @@
         ret->lineStroke.join = SE_LineJoin_Round;
 
     // populate the line buffer
-    double dScaleX = scaleX.evaluate(ctx->exec);
-    double dScaleY = scaleY.evaluate(ctx->exec);
+    double dScaleX = scaleX.evaluate(ctx->eval);
+    double dScaleY = scaleY.evaluate(ctx->eval);
 
     if(dScaleX != 1.0 || dScaleY != 1.0)
     {
@@ -327,73 +327,73 @@
         return NULL;
 
     // don't bother creating a primitive if there's no content
-    const wchar_t* contentStr = content.evaluate(ctx->exec);
+    const wchar_t* contentStr = content.evaluate(ctx->eval);
     if (wcslen(contentStr) == 0)
         return NULL;
 
     SE_RenderText* ret = new SE_RenderText();
 
-    const wchar_t* sResizeCtrl = resizeControl.evaluate(ctx->exec);
+    const wchar_t* sResizeCtrl = resizeControl.evaluate(ctx->eval);
     if (wcscmp(sResizeCtrl, L"AddToResizeBox") == 0)
         ret->resizeControl = SE_ResizeControl_AddToResizeBox;
     else if (wcscmp(sResizeCtrl, L"AdjustToResizeBox") == 0)
         ret->resizeControl = SE_ResizeControl_AdjustToResizeBox;
     else // default is ResizeNone
         ret->resizeControl = SE_ResizeControl_ResizeNone;
-    if(NULL != content.expression)
-        ret->expression  = content.expression->ToString();
+    if(!content.expression.empty())
+        ret->expression  = content.expression;
     ret->content     = contentStr;
-    ret->position[0] = position[0].evaluate(ctx->exec);
-    ret->position[1] = position[1].evaluate(ctx->exec);
+    ret->position[0] = position[0].evaluate(ctx->eval);
+    ret->position[1] = position[1].evaluate(ctx->eval);
 
     ctx->xform->transform(ret->position[0], ret->position[1]);
 
     RS_TextDef& textDef = ret->tdef;
     RS_FontDef& fontDef = textDef.font();
 
-    textDef.rotation() = fmod(angleDeg.evaluate(ctx->exec), 360.0);   // in degrees
+    textDef.rotation() = fmod(angleDeg.evaluate(ctx->eval), 360.0);   // in degrees
 
     int style = RS_FontStyle_Regular;
-    if (bold.evaluate(ctx->exec))
+    if (bold.evaluate(ctx->eval))
         style |= RS_FontStyle_Bold;
-    if (italic.evaluate(ctx->exec))
+    if (italic.evaluate(ctx->eval))
         style |= RS_FontStyle_Italic;
-    if (underlined.evaluate(ctx->exec))
+    if (underlined.evaluate(ctx->eval))
         style |= RS_FontStyle_Underline;
-    if (overlined.evaluate(ctx->exec))
+    if (overlined.evaluate(ctx->eval))
         style |= RS_FontStyle_Overline;
 
     fontDef.style() = (RS_FontStyle_Mask)style;
-    fontDef.name()  = fontName.evaluate(ctx->exec);
+    fontDef.name()  = fontName.evaluate(ctx->eval);
 
     // RS_TextDef expects font height to be in meters - convert it from mm
-    double wy              = heightScalable.evaluate(ctx->exec)? 0.001 * fabs(ctx->xform->y1) / ctx->mm2sud : 0.001;
-    fontDef.height()       = height.evaluate(ctx->exec) * wy;
-    textDef.obliqueAngle() = obliqueAngle.evaluate(ctx->exec);
-    textDef.trackSpacing() = trackSpacing.evaluate(ctx->exec);
-    textDef.linespace()    = lineSpacing.evaluate(ctx->exec);
-    textDef.textcolor()    = RS_Color::FromARGB(textColor.evaluate(ctx->exec));
-    textDef.markup()       = markup.evaluate(ctx->exec);
+    double wy              = heightScalable.evaluate(ctx->eval)? 0.001 * fabs(ctx->xform->y1) / ctx->mm2sud : 0.001;
+    fontDef.height()       = height.evaluate(ctx->eval) * wy;
+    textDef.obliqueAngle() = obliqueAngle.evaluate(ctx->eval);
+    textDef.trackSpacing() = trackSpacing.evaluate(ctx->eval);
+    textDef.linespace()    = lineSpacing.evaluate(ctx->eval);
+    textDef.textcolor()    = RS_Color::FromARGB(textColor.evaluate(ctx->eval));
+    textDef.markup()       = markup.evaluate(ctx->eval);
 
     if (!ghostColor.empty())
     {
-        textDef.ghostcolor() = RS_Color::FromARGB(ghostColor.evaluate(ctx->exec));
+        textDef.ghostcolor() = RS_Color::FromARGB(ghostColor.evaluate(ctx->eval));
         textDef.textbg() |= RS_TextBackground_Ghosted;
     }
     if (!frameLineColor.empty())
     {
-        textDef.framecolor() = RS_Color::FromARGB(frameLineColor.evaluate(ctx->exec));
+        textDef.framecolor() = RS_Color::FromARGB(frameLineColor.evaluate(ctx->eval));
         textDef.textbg() |= RS_TextBackground_Framed;
     }
     if (!frameFillColor.empty())
     {
-        textDef.opaquecolor() = RS_Color::FromARGB(frameFillColor.evaluate(ctx->exec));
+        textDef.opaquecolor() = RS_Color::FromARGB(frameFillColor.evaluate(ctx->eval));
         textDef.textbg() |= RS_TextBackground_Opaque;
     }
-    textDef.frameoffsetx() = frameOffset[0].evaluate(ctx->exec) * fabs(ctx->xform->x0);
-    textDef.frameoffsety() = frameOffset[1].evaluate(ctx->exec) * fabs(ctx->xform->y1);
+    textDef.frameoffsetx() = frameOffset[0].evaluate(ctx->eval) * fabs(ctx->xform->x0);
+    textDef.frameoffsety() = frameOffset[1].evaluate(ctx->eval) * fabs(ctx->xform->y1);
 
-    const wchar_t* hAlign = hAlignment.evaluate(ctx->exec);
+    const wchar_t* hAlign = hAlignment.evaluate(ctx->eval);
     if (wcscmp(hAlign, L"Center") == 0)     // check this first since it's the most common
         textDef.halign() = RS_HAlignment_Center;
     else if (wcscmp(hAlign, L"Left") == 0)
@@ -403,7 +403,7 @@
     else // default is Center
         textDef.halign() = RS_HAlignment_Center;
 
-    const wchar_t* vAlign = vAlignment.evaluate(ctx->exec);
+    const wchar_t* vAlign = vAlignment.evaluate(ctx->eval);
     if (wcscmp(vAlign, L"Halfline") == 0)   // check this first since it's the most common
         textDef.valign() = RS_VAlignment_Half;
     else if (wcscmp(vAlign, L"Bottom") == 0)
@@ -417,7 +417,7 @@
     else // default is Halfline
         textDef.valign() = RS_VAlignment_Half;
 
-    const wchar_t* justification = this->justification.evaluate(ctx->exec);
+    const wchar_t* justification = this->justification.evaluate(ctx->eval);
     if (wcscmp(justification, L"FromAlignment") == 0)   // check this first since it's the most common
     {
         switch (textDef.halign())
@@ -514,7 +514,7 @@
 {
     SE_RenderRaster* ret = new SE_RenderRaster();
 
-    const wchar_t* sResizeCtrl = resizeControl.evaluate(ctx->exec);
+    const wchar_t* sResizeCtrl = resizeControl.evaluate(ctx->eval);
     if (wcscmp(sResizeCtrl, L"AddToResizeBox") == 0)
         ret->resizeControl = SE_ResizeControl_AddToResizeBox;
     else if (wcscmp(sResizeCtrl, L"AdjustToResizeBox") == 0)
@@ -526,32 +526,32 @@
     {
         // if we have non-empty resource ID then use it, otherwise use
         // the ID of any parent symbol definition
-        const wchar_t* resourceId = pngResourceId.evaluate(ctx->exec);
+        const wchar_t* resourceId = pngResourceId.evaluate(ctx->eval);
         if (wcslen(resourceId) == 0)
             resourceId = resId;
-        ctx->resources->GetImageData(resourceId, pngResourceName.evaluate(ctx->exec), ret->imageData);
+        ctx->resources->GetImageData(resourceId, pngResourceName.evaluate(ctx->eval), ret->imageData);
     }
     else
     {
         ret->imageData = imageData;
     }
 
-    ret->position[0] = position[0].evaluate(ctx->exec);
-    ret->position[1] = position[1].evaluate(ctx->exec);
+    ret->position[0] = position[0].evaluate(ctx->eval);
+    ret->position[1] = position[1].evaluate(ctx->eval);
     ctx->xform->transform(ret->position[0], ret->position[1]);
 
-    if (sizeScalable.evaluate(ctx->exec))
+    if (sizeScalable.evaluate(ctx->eval))
     {
-        ret->extent[0] = fabs(extent[0].evaluate(ctx->exec) * fabs(ctx->xform->x0));
-        ret->extent[1] = fabs(extent[1].evaluate(ctx->exec) * fabs(ctx->xform->y1));
+        ret->extent[0] = fabs(extent[0].evaluate(ctx->eval) * fabs(ctx->xform->x0));
+        ret->extent[1] = fabs(extent[1].evaluate(ctx->eval) * fabs(ctx->xform->y1));
     }
     else
     {
-        ret->extent[0] = fabs(extent[0].evaluate(ctx->exec) * ctx->mm2sud);
-        ret->extent[1] = fabs(extent[1].evaluate(ctx->exec) * ctx->mm2sud);
+        ret->extent[0] = fabs(extent[0].evaluate(ctx->eval) * ctx->mm2sud);
+        ret->extent[1] = fabs(extent[1].evaluate(ctx->eval) * ctx->mm2sud);
     }
 
-    ret->angleRad = fmod(angleDeg.evaluate(ctx->exec), 360.0) * M_PI180;
+    ret->angleRad = fmod(angleDeg.evaluate(ctx->eval), 360.0) * M_PI180;
 
     // this one is just a raw double
     ret->opacity = opacity;
@@ -587,7 +587,7 @@
 void SE_Style::evaluate(SE_EvalContext* ctx)
 {
     // evaluate values that are common to all styles
-    rstyle->renderPass = renderPass.evaluate(ctx->exec);
+    rstyle->renderPass = renderPass.evaluate(ctx->eval);
 
     //
     // evaluation of all primitives and also resize box stuff
@@ -599,10 +599,10 @@
     if (useBox)
     {
         // get the initial resize box
-        double dx = resizePosition[0].evaluate(ctx->exec);
-        double dy = resizePosition[1].evaluate(ctx->exec);
-        double sx = 0.5*fabs(resizeSize[0].evaluate(ctx->exec));
-        double sy = 0.5*fabs(resizeSize[1].evaluate(ctx->exec));
+        double dx = resizePosition[0].evaluate(ctx->eval);
+        double dy = resizePosition[1].evaluate(ctx->eval);
+        double sx = 0.5*fabs(resizeSize[0].evaluate(ctx->eval));
+        double sy = 0.5*fabs(resizeSize[1].evaluate(ctx->eval));
 
         double ptAx, ptAy, ptBx, ptBy;
         ctx->xform->transform(dx - sx, dy - sy, ptAx, ptAy);
@@ -656,7 +656,7 @@
         double transy0 = 0.0;
         double transx1 = 0.0;
         double transy1 = 0.0;
-        const wchar_t* sGrowCtrl = growControl.evaluate(ctx->exec);
+        const wchar_t* sGrowCtrl = growControl.evaluate(ctx->eval);
         if (wcscmp(sGrowCtrl, L"GrowInX") == 0)
         {
             if (sx0 != 0.0)
@@ -779,18 +779,18 @@
     delete rstyle;
     rstyle = style;
 
-    const wchar_t* sAngleControl = angleControl.evaluate(ctx->exec);
+    const wchar_t* sAngleControl = angleControl.evaluate(ctx->eval);
     if (wcscmp(sAngleControl, L"FromGeometry") == 0)
         style->angleControl = SE_AngleControl_FromGeometry;
     else // default is FromAngle
         style->angleControl = SE_AngleControl_FromAngle;
 
-    style->angleRad = fmod(angleDeg.evaluate(ctx->exec), 360.0) * M_PI180;
+    style->angleRad = fmod(angleDeg.evaluate(ctx->eval), 360.0) * M_PI180;
 
     // scale by xform->x0 and xform->y1 instead of mm2su, because these encompass
     // mm2su as well as scaleX and scaleY
-    style->offset[0] = originOffset[0].evaluate(ctx->exec) * ctx->xform->x0;
-    style->offset[1] = originOffset[1].evaluate(ctx->exec) * ctx->xform->y1;
+    style->offset[0] = originOffset[0].evaluate(ctx->eval) * ctx->xform->x0;
+    style->offset[1] = originOffset[1].evaluate(ctx->eval) * ctx->xform->y1;
 
     // evaluate all the primitives too
     SE_Style::evaluate(ctx);
@@ -808,19 +808,19 @@
     delete rstyle;
     rstyle = style;
 
-    const wchar_t* sAngleControl = angleControl.evaluate(ctx->exec);
+    const wchar_t* sAngleControl = angleControl.evaluate(ctx->eval);
     if (wcscmp(sAngleControl, L"FromAngle") == 0)
         style->angleControl = SE_AngleControl_FromAngle;
     else // default is FromGeometry
         style->angleControl = SE_AngleControl_FromGeometry;
 
-    const wchar_t* sUnitsControl = unitsControl.evaluate(ctx->exec);
+    const wchar_t* sUnitsControl = unitsControl.evaluate(ctx->eval);
     if (wcscmp(sUnitsControl, L"Parametric") == 0)
         style->unitsControl = SE_UnitsControl_Parametric;
     else // default is Absolute
         style->unitsControl = SE_UnitsControl_Absolute;
 
-    const wchar_t* sVertexControl = vertexControl.evaluate(ctx->exec);
+    const wchar_t* sVertexControl = vertexControl.evaluate(ctx->eval);
     if (wcscmp(sVertexControl, L"OverlapNone") == 0)
         style->vertexControl = SE_VertexControl_OverlapNone;
     else if (wcscmp(sVertexControl, L"OverlapDirect") == 0)
@@ -831,11 +831,11 @@
     else // default is OverlapWrap
         style->vertexControl = SE_VertexControl_OverlapWrap;
 
-    style->angleRad = fmod(angleDeg.evaluate(ctx->exec), 360.0) * M_PI180;
+    style->angleRad = fmod(angleDeg.evaluate(ctx->eval), 360.0) * M_PI180;
 
-    style->startOffset = startOffset.evaluate(ctx->exec);
-    style->endOffset   = endOffset.evaluate(ctx->exec);
-    style->repeat      = repeat.evaluate(ctx->exec);
+    style->startOffset = startOffset.evaluate(ctx->eval);
+    style->endOffset   = endOffset.evaluate(ctx->eval);
+    style->repeat      = repeat.evaluate(ctx->eval);
 
     // with parametric units control the repeat / offsets will be scaled
     // later on by each contour length, which includes the transform
@@ -862,15 +862,15 @@
         }
     }
 
-    double angleLimit = vertexAngleLimit.evaluate(ctx->exec);
+    double angleLimit = vertexAngleLimit.evaluate(ctx->eval);
     if (angleLimit < 0.0)
         angleLimit = 0.0;
     style->vertexAngleLimit = fmod(angleLimit, 360.0) * M_PI180;
-    style->vertexMiterLimit = vertexMiterLimit.evaluate(ctx->exec);
+    style->vertexMiterLimit = vertexMiterLimit.evaluate(ctx->eval);
     if (style->vertexMiterLimit < 0.0)
         style->vertexMiterLimit = 0.0;
 
-    const wchar_t* sJoin = vertexJoin.evaluate(ctx->exec);
+    const wchar_t* sJoin = vertexJoin.evaluate(ctx->eval);
     if (wcscmp(sJoin, L"Round") == 0)       // check this first since it's the most common
         style->vertexJoin = SE_LineJoin_Round;
     else if (wcscmp(sJoin, L"None") == 0)
@@ -885,10 +885,10 @@
     else // default is Round
         style->vertexJoin = SE_LineJoin_Round;
 
-    double wx                      = dpWeightScalable.evaluate(ctx->exec)? fabs(ctx->xform->x0) : ctx->mm2su;
-    style->dpLineStroke.weight     = dpWeight.evaluate(ctx->exec) * wx;
-    style->dpLineStroke.color      = dpColor.evaluate(ctx->exec);
-    style->dpLineStroke.miterLimit = dpMiterLimit.evaluate(ctx->exec);
+    double wx                      = dpWeightScalable.evaluate(ctx->eval)? fabs(ctx->xform->x0) : ctx->mm2su;
+    style->dpLineStroke.weight     = dpWeight.evaluate(ctx->eval) * wx;
+    style->dpLineStroke.color      = dpColor.evaluate(ctx->eval);
+    style->dpLineStroke.miterLimit = dpMiterLimit.evaluate(ctx->eval);
     if (style->dpLineStroke.miterLimit < 0.0)
         style->dpLineStroke.miterLimit = 0.0;
 
@@ -899,7 +899,7 @@
     else if (devWeightInMM < 0.0)
         style->dpLineStroke.weight = 0.0;
 
-    const wchar_t* sdpCap = dpCap.evaluate(ctx->exec);
+    const wchar_t* sdpCap = dpCap.evaluate(ctx->eval);
     if (wcscmp(sdpCap, L"Round") == 0)      // check this first since it's the most common
         style->dpLineStroke.cap = SE_LineCap_Round;
     else if (wcscmp(sdpCap, L"None") == 0)
@@ -911,7 +911,7 @@
     else // default is Round
         style->dpLineStroke.cap = SE_LineCap_Round;
 
-    const wchar_t* sdpJoin = dpJoin.evaluate(ctx->exec);
+    const wchar_t* sdpJoin = dpJoin.evaluate(ctx->eval);
     if (wcscmp(sdpJoin, L"Round") == 0)     // check this first since it's the most common
         style->dpLineStroke.join = SE_LineJoin_Round;
     else if (wcscmp(sdpJoin, L"None") == 0)
@@ -974,13 +974,13 @@
     delete rstyle;
     rstyle = style;
 
-    const wchar_t* sAngleControl = angleControl.evaluate(ctx->exec);
+    const wchar_t* sAngleControl = angleControl.evaluate(ctx->eval);
     if (wcscmp(sAngleControl, L"FromGeometry") == 0)
         style->angleControl = SE_AngleControl_FromGeometry;
     else // default is FromAngle
         style->angleControl = SE_AngleControl_FromAngle;
 
-    const wchar_t* sOriginControl = originControl.evaluate(ctx->exec);
+    const wchar_t* sOriginControl = originControl.evaluate(ctx->eval);
     if (wcscmp(sOriginControl, L"Centroid") == 0)
         style->originControl = SE_OriginControl_Centroid;
     else if (wcscmp(sOriginControl, L"Local") == 0)
@@ -988,7 +988,7 @@
     else // default is Global
         style->originControl = SE_OriginControl_Global;
 
-    const wchar_t* sClippingControl = clippingControl.evaluate(ctx->exec);
+    const wchar_t* sClippingControl = clippingControl.evaluate(ctx->eval);
     if (wcscmp(sClippingControl, L"Inside") == 0)
         style->clippingControl = SE_ClippingControl_Inside;
     else if (wcscmp(sClippingControl, L"Overlap") == 0)
@@ -996,12 +996,12 @@
     else // default is Clip
         style->clippingControl = SE_ClippingControl_Clip;
 
-    style->angleRad = fmod(angleDeg.evaluate(ctx->exec), 360.0) * M_PI180;
+    style->angleRad = fmod(angleDeg.evaluate(ctx->eval), 360.0) * M_PI180;
 
     // scale by xform->x0 and xform->y1 instead of mm2su, because these encompass
     // mm2su as well as scaleX and scaleY
-    style->origin[0]   = origin[0].evaluate(ctx->exec);
-    style->origin[1]   = origin[1].evaluate(ctx->exec);
+    style->origin[0]   = origin[0].evaluate(ctx->eval);
+    style->origin[1]   = origin[1].evaluate(ctx->eval);
     if (style->originControl != SE_OriginControl_Local)
     {
         // For non-local origin control the origin is in millimeters and must
@@ -1017,9 +1017,9 @@
         if (ctx->xform->y1 < 0.0)
             style->origin[1] = 1.0 - style->origin[1];
     }
-    style->repeat[0]   = repeat[0].evaluate(ctx->exec)   * fabs(ctx->xform->x0);
-    style->repeat[1]   = repeat[1].evaluate(ctx->exec)   * fabs(ctx->xform->y1);
-    style->bufferWidth = bufferWidth.evaluate(ctx->exec) * fabs(ctx->xform->x0);
+    style->repeat[0]   = repeat[0].evaluate(ctx->eval)   * fabs(ctx->xform->x0);
+    style->repeat[1]   = repeat[1].evaluate(ctx->eval)   * fabs(ctx->xform->y1);
+    style->bufferWidth = bufferWidth.evaluate(ctx->eval) * fabs(ctx->xform->x0);
     double origRepeatX = style->repeat[0];
     double origRepeatY = style->repeat[1];
 

Modified: sandbox/jng/stylization_refactor/Common/Stylization/SE_SymbolDefProxies.h
===================================================================
--- sandbox/jng/stylization_refactor/Common/Stylization/SE_SymbolDefProxies.h	2013-08-07 11:46:58 UTC (rev 7741)
+++ sandbox/jng/stylization_refactor/Common/Stylization/SE_SymbolDefProxies.h	2013-08-07 15:40:11 UTC (rev 7742)
@@ -37,7 +37,7 @@
 public:
     RS_FontEngine* fonte;
     SE_Matrix* xform;
-    FdoExpressionEngine* exec;
+    SE_Evaluator* eval;
     SE_SymbolManager* resources;
     double mm2su;
     double mm2sud;      // number of screen units per mm device
@@ -286,16 +286,12 @@
 {
     std::vector<SE_SymbolInstance*> symbolInstances;
     RS_String legendLabel;  // no expressions on this guy?
-    FdoFilter* filter;
+    MdfModel::MdfString filter;
 
-    SE_Rule() : filter(NULL)
-    {}
+    SE_Rule() {}
 
     ~SE_Rule()
     {
-        if (filter)
-            filter->Release();
-
         for (std::vector<SE_SymbolInstance*>::iterator iter = symbolInstances.begin(); iter != symbolInstances.end(); ++iter)
             delete *iter;
 

Modified: sandbox/jng/stylization_refactor/Common/Stylization/Stylization.vcxproj
===================================================================
--- sandbox/jng/stylization_refactor/Common/Stylization/Stylization.vcxproj	2013-08-07 11:46:58 UTC (rev 7741)
+++ sandbox/jng/stylization_refactor/Common/Stylization/Stylization.vcxproj	2013-08-07 15:40:11 UTC (rev 7742)
@@ -235,11 +235,13 @@
     <ClCompile Include="ExpressionFunctionSession.cpp" />
     <ClCompile Include="ExpressionFunctionUrlEncode.cpp" />
     <ClCompile Include="ExpressionHelper.cpp" />
+    <ClCompile Include="FdoEvaluator.cpp" />
     <ClCompile Include="LineBuffer.cpp" />
     <ClCompile Include="Matrix3D.cpp" />
     <ClCompile Include="Point2D.cpp" />
     <ClCompile Include="Point3D.cpp" />
     <ClCompile Include="PolygonUtils.cpp" />
+    <ClCompile Include="SE_Evaluator.cpp" />
     <ClCompile Include="Vector2D.cpp" />
     <ClCompile Include="Vector3D.cpp" />
     <ClCompile Include="Stylizer.cpp" />
@@ -325,11 +327,13 @@
     <ClInclude Include="ExpressionHelper.h" />
     <ClInclude Include="Bounds.h" />
     <ClInclude Include="DataValueStack.h" />
+    <ClInclude Include="FdoEvaluator.h" />
     <ClInclude Include="LineBuffer.h" />
     <ClInclude Include="Matrix3D.h" />
     <ClInclude Include="Point2D.h" />
     <ClInclude Include="Point3D.h" />
     <ClInclude Include="PolygonUtils.h" />
+    <ClInclude Include="SE_Evaluator.h" />
     <ClInclude Include="Vector2D.h" />
     <ClInclude Include="Vector3D.h" />
     <ClInclude Include="CSysTransformer.h" />

Modified: sandbox/jng/stylization_refactor/Common/Stylization/Stylization.vcxproj.filters
===================================================================
--- sandbox/jng/stylization_refactor/Common/Stylization/Stylization.vcxproj.filters	2013-08-07 11:46:58 UTC (rev 7741)
+++ sandbox/jng/stylization_refactor/Common/Stylization/Stylization.vcxproj.filters	2013-08-07 15:40:11 UTC (rev 7742)
@@ -283,6 +283,12 @@
     <ClCompile Include="ExpressionFunctionMapScale.cpp">
       <Filter>ExpressionEngine</Filter>
     </ClCompile>
+    <ClCompile Include="SE_Evaluator.cpp">
+      <Filter>StyleEngine</Filter>
+    </ClCompile>
+    <ClCompile Include="FdoEvaluator.cpp">
+      <Filter>ExpressionEngine</Filter>
+    </ClCompile>
   </ItemGroup>
   <ItemGroup>
     <ClInclude Include="ExpressionFunctionArgb.h">
@@ -608,6 +614,12 @@
     <ClInclude Include="ExpressionFunctionMapScale.h">
       <Filter>ExpressionEngine</Filter>
     </ClInclude>
+    <ClInclude Include="SE_Evaluator.h">
+      <Filter>StyleEngine</Filter>
+    </ClInclude>
+    <ClInclude Include="FdoEvaluator.h">
+      <Filter>ExpressionEngine</Filter>
+    </ClInclude>
   </ItemGroup>
   <ItemGroup>
     <ResourceCompile Include="Stylization.rc" />

Modified: sandbox/jng/stylization_refactor/Common/Stylization/StylizationEngine.cpp
===================================================================
--- sandbox/jng/stylization_refactor/Common/Stylization/StylizationEngine.cpp	2013-08-07 11:46:58 UTC (rev 7741)
+++ sandbox/jng/stylization_refactor/Common/Stylization/StylizationEngine.cpp	2013-08-07 15:40:11 UTC (rev 7742)
@@ -24,6 +24,7 @@
 #include "SE_PositioningAlgorithms.h"
 #include "SE_SymbolDefProxies.h"
 #include "FeatureTypeStyleVisitor.h"
+#include "FdoEvaluator.h"
 
 #include <algorithm>
 #include <functional>
@@ -54,7 +55,7 @@
 
 
 // TODO: Stylize one CompoundSymbol feature and label per run; investigate caching
-//       possibilities to avoid filter execution on subsequent passes
+//       possibilities to avoid filter evalution on subsequent passes
 void StylizationEngine::StylizeVectorLayer(MdfModel::VectorLayerDefinition* layer,
                                            MdfModel::VectorScaleRange*      range,
                                            SE_Renderer*                     se_renderer,
@@ -127,7 +128,7 @@
         //       stores a weak reference to the RS_FeatureReader's internal
         //       FdoIFeatureReader, and this internal reader is different for each
         //       pass.
-        FdoPtr<FdoExpressionEngine> exec = ExpressionHelper::GetExpressionEngine(se_renderer, reader);
+        FdoEvaluator eval(se_renderer, reader);
 
         while (reader->ReadNext())
         {
@@ -168,7 +169,7 @@
             for (size_t i=0; i<numTypeStyles; ++i)
             {
                 bool initialPass = (i == 0 && instanceRenderingPass == 0 && symbolRenderingPass == 0);
-                Stylize(reader, exec, lb, compTypeStyles[i], &seTip, &seUrl, NULL,
+                Stylize(reader, &eval, lb, compTypeStyles[i], &seTip, &seUrl, NULL,
                         initialPass, instanceRenderingPass, symbolRenderingPass,
                         nextInstanceRenderingPass, nextSymbolRenderingPass);
             }
@@ -460,7 +461,7 @@
         //       stores a weak reference to the RS_FeatureReader's internal
         //       FdoIFeatureReader, and this internal reader is different for each
         //       pass.
-        FdoPtr<FdoExpressionEngine> exec = ExpressionHelper::GetExpressionEngine(se_renderer, NULL);
+        FdoEvaluator eval(se_renderer, NULL);
 
         std::auto_ptr<LineBuffer> spLB;
         size_t nPos = watermarkPosList.size();
@@ -523,8 +524,8 @@
             // - compute the overall clip offset
 
             SE_Matrix xformScale;
-            xformScale.scale(sym->scale[0].evaluate(exec),
-                             sym->scale[1].evaluate(exec));
+            xformScale.scale(sym->scale[0].evaluate(&eval),
+                             sym->scale[1].evaluate(&eval));
 
             // The symbol geometry needs to be inverted if the y coordinate in the renderer
             // points down.  This is so that in symbol definitions y points up consistently
@@ -538,7 +539,7 @@
 
             // initialize the style evaluation context
             SE_EvalContext evalCtx;
-            evalCtx.exec = exec;
+            evalCtx.eval = &eval;
             evalCtx.mm2su = mm2suX;
             evalCtx.mm2sud = mm2sud;
             evalCtx.mm2suw = mm2suw;
@@ -555,7 +556,7 @@
 
                 // process the symbol rendering pass - negative rendering passes are
                 // rendered with pass 0
-                int symbolRenderPass = style->renderPass.evaluate(exec);
+                int symbolRenderPass = style->renderPass.evaluate(&eval);
                 if (symbolRenderPass < 0)
                     symbolRenderPass = 0;
 
@@ -636,7 +637,7 @@
                 for (size_t styIx=0; styIx<nStyles; ++styIx)
                 {
                     SE_Style* style = sym->styles[styIx];
-                    double styleClipOffsetSU = GetClipOffset(sym, style, exec, mm2suX, mm2suY);
+                    double styleClipOffsetSU = GetClipOffset(sym, style, &eval, mm2suX, mm2suY);
                     clipOffsetSU = rs_max(styleClipOffsetSU, clipOffsetSU);
                 }
 
@@ -677,8 +678,8 @@
 
             // initialize the style application context
             SE_Matrix xformTrans;
-            xformTrans.translate(sym->absOffset[0].evaluate(exec) * mm2suX,
-                                 sym->absOffset[1].evaluate(exec) * mm2suY);
+            xformTrans.translate(sym->absOffset[0].evaluate(&eval) * mm2suX,
+                                 sym->absOffset[1].evaluate(&eval) * mm2suY);
 
             SE_ApplyContext applyCtx;
             applyCtx.geometry = lb;
@@ -692,7 +693,7 @@
 
                 // process the symbol rendering pass - negative rendering passes are
                 // rendered with pass 0
-                int symbolRenderPass = style->renderPass.evaluate(exec);
+                int symbolRenderPass = style->renderPass.evaluate(&eval);
                 if (symbolRenderPass < 0)
                     symbolRenderPass = 0;
 
@@ -714,11 +715,11 @@
                 }
 
                 // TODO: why are these in the symbol instance?
-                style->rstyle->addToExclusionRegion = sym->addToExclusionRegion.evaluate(exec);
-                style->rstyle->checkExclusionRegion = sym->checkExclusionRegion.evaluate(exec);
-                style->rstyle->drawLast = sym->drawLast.evaluate(exec);
+                style->rstyle->addToExclusionRegion = sym->addToExclusionRegion.evaluate(&eval);
+                style->rstyle->checkExclusionRegion = sym->checkExclusionRegion.evaluate(&eval);
+                style->rstyle->drawLast = sym->drawLast.evaluate(&eval);
 
-                const wchar_t* positioningAlgo = sym->positioningAlgorithm.evaluate(exec);
+                const wchar_t* positioningAlgo = sym->positioningAlgorithm.evaluate(&eval);
                 if (wcslen(positioningAlgo) > 0)
                 {
                     LayoutCustomLabel(positioningAlgo, &applyCtx, style->rstyle, mm2suX);
@@ -749,7 +750,7 @@
 
 
 void StylizationEngine::Stylize(RS_FeatureReader* reader,
-                                FdoExpressionEngine* exec,
+                                SE_Evaluator* eval,
                                 LineBuffer* geometry,
                                 CompositeTypeStyle* style,
                                 SE_String* seTip,
@@ -777,17 +778,9 @@
         {
             CompositeRule* r = static_cast<CompositeRule*>(rulecoll->GetAt(i));
             const MdfString& filterstr = r->GetFilter();
-            rulecache[i].filter = NULL;
             if (!filterstr.empty())
             {
-                try
-                {
-                    rulecache[i].filter = FdoFilter::Parse(filterstr.c_str());
-                }
-                catch (FdoException* e)
-                {
-                    ProcessStylizerException(e, __LINE__, __WFILE__);
-                }
+                rulecache[i].filter = filterstr;
             }
 
             rulecache[i].legendLabel= r->GetLegendLabel();
@@ -800,13 +793,13 @@
     SE_Rule* rule = NULL;
     for (int i=0; i<nRules; ++i)
     {
-        bool match = (rules[i].filter == NULL);
+        bool match = (rules[i].filter.empty());
 
         if (!match)
         {
             try
             {
-                match = exec->ProcessFilter(rules[i].filter);
+                match = eval->ExecFilter(&rules[i].filter);
             }
             catch (FdoException* e)
             {
@@ -826,10 +819,10 @@
 
     // we found a valid rule - send a StartFeature notification
     RS_String rs_tip, rs_url;
-    if (seTip->expression || wcslen(seTip->getValue()) > 0)
-        rs_tip = seTip->evaluate(exec);
-    if (seUrl->expression || wcslen(seUrl->getValue()) > 0)
-        rs_url = seUrl->evaluate(exec);
+    if (!seTip->expression.empty() || wcslen(seTip->getValue()) > 0)
+        rs_tip = seTip->evaluate(eval);
+    if (!seUrl->expression.empty() || wcslen(seUrl->getValue()) > 0)
+        rs_url = seUrl->evaluate(eval);
     RS_String& rs_thm = rule->legendLabel;
     m_serenderer->StartFeature(reader, initialPass, rs_tip.empty()? NULL : &rs_tip, rs_url.empty()? NULL : &rs_url, rs_thm.empty()? NULL : &rs_thm);
 
@@ -951,7 +944,7 @@
 
         // process the instance rendering pass - negative rendering passes
         // are rendered with pass 0
-        int instanceRenderPass = sym->renderPass.evaluate(exec);
+        int instanceRenderPass = sym->renderPass.evaluate(eval);
         if (instanceRenderPass < 0)
             instanceRenderPass = 0;
 
@@ -994,8 +987,8 @@
         }
 
         SE_Matrix xformScale;
-        xformScale.scale(sym->scale[0].evaluate(exec),
-                         sym->scale[1].evaluate(exec));
+        xformScale.scale(sym->scale[0].evaluate(eval),
+                         sym->scale[1].evaluate(eval));
 
         // The symbol geometry needs to be inverted if the y coordinate in the renderer
         // points down.  This is so that in symbol definitions y points up consistently
@@ -1009,7 +1002,7 @@
 
         // initialize the style evaluation context
         SE_EvalContext evalCtx;
-        evalCtx.exec = exec;
+        evalCtx.eval = eval;
         evalCtx.mm2su = mm2suX;
         evalCtx.mm2sud = mm2sud;
         evalCtx.mm2suw = mm2suw;
@@ -1027,7 +1020,7 @@
 
             // process the symbol rendering pass - negative rendering passes are
             // rendered with pass 0
-            int symbolRenderPass = style->renderPass.evaluate(exec);
+            int symbolRenderPass = style->renderPass.evaluate(eval);
             if (symbolRenderPass < 0)
                 symbolRenderPass = 0;
 
@@ -1043,7 +1036,7 @@
             // compute offset to apply to the clipping bounds
             if (bClip)
             {
-                double styleClipOffsetSU = GetClipOffset(sym, style, exec, mm2suX, mm2suY);
+                double styleClipOffsetSU = GetClipOffset(sym, style, eval, mm2suX, mm2suY);
                 clipOffsetSU = rs_max(styleClipOffsetSU, clipOffsetSU);
             }
         }
@@ -1100,7 +1093,7 @@
 
             // process the instance rendering pass - negative rendering passes are
             // rendered with pass 0
-            int instanceRenderPass = sym->renderPass.evaluate(exec);
+            int instanceRenderPass = sym->renderPass.evaluate(eval);
             if (instanceRenderPass < 0)
                 instanceRenderPass = 0;
 
@@ -1160,8 +1153,8 @@
 
             // initialize the style application context
             SE_Matrix xformTrans;
-            xformTrans.translate(sym->absOffset[0].evaluate(exec) * mm2suX,
-                                 sym->absOffset[1].evaluate(exec) * mm2suY);
+            xformTrans.translate(sym->absOffset[0].evaluate(eval) * mm2suX,
+                                 sym->absOffset[1].evaluate(eval) * mm2suY);
 
             SE_ApplyContext applyCtx;
             applyCtx.geometry = lb;
@@ -1176,7 +1169,7 @@
 
                 // process the symbol rendering pass - negative rendering passes are
                 // rendered with pass 0
-                int symbolRenderPass = style->renderPass.evaluate(exec);
+                int symbolRenderPass = style->renderPass.evaluate(eval);
                 if (symbolRenderPass < 0)
                     symbolRenderPass = 0;
 
@@ -1198,11 +1191,11 @@
                 }
 
                 // TODO: why are these in the symbol instance?
-                style->rstyle->addToExclusionRegion = sym->addToExclusionRegion.evaluate(exec);
-                style->rstyle->checkExclusionRegion = sym->checkExclusionRegion.evaluate(exec);
-                style->rstyle->drawLast = sym->drawLast.evaluate(exec);
+                style->rstyle->addToExclusionRegion = sym->addToExclusionRegion.evaluate(eval);
+                style->rstyle->checkExclusionRegion = sym->checkExclusionRegion.evaluate(eval);
+                style->rstyle->drawLast = sym->drawLast.evaluate(eval);
 
-                const wchar_t* positioningAlgo = sym->positioningAlgorithm.evaluate(exec);
+                const wchar_t* positioningAlgo = sym->positioningAlgorithm.evaluate(eval);
                 if (wcslen(positioningAlgo) > 0)
                 {
                     LayoutCustomLabel(positioningAlgo, &applyCtx, style->rstyle, mm2suX);
@@ -1232,7 +1225,7 @@
 // to them does not display in the map region.  This method computes the
 // required clip offset for the supplied style.  The value returned is in
 // screen units.
-double StylizationEngine::GetClipOffset(SE_SymbolInstance* sym, SE_Style* style, FdoExpressionEngine* exec, double mm2suX, double mm2suY)
+double StylizationEngine::GetClipOffset(SE_SymbolInstance* sym, SE_Style* style, SE_Evaluator* eval, double mm2suX, double mm2suY)
 {
     double clipOffsetSU = 0.0;
 
@@ -1256,8 +1249,8 @@
                 xformStyle.rotate(ptStyle->angleRad);
 
                 // symbol instance offset
-                xformStyle.translate(sym->absOffset[0].evaluate(exec) * mm2suX,
-                                     sym->absOffset[1].evaluate(exec) * mm2suY);
+                xformStyle.translate(sym->absOffset[0].evaluate(eval) * mm2suX,
+                                     sym->absOffset[1].evaluate(eval) * mm2suY);
 
                 // compute the offset
                 for (int i=0; i<4; ++i)

Modified: sandbox/jng/stylization_refactor/Common/Stylization/StylizationEngine.h
===================================================================
--- sandbox/jng/stylization_refactor/Common/Stylization/StylizationEngine.h	2013-08-07 11:46:58 UTC (rev 7741)
+++ sandbox/jng/stylization_refactor/Common/Stylization/StylizationEngine.h	2013-08-07 15:40:11 UTC (rev 7742)
@@ -29,6 +29,7 @@
 class SE_BufferPool;
 class SE_StyleVisitor;
 class SE_ApplyContext;
+class SE_Evaluator;
 class RS_FeatureReader;
 class RS_ElevationSettings;
 class LineBuffer;
@@ -79,7 +80,7 @@
 
     // Stylizes the current feature on the reader using the supplied composite type style.
     void Stylize(RS_FeatureReader* reader,
-                 FdoExpressionEngine* exec,
+                 SE_Evaluator* eval,
                  LineBuffer* geometry,
                  CompositeTypeStyle* style,
                  SE_String* seTip,
@@ -95,7 +96,7 @@
 
 private:
     void LayoutCustomLabel(const wchar_t* positioningAlgo, SE_ApplyContext* applyCtx, SE_RenderStyle* rstyle, double mm2su);
-    double GetClipOffset(SE_SymbolInstance* sym, SE_Style* style, FdoExpressionEngine* exec, double mm2suX, double mm2suY);
+    double GetClipOffset(SE_SymbolInstance* sym, SE_Style* style, SE_Evaluator* eval, double mm2suX, double mm2suY);
 
 private:
     SE_Renderer* m_serenderer;

Modified: sandbox/jng/stylization_refactor/Common/Stylization/StylizationUtil.cpp
===================================================================
--- sandbox/jng/stylization_refactor/Common/Stylization/StylizationUtil.cpp	2013-08-07 11:46:58 UTC (rev 7741)
+++ sandbox/jng/stylization_refactor/Common/Stylization/StylizationUtil.cpp	2013-08-07 15:40:11 UTC (rev 7742)
@@ -23,6 +23,7 @@
 #include "SLDSymbols.h"
 #include "SE_StyleVisitor.h"
 #include "SE_BufferPool.h"
+#include "FdoEvaluator.h"
 #include <cmath>
 
 extern void ProcessStylizerException(FdoException* exception, int line, wchar_t* file);
@@ -518,14 +519,15 @@
     visitor.Convert(symbolInstances, csym);
 
     // create an expression engine with our custom functions
-    FdoPtr<FdoExpressionEngine> exec = ExpressionHelper::GetExpressionEngine(pSERenderer, NULL);
+    //FdoPtr<FdoExpressionEngine> eval = ExpressionHelper::GetExpressionEngine(pSERenderer, NULL);
+    FdoEvaluator eval(pSERenderer, NULL);
 
     //-------------------------------------------------------
     // step 1 - get the preview bounds for the symbolization
     //-------------------------------------------------------
 
     RS_Bounds symBounds(DBL_MAX, DBL_MAX, -DBL_MAX, -DBL_MAX);
-    GetCompositeSymbolizationPreviewBounds(symbolInstances, pSERenderer, sman, exec, symBounds);
+    GetCompositeSymbolizationPreviewBounds(symbolInstances, pSERenderer, sman, &eval, symBounds);
 
     //-------------------------------------------------------
     // step 2 - bounds processing
@@ -619,7 +621,7 @@
         SE_SymbolInstance* sym = *iter;
 
         // skip labels
-        if (sym->drawLast.evaluate(exec))
+        if (sym->drawLast.evaluate(&eval))
             continue;
 
         // get the actual amount to scale the symbol instance
@@ -641,15 +643,15 @@
 
         // this time we scale by [S_si], [S_mm], and [S_a]
         SE_Matrix xformScale;
-        xformScale.scale(sym->scale[0].evaluate(exec),
-                         sym->scale[1].evaluate(exec));
+        xformScale.scale(sym->scale[0].evaluate(&eval),
+                         sym->scale[1].evaluate(&eval));
         xformScale.scale(mm2suX, mm2suY);
         xformScale.scale(scale, scale);
 
         // initialize the style evaluation context
         // NOTE: do not adjust the mm2su values by the scale factor
         SE_EvalContext evalCtx;
-        evalCtx.exec = exec;
+        evalCtx.eval = &eval;
         evalCtx.mm2su = mm2suX;
         evalCtx.mm2sud = mm2sud;
         evalCtx.mm2suw = mm2suw;
@@ -710,8 +712,8 @@
                     xformStyle.rotate(angleRad);
 
                     // symbol instance offset - must scale this by [S_mm], and [S_a]
-                    xformStyle.translate(sym->absOffset[0].evaluate(exec) * mm2suX * scale,
-                                         sym->absOffset[1].evaluate(exec) * mm2suY * scale);
+                    xformStyle.translate(sym->absOffset[0].evaluate(&eval) * mm2suX * scale,
+                                         sym->absOffset[1].evaluate(&eval) * mm2suY * scale);
 
                     // factor the translation into the transform and draw the symbol
                     xformStyle.premultiply(xformTrans);
@@ -808,7 +810,7 @@
 void StylizationUtil::GetCompositeSymbolizationPreviewBounds(std::vector<SE_SymbolInstance*> symbolInstances,
                                                              SE_Renderer* pSERenderer,
                                                              SE_SymbolManager* sman,
-                                                             FdoExpressionEngine* exec,
+                                                             SE_Evaluator* eval,
                                                              RS_Bounds& bounds)
 {
     // make sure we have symbol instances
@@ -828,7 +830,7 @@
         SE_SymbolInstance* sym = *iter;
 
         // skip labels
-        if (sym->drawLast.evaluate(exec))
+        if (sym->drawLast.evaluate(eval))
             continue;
 
         // keep y pointing up while we compute the bounds
@@ -836,13 +838,13 @@
         double mm2suY = mm2suX;
 
         SE_Matrix xformScale;
-        xformScale.scale(sym->scale[0].evaluate(exec),
-                         sym->scale[1].evaluate(exec));
+        xformScale.scale(sym->scale[0].evaluate(eval),
+                         sym->scale[1].evaluate(eval));
         xformScale.scale(mm2suX, mm2suY);
 
         // initialize the style evaluation context
         SE_EvalContext evalCtx;
-        evalCtx.exec = exec;
+        evalCtx.eval = eval;
         evalCtx.mm2su = mm2suX;
         evalCtx.mm2sud = mm2sud;
         evalCtx.mm2suw = mm2suw;
@@ -886,8 +888,8 @@
                     xformStyle.rotate(ptStyle->angleRad);
 
                     // symbol instance offset
-                    xformStyle.translate(sym->absOffset[0].evaluate(exec) * mm2suX,
-                                         sym->absOffset[1].evaluate(exec) * mm2suY);
+                    xformStyle.translate(sym->absOffset[0].evaluate(eval) * mm2suX,
+                                         sym->absOffset[1].evaluate(eval) * mm2suY);
 
                     break;
                 }
@@ -981,11 +983,12 @@
     visitor.Convert(symbolInstances, csym);
 
     // create an expression engine with our custom functions
-    FdoPtr<FdoExpressionEngine> exec = ExpressionHelper::GetExpressionEngine(pSERenderer, NULL);
+    //FdoPtr<FdoExpressionEngine> eval = ExpressionHelper::GetExpressionEngine(pSERenderer, NULL);
+    FdoEvaluator eval(pSERenderer, NULL);
 
     // calculate bounds - symbol geometries cannot use expressions, so no expression engine is needed
     RS_Bounds symBounds(DBL_MAX, DBL_MAX, -DBL_MAX, -DBL_MAX);
-    GetCompositeSymbolizationBoundsInternal(symbolInstances, pSERenderer, sman, exec, symBounds);
+    GetCompositeSymbolizationBoundsInternal(symbolInstances, pSERenderer, sman, &eval, symBounds);
 
     // clean up
     for (std::vector<SE_SymbolInstance*>::iterator iter = symbolInstances.begin(); iter != symbolInstances.end(); ++iter)
@@ -1003,7 +1006,7 @@
 void StylizationUtil::GetCompositeSymbolizationBoundsInternal(std::vector<SE_SymbolInstance*> symbolInstances,
                                                               SE_Renderer* pSERenderer,
                                                               SE_SymbolManager* sman,
-                                                              FdoExpressionEngine* exec,
+                                                              SE_Evaluator* eval,
                                                               RS_Bounds& bounds)
 {
     // make sure we have symbol instances
@@ -1021,7 +1024,7 @@
         SE_SymbolInstance* sym = *iter;
 
         // skip labels
-        if (sym->drawLast.evaluate(exec))
+        if (sym->drawLast.evaluate(eval))
             continue;
 
         // keep y pointing up while we compute the bounds
@@ -1029,13 +1032,13 @@
         double mm2suY = mm2suX;
 
         SE_Matrix xformScale;
-        xformScale.scale(sym->scale[0].evaluate(exec),
-                         sym->scale[1].evaluate(exec));
+        xformScale.scale(sym->scale[0].evaluate(eval),
+                         sym->scale[1].evaluate(eval));
         xformScale.scale(mm2suX, mm2suY);
 
         // initialize the style evaluation context
         SE_EvalContext evalCtx;
-        evalCtx.exec = exec;
+        evalCtx.eval = eval;
         evalCtx.mm2su = mm2suX;
         evalCtx.mm2sud = mm2sud;
         evalCtx.mm2suw = mm2suw;
@@ -1069,8 +1072,8 @@
                     xformStyle.rotate(ptStyle->angleRad);
 
                     // symbol instance offset
-                    xformStyle.translate(sym->absOffset[0].evaluate(exec) * mm2suX,
-                                         sym->absOffset[1].evaluate(exec) * mm2suY);
+                    xformStyle.translate(sym->absOffset[0].evaluate(eval) * mm2suX,
+                                         sym->absOffset[1].evaluate(eval) * mm2suY);
 
                     break;
                 }

Modified: sandbox/jng/stylization_refactor/Common/Stylization/StylizationUtil.h
===================================================================
--- sandbox/jng/stylization_refactor/Common/Stylization/StylizationUtil.h	2013-08-07 11:46:58 UTC (rev 7741)
+++ sandbox/jng/stylization_refactor/Common/Stylization/StylizationUtil.h	2013-08-07 15:40:11 UTC (rev 7742)
@@ -27,6 +27,7 @@
 class Renderer;
 class SE_Renderer;
 class SE_SymbolManager;
+class SE_Evaluator;
 struct SE_SymbolInstance;
 
 // Provides helper methods for:
@@ -73,13 +74,13 @@
     static void GetCompositeSymbolizationBoundsInternal(std::vector<SE_SymbolInstance*> symbolInstances,
                                                         SE_Renderer* pSERenderer,
                                                         SE_SymbolManager* sman,
-                                                        FdoExpressionEngine* exec,
+                                                        SE_Evaluator* eval,
                                                         RS_Bounds& bounds);
 
     static void GetCompositeSymbolizationPreviewBounds(std::vector<SE_SymbolInstance*> symbolInstances,
                                                        SE_Renderer* pSERenderer,
                                                        SE_SymbolManager* sman,
-                                                       FdoExpressionEngine* exec,
+                                                       SE_Evaluator* eval,
                                                        RS_Bounds& bounds);
 };
 



More information about the mapguide-commits mailing list