dbertoni    2002/09/06 17:03:07

  Modified:    c/src/XSLT ElemNumber.cpp ElemNumber.hpp
  Log:
  Reduce start-up dynamic memory utilization.
  
  Revision  Changes    Path
  1.60      +10 -13    xml-xalan/c/src/XSLT/ElemNumber.cpp
  
  Index: ElemNumber.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XSLT/ElemNumber.cpp,v
  retrieving revision 1.59
  retrieving revision 1.60
  diff -u -r1.59 -r1.60
  --- ElemNumber.cpp    6 Sep 2002 18:54:41 -0000       1.59
  +++ ElemNumber.cpp    7 Sep 2002 00:03:06 -0000       1.60
  @@ -1375,12 +1375,7 @@
   
                                if (equals(letterVal, s_traditionalString) == 
true)
                                {
  -                                     
NumberingResourceBundleMapType::const_iterator  i = 
s_resourceBundles.find(0x03B1);
  -
  -                                     if (i != s_resourceBundles.end())
  -                                     {
  -                                             
traditionalAlphaCount(listElement, (*i).second, theResult);
  -                                     }
  +                                     traditionalAlphaCount(listElement, 
s_elalphaResourceBundle, theResult);
                                }
                                else if (equals(letterVal, s_alphabeticString) 
== true)
                                {
  @@ -1995,13 +1990,15 @@
   };
   
   
  -const ElemNumber::NumberingResourceBundleMapType&    
ElemNumber::s_resourceBundles =
  -                             ::s_resourceBundles;
  +static XalanNumberingResourceBundle          s_elalphaResourceBundle;
  +
  +const XalanNumberingResourceBundle&  ElemNumber::s_elalphaResourceBundle =
  +             ::s_elalphaResourceBundle;
   
   
   
   static void
  -addTraditionalElalphaBundle(ElemNumber::NumberingResourceBundleMapType&      
        theBundleMap)
  +initializeTraditionalElalphaBundle(XalanNumberingResourceBundle&     
theBundle)
   {
   
        // The following are a bunch of static data the comprise the contents 
of the bundle.
  @@ -2099,8 +2096,8 @@
                theElalphaDigitsTable,
                theDigitsTableTable);
   
  -     // Swap it with the one in the map (this avoids making a copy...)
  -     theBundleMap[elalphaNumberType].swap(theElaphaBundle);
  +     // Swap it with the one (this avoids making a copy...)
  +     theBundle.swap(theElaphaBundle);
   }
   
   
  @@ -2114,7 +2111,7 @@
   
        ::s_slashString = XALAN_STATIC_UCODE_STRING("/");
   
  -     addTraditionalElalphaBundle(::s_resourceBundles);
  +     initializeTraditionalElalphaBundle(::s_elalphaResourceBundle);
   }
   
   
  @@ -2126,5 +2123,5 @@
        releaseMemory(::s_commentString);
        releaseMemory(::s_slashString);
   
  -     NumberingResourceBundleMapType().swap(::s_resourceBundles);
  +     XalanNumberingResourceBundle().swap(::s_elalphaResourceBundle);
   }
  
  
  
  1.39      +8 -3      xml-xalan/c/src/XSLT/ElemNumber.hpp
  
  Index: ElemNumber.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XSLT/ElemNumber.hpp,v
  retrieving revision 1.38
  retrieving revision 1.39
  diff -u -r1.38 -r1.39
  --- ElemNumber.hpp    6 Sep 2002 18:54:41 -0000       1.38
  +++ ElemNumber.hpp    7 Sep 2002 00:03:07 -0000       1.39
  @@ -64,12 +64,16 @@
   
   
   
  +#include <vector>
  +
  +
  +
   // Base class header file.
   #include <XSLT/ElemTemplateElement.hpp>
   
   
   
  -#include <XPath/MutableNodeRefList.hpp>
  +#include <XPath/NodeRefListBase.hpp>
   
   
   
  @@ -80,6 +84,7 @@
   
   class AVT;
   class CountersTable;
  +class MutableNodeRefList;
   class XalanNumberFormat;
   class XPath;
   class XPathExecutionContext;
  @@ -467,9 +472,9 @@
        static const DecimalToRoman                             
s_romanConvertTable[];
   
        /**
  -      * A map of supported numbering resource bundles.
  +      * numbering resource bundle for Greek numbering.
         */
  -     static const NumberingResourceBundleMapType&    s_resourceBundles;
  +     static const XalanNumberingResourceBundle&      s_elalphaResourceBundle;
   
   
   public:
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to