xerces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amass...@apache.org
Subject svn commit: r553915 - in /xerces/c/trunk/src/xercesc: framework/BinOutputStream.hpp internal/BinFileOutputStream.cpp internal/BinFileOutputStream.hpp internal/BinMemOutputStream.cpp internal/BinMemOutputStream.hpp
Date Fri, 06 Jul 2007 14:57:09 GMT
Author: amassari
Date: Fri Jul  6 07:57:08 2007
New Revision: 553915

URL: http://svn.apache.org/viewvc?view=rev&rev=553915
Log:
Changed BinOutputStream interface to have curPos return a 64-bit integer, and use XMLSize_t
in writeBytes (XERCESC-1531)

Modified:
    xerces/c/trunk/src/xercesc/framework/BinOutputStream.hpp
    xerces/c/trunk/src/xercesc/internal/BinFileOutputStream.cpp
    xerces/c/trunk/src/xercesc/internal/BinFileOutputStream.hpp
    xerces/c/trunk/src/xercesc/internal/BinMemOutputStream.cpp
    xerces/c/trunk/src/xercesc/internal/BinMemOutputStream.hpp

Modified: xerces/c/trunk/src/xercesc/framework/BinOutputStream.hpp
URL: http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/framework/BinOutputStream.hpp?view=diff&rev=553915&r1=553914&r2=553915
==============================================================================
--- xerces/c/trunk/src/xercesc/framework/BinOutputStream.hpp (original)
+++ xerces/c/trunk/src/xercesc/framework/BinOutputStream.hpp Fri Jul  6 07:57:08 2007
@@ -37,12 +37,12 @@
     // -----------------------------------------------------------------------
     //  The virtual output stream interface
     // -----------------------------------------------------------------------
-    virtual unsigned int curPos() const = 0;
+    virtual XMLFilePos curPos() const = 0;
 
     virtual void writeBytes
     (
           const XMLByte* const      toGo
-        , const unsigned int        maxToWrite
+        , const XMLSize_t           maxToWrite
     ) = 0;
 
 protected :

Modified: xerces/c/trunk/src/xercesc/internal/BinFileOutputStream.cpp
URL: http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/internal/BinFileOutputStream.cpp?view=diff&rev=553915&r1=553914&r2=553915
==============================================================================
--- xerces/c/trunk/src/xercesc/internal/BinFileOutputStream.cpp (original)
+++ xerces/c/trunk/src/xercesc/internal/BinFileOutputStream.cpp Fri Jul  6 07:57:08 2007
@@ -58,7 +58,7 @@
 // ---------------------------------------------------------------------------
 //  BinFileOutputStream: Getter methods
 // ---------------------------------------------------------------------------
-unsigned int BinFileOutputStream::getSize() const
+XMLFilePos BinFileOutputStream::getSize() const
 {
     return XMLPlatformUtils::fileSize(fSource, fMemoryManager);
 }
@@ -76,14 +76,14 @@
 // ---------------------------------------------------------------------------
 //  BinFileOutputStream: Implementation of the input stream interface
 // ---------------------------------------------------------------------------
-unsigned int BinFileOutputStream::curPos() const
+XMLFilePos BinFileOutputStream::curPos() const
 {
     return XMLPlatformUtils::curFilePos(fSource, fMemoryManager);
 }
 
 
 void BinFileOutputStream::writeBytes( const XMLByte* const  toGo
-                                    , const unsigned int    maxToWrite)
+                                    , const XMLSize_t       maxToWrite)
 {
     //
     //  Write up to the maximum bytes requested. 

Modified: xerces/c/trunk/src/xercesc/internal/BinFileOutputStream.hpp
URL: http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/internal/BinFileOutputStream.hpp?view=diff&rev=553915&r1=553914&r2=553915
==============================================================================
--- xerces/c/trunk/src/xercesc/internal/BinFileOutputStream.hpp (original)
+++ xerces/c/trunk/src/xercesc/internal/BinFileOutputStream.hpp Fri Jul  6 07:57:08 2007
@@ -52,19 +52,19 @@
     //  Getter methods
     // -----------------------------------------------------------------------
     bool getIsOpen() const;
-    unsigned int getSize() const;
+    XMLFilePos getSize() const;
     void reset();
 
 
     // -----------------------------------------------------------------------
     //  Implementation of the input stream interface
     // -----------------------------------------------------------------------
-    virtual unsigned int curPos() const;
+    virtual XMLFilePos curPos() const;
 
     virtual void writeBytes
     (
           const XMLByte* const      toGo
-        , const unsigned int        maxToWrite
+        , const XMLSize_t        maxToWrite
     );
 
 

Modified: xerces/c/trunk/src/xercesc/internal/BinMemOutputStream.cpp
URL: http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/internal/BinMemOutputStream.cpp?view=diff&rev=553915&r1=553914&r2=553915
==============================================================================
--- xerces/c/trunk/src/xercesc/internal/BinMemOutputStream.cpp (original)
+++ xerces/c/trunk/src/xercesc/internal/BinMemOutputStream.cpp Fri Jul  6 07:57:08 2007
@@ -25,7 +25,7 @@
 
 XERCES_CPP_NAMESPACE_BEGIN
 
-BinMemOutputStream::BinMemOutputStream( int                  initCapacity
+BinMemOutputStream::BinMemOutputStream( XMLSize_t            initCapacity
                                       , MemoryManager* const manager)
 : fMemoryManager(manager)
 , fDataBuf(0)
@@ -48,7 +48,7 @@
 }
 
 void BinMemOutputStream::writeBytes( const XMLByte*     const      toGo
-                                   , const unsigned int            maxToWrite)
+                                   , const XMLSize_t               maxToWrite)
 {
 
     if (maxToWrite) 
@@ -78,12 +78,12 @@
     }
 }
 
-unsigned int BinMemOutputStream::curPos() const
+XMLFilePos BinMemOutputStream::curPos() const
 {
     return fIndex;
 }
 
-unsigned int BinMemOutputStream::getSize() const
+XMLFilePos BinMemOutputStream::getSize() const
 {
     return fCapacity;
 }
@@ -91,14 +91,14 @@
 // ---------------------------------------------------------------------------
 //  BinMemOutputStream: Private helper methods
 // ---------------------------------------------------------------------------
-void BinMemOutputStream::insureCapacity(const unsigned int extraNeeded)
+void BinMemOutputStream::insureCapacity(const XMLSize_t extraNeeded)
 {
     // If we can handle it, do nothing yet
     if (fIndex + extraNeeded < fCapacity)
         return;
 
     // Oops, not enough room. Calc new capacity and allocate new buffer
-    const unsigned int newCap = (unsigned int)((fIndex + extraNeeded) * 2);
+    const XMLSize_t newCap = ((fIndex + extraNeeded) * 2);
     XMLByte* newBuf = (XMLByte*) fMemoryManager->allocate
     (
         (newCap+4) * sizeof(XMLByte)

Modified: xerces/c/trunk/src/xercesc/internal/BinMemOutputStream.hpp
URL: http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/internal/BinMemOutputStream.hpp?view=diff&rev=553915&r1=553914&r2=553915
==============================================================================
--- xerces/c/trunk/src/xercesc/internal/BinMemOutputStream.hpp (original)
+++ xerces/c/trunk/src/xercesc/internal/BinMemOutputStream.hpp Fri Jul  6 07:57:08 2007
@@ -38,19 +38,19 @@
 
     BinMemOutputStream
     (
-         int                     initCapacity = 1023
+         XMLSize_t               initCapacity = 1023
        , MemoryManager* const    manager      = XMLPlatformUtils::fgMemoryManager
     );
 
     // -----------------------------------------------------------------------
     //  Implementation of the output stream interface
     // -----------------------------------------------------------------------
-    virtual unsigned int curPos() const;
+    virtual XMLFilePos curPos() const;
 
     virtual void writeBytes
     (
       const XMLByte*     const      toGo
-    , const unsigned int            maxToWrite
+    , const XMLSize_t            maxToWrite
     ) ;
 
     // -----------------------------------------------------------------------
@@ -58,7 +58,7 @@
     // -----------------------------------------------------------------------
     const XMLByte* getRawBuffer() const;
 
-    unsigned int getSize() const;
+    XMLFilePos getSize() const;
     void reset();
 
 private :
@@ -71,7 +71,7 @@
     // -----------------------------------------------------------------------
     //  Private helpers
     // -----------------------------------------------------------------------
-    void insureCapacity(const unsigned int extraNeeded);
+    void insureCapacity(const XMLSize_t extraNeeded);
 
     // -----------------------------------------------------------------------
     //  Private data members
@@ -91,8 +91,8 @@
     // -----------------------------------------------------------------------
     MemoryManager*  fMemoryManager;
     XMLByte*        fDataBuf;
-    unsigned int    fIndex;
-    unsigned int    fCapacity;
+    XMLSize_t       fIndex;
+    XMLSize_t       fCapacity;
 
 };
 



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xerces.apache.org
For additional commands, e-mail: commits-help@xerces.apache.org


Mime
View raw message