peiyongz    2004/11/07 19:56:47

  Modified:    c/src/xercesc/internal XSerializeEngine.hpp
                        XSerializeEngine.cpp
  Log:
  setting/getting Storer level
  
  Revision  Changes    Path
  1.21      +37 -2     xml-xerces/c/src/xercesc/internal/XSerializeEngine.hpp
  
  Index: XSerializeEngine.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/xercesc/internal/XSerializeEngine.hpp,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- XSerializeEngine.hpp      27 Oct 2004 20:38:52 -0000      1.20
  +++ XSerializeEngine.hpp      8 Nov 2004 03:56:47 -0000       1.21
  @@ -16,6 +16,9 @@
   
   /*
    * $Log$
  + * Revision 1.21  2004/11/08 03:56:47  peiyongz
  + * setting/getting Storer level
  + *
    * Revision 1.20  2004/10/27 20:38:52  peiyongz
    * Optimized alignment for various data types
    *
  @@ -100,6 +103,7 @@
   class BinOutputStream;
   class BinInputStream;
   class XMLGrammarPool;
  +class XMLGrammarPoolImpl;
   class XMLStringPool;
   
   class XMLUTIL_EXPORT XSerializeEngine
  @@ -259,6 +263,20 @@
   
       /***
         *
  +      *  Get the storer level (the level of the serialize engine
  +      *  which created the binary stream that this serialize engine
  +      *  is loading).
  +      *
  +      *  The level returned is meaningful only when
  +      *  the engine isLoading.
  +      *
  +      *  Return: level
  +      *
  +      ***/
  +    inline unsigned short getStorerLevel() const;
  +
  +    /***
  +      *
         *  Write object to the internal buffer.
         *
         *  Param
  @@ -699,6 +717,12 @@
       //  fStoreLoad: 
       //               Indicator: storing(serialization) or 
loading(de-serialization)
       //
  +    //  fStorerLevel:
  +    //              The level of the serialize engine which created the 
binary 
  +    //              stream that this serialize engine is loading
  +    //
  +    //              It is set by GrammarPool when loading
  +    //
       //  fGrammarPool:
       //               Thw owning GrammarPool which instantiate this 
SerializeEngine 
       //               instance
  @@ -735,7 +759,9 @@
       //
       //  fMapCount:
       // 
-------------------------------------------------------------------------------
  -    const short                            fStoreLoad;  
  +    const short                            fStoreLoad;
  +    short                                  fStorerLevel;
  +
       XMLGrammarPool*  const                 fGrammarPool;
       BinInputStream*  const                 fInputStream;
       BinOutputStream* const                 fOutputStream;
  @@ -775,6 +801,9 @@
        *   object counter
        ***/
        XSerializedObjectId_t                  fObjectCount;
  +
  +    //to allow grammar pool to set storer level when loading
  +    friend class XMLGrammarPoolImpl;
   };
   
   inline bool XSerializeEngine::isStoring() const
  @@ -866,6 +895,12 @@
   const unsigned long XSerializeEngine::getBufCount() const
   {
       return fBufCount;
  +}
  +
  +inline 
  +unsigned short XSerializeEngine::getStorerLevel() const
  +{
  +    return fStorerLevel;
   }
   
   /***
  
  
  
  1.22      +8 -1      xml-xerces/c/src/xercesc/internal/XSerializeEngine.cpp
  
  Index: XSerializeEngine.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/xercesc/internal/XSerializeEngine.cpp,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- XSerializeEngine.cpp      27 Oct 2004 20:38:52 -0000      1.21
  +++ XSerializeEngine.cpp      8 Nov 2004 03:56:47 -0000       1.22
  @@ -17,6 +17,9 @@
   /*
    * $Id$
    * $Log$
  + * Revision 1.22  2004/11/08 03:56:47  peiyongz
  + * setting/getting Storer level
  + *
    * Revision 1.21  2004/10/27 20:38:52  peiyongz
    * Optimized alignment for various data types
    *
  @@ -161,6 +164,7 @@
                                    , XMLGrammarPool* const   gramPool
                                    , unsigned long           bufSize)
   :fStoreLoad(mode_Load)
  +,fStorerLevel(0)
   ,fGrammarPool(gramPool)
   ,fInputStream(inStream)
   ,fOutputStream(0)
  @@ -185,6 +189,7 @@
                                    , XMLGrammarPool* const   gramPool
                                    , unsigned long           bufSize)
   :fStoreLoad(mode_Store)
  +,fStorerLevel(0)
   ,fGrammarPool(gramPool)
   ,fInputStream(0)
   ,fOutputStream(outStream)
  @@ -212,6 +217,7 @@
                                    , MemoryManager* const    manager
                                    , unsigned long           bufSize)
   :fStoreLoad(mode_Load)
  +,fStorerLevel(0)
   ,fGrammarPool(0)
   ,fInputStream(inStream)
   ,fOutputStream(0)
  @@ -236,6 +242,7 @@
                                    , MemoryManager* const    manager
                                    , unsigned long           bufSize)
   :fStoreLoad(mode_Store)
  +,fStorerLevel(0)
   ,fGrammarPool(0)
   ,fInputStream(0)
   ,fOutputStream(outStream)
  
  
  

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

Reply via email to