You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by jp...@locus.apache.org on 2000/07/08 00:17:00 UTC

cvs commit: xml-xerces/c/src/util/Transcoders/Win32 Win32TransService.cpp

jpolast     00/07/07 15:16:58

  Modified:    c/src/util RefHashTableOf.c RefHashTableOf.hpp
                        StringPool.cpp StringPool.hpp TransService.cpp
               c/src/util/Transcoders/Win32 Win32TransService.cpp
  Log:
  remove old put(value) function.  use put(key,value) instead.
  
  Revision  Changes    Path
  1.6       +3 -6      xml-xerces/c/src/util/RefHashTableOf.c
  
  Index: RefHashTableOf.c
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/util/RefHashTableOf.c,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- RefHashTableOf.c	2000/06/29 18:27:09	1.5
  +++ RefHashTableOf.c	2000/07/07 22:16:50	1.6
  @@ -56,6 +56,9 @@
   
   /**
    * $Log: RefHashTableOf.c,v $
  + * Revision 1.6  2000/07/07 22:16:50  jpolast
  + * remove old put(value) function.  use put(key,value) instead.
  + *
    * Revision 1.5  2000/06/29 18:27:09  jpolast
    * bug fix for passing hasher class references to constructor
    *
  @@ -247,12 +250,6 @@
           newBucket = new RefHashTableBucketElem<TVal>(key, valueToAdopt, fBucketList[hashVal]);
           fBucketList[hashVal] = newBucket;
       }
  -}
  -
  -// this function is deprecated in favor of put(key,value).  use at your own risk.
  -template <class TVal> void RefHashTableOf<TVal>::put(TVal* const valueToAdopt)
  -{
  -	put((void*)(valueToAdopt->getKey()), valueToAdopt);
   }
   
   
  
  
  
  1.8       +3 -1      xml-xerces/c/src/util/RefHashTableOf.hpp
  
  Index: RefHashTableOf.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/util/RefHashTableOf.hpp,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- RefHashTableOf.hpp	2000/06/29 18:27:09	1.7
  +++ RefHashTableOf.hpp	2000/07/07 22:16:51	1.8
  @@ -56,6 +56,9 @@
   
   /*
    * $Log: RefHashTableOf.hpp,v $
  + * Revision 1.8  2000/07/07 22:16:51  jpolast
  + * remove old put(value) function.  use put(key,value) instead.
  + *
    * Revision 1.7  2000/06/29 18:27:09  jpolast
    * bug fix for passing hasher class references to constructor
    *
  @@ -170,7 +173,6 @@
       //  Putters
       // -----------------------------------------------------------------------
   	void put(void* key, TVal* const valueToAdopt);
  -	void put(TVal* const valueToAdopt); // deprecated. use at your own risk. instead use put(key, value)
   
   
   private :
  
  
  
  1.5       +4 -5      xml-xerces/c/src/util/StringPool.cpp
  
  Index: StringPool.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/util/StringPool.cpp,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- StringPool.cpp	2000/05/15 22:31:20	1.4
  +++ StringPool.cpp	2000/07/07 22:16:51	1.5
  @@ -56,6 +56,9 @@
   
   /*
    * $Log: StringPool.cpp,v $
  + * Revision 1.5  2000/07/07 22:16:51  jpolast
  + * remove old put(value) function.  use put(key,value) instead.
  + *
    * Revision 1.4  2000/05/15 22:31:20  andyh
    * Replace #include<memory.h> with <string.h> everywhere.
    *
  @@ -105,10 +108,6 @@
   // ---------------------------------------------------------------------------
   //  StringPool::PoolElem: Public methods
   // ---------------------------------------------------------------------------
  -const XMLCh* XMLStringPool::PoolElem::getKey() const
  -{
  -    return fString;
  -}
   
   void
   XMLStringPool::PoolElem::reset(const XMLCh* const string, const unsigned int id)
  @@ -222,7 +221,7 @@
       //  id index.
       //
       PoolElem* newElem = new PoolElem(newString, fCurId);
  -    fHashTable->put(newElem);
  +    fHashTable->put((void*)(newElem->getKey()), newElem);
       fIdMap[fCurId] = newElem;
   
       // Bump the current id and return the id of the new elem we just added
  
  
  
  1.4       +5 -1      xml-xerces/c/src/util/StringPool.hpp
  
  Index: StringPool.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/util/StringPool.hpp,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- StringPool.hpp	2000/02/24 20:05:25	1.3
  +++ StringPool.hpp	2000/07/07 22:16:52	1.4
  @@ -56,6 +56,9 @@
   
   /*
    * $Log: StringPool.hpp,v $
  + * Revision 1.4  2000/07/07 22:16:52  jpolast
  + * remove old put(value) function.  use put(key,value) instead.
  + *
    * Revision 1.3  2000/02/24 20:05:25  abagchi
    * Swat for removing Log from API docs
    *
  @@ -121,11 +124,12 @@
               PoolElem(const XMLCh* const string, const unsigned int id);
               ~PoolElem();
   
  -            const XMLCh* getKey() const;
  +            inline const XMLCh* getKey() const { return fString; }
               void reset(const XMLCh* const string, const unsigned int id);
   
               unsigned int    fId;
               XMLCh*          fString;
  +
       };
   
   
  
  
  
  1.20      +28 -20    xml-xerces/c/src/util/TransService.cpp
  
  Index: TransService.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/util/TransService.cpp,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- TransService.cpp	2000/06/15 20:20:06	1.19
  +++ TransService.cpp	2000/07/07 22:16:52	1.20
  @@ -55,7 +55,7 @@
    */
   
   /*
  - * $Id: TransService.cpp,v 1.19 2000/06/15 20:20:06 aruna1 Exp $
  + * $Id: TransService.cpp,v 1.20 2000/07/07 22:16:52 jpolast Exp $
    */
   // ---------------------------------------------------------------------------
   //  Includes
  @@ -276,33 +276,33 @@
       //  Add in the magical mapping for the native XMLCh transcoder. This
       //  is used for internal entities.
       //
  -    gMappings->put(new ENameMapFor<XMLChTranscoder>(XMLUni::fgXMLChEncodingString));
  +    gMappings->put((void*)XMLUni::fgXMLChEncodingString, new ENameMapFor<XMLChTranscoder>(XMLUni::fgXMLChEncodingString));
   
       //
       //  Add in our mappings for ASCII.
       //
  -    gMappings->put(new ENameMapFor<XMLASCIITranscoder>(XMLUni::fgUSASCIIEncodingString));
  -    gMappings->put(new ENameMapFor<XMLASCIITranscoder>(XMLUni::fgUSASCIIEncodingString2));
  -    gMappings->put(new ENameMapFor<XMLASCIITranscoder>(XMLUni::fgUSASCIIEncodingString3));
  -    gMappings->put(new ENameMapFor<XMLASCIITranscoder>(XMLUni::fgUSASCIIEncodingString4));
  +    gMappings->put((void*)XMLUni::fgUSASCIIEncodingString, new ENameMapFor<XMLASCIITranscoder>(XMLUni::fgUSASCIIEncodingString));
  +    gMappings->put((void*)XMLUni::fgUSASCIIEncodingString2, new ENameMapFor<XMLASCIITranscoder>(XMLUni::fgUSASCIIEncodingString2));
  +    gMappings->put((void*)XMLUni::fgUSASCIIEncodingString3, new ENameMapFor<XMLASCIITranscoder>(XMLUni::fgUSASCIIEncodingString3));
  +    gMappings->put((void*)XMLUni::fgUSASCIIEncodingString4, new ENameMapFor<XMLASCIITranscoder>(XMLUni::fgUSASCIIEncodingString4));
   
       //
       //  Add in our mappings for UTF-8
       //
  -    gMappings->put(new ENameMapFor<XMLUTF8Transcoder>(XMLUni::fgUTF8EncodingString));
  -    gMappings->put(new ENameMapFor<XMLUTF8Transcoder>(XMLUni::fgUTF8EncodingString2));
  +    gMappings->put((void*)XMLUni::fgUTF8EncodingString, new ENameMapFor<XMLUTF8Transcoder>(XMLUni::fgUTF8EncodingString));
  +    gMappings->put((void*)XMLUni::fgUTF8EncodingString2, new ENameMapFor<XMLUTF8Transcoder>(XMLUni::fgUTF8EncodingString2));
   
       //
       //  Add in our mappings for Latin1
       //
  -    gMappings->put(new ENameMapFor<XML88591Transcoder>(XMLUni::fgISO88591EncodingString));
  -    gMappings->put(new ENameMapFor<XML88591Transcoder>(XMLUni::fgISO88591EncodingString2));
  -    gMappings->put(new ENameMapFor<XML88591Transcoder>(XMLUni::fgISO88591EncodingString3));
  -    gMappings->put(new ENameMapFor<XML88591Transcoder>(XMLUni::fgISO88591EncodingString4));
  -    gMappings->put(new ENameMapFor<XML88591Transcoder>(XMLUni::fgISO88591EncodingString5));
  -    gMappings->put(new ENameMapFor<XML88591Transcoder>(XMLUni::fgISO88591EncodingString6));
  -    gMappings->put(new ENameMapFor<XML88591Transcoder>(XMLUni::fgISO88591EncodingString7));
  -    gMappings->put(new ENameMapFor<XML88591Transcoder>(XMLUni::fgISO88591EncodingString8));
  +    gMappings->put((void*)XMLUni::fgISO88591EncodingString, new ENameMapFor<XML88591Transcoder>(XMLUni::fgISO88591EncodingString));
  +    gMappings->put((void*)XMLUni::fgISO88591EncodingString2, new ENameMapFor<XML88591Transcoder>(XMLUni::fgISO88591EncodingString2));
  +    gMappings->put((void*)XMLUni::fgISO88591EncodingString3, new ENameMapFor<XML88591Transcoder>(XMLUni::fgISO88591EncodingString3));
  +    gMappings->put((void*)XMLUni::fgISO88591EncodingString4, new ENameMapFor<XML88591Transcoder>(XMLUni::fgISO88591EncodingString4));
  +    gMappings->put((void*)XMLUni::fgISO88591EncodingString5, new ENameMapFor<XML88591Transcoder>(XMLUni::fgISO88591EncodingString5));
  +    gMappings->put((void*)XMLUni::fgISO88591EncodingString6, new ENameMapFor<XML88591Transcoder>(XMLUni::fgISO88591EncodingString6));
  +    gMappings->put((void*)XMLUni::fgISO88591EncodingString7, new ENameMapFor<XML88591Transcoder>(XMLUni::fgISO88591EncodingString7));
  +    gMappings->put((void*)XMLUni::fgISO88591EncodingString8, new ENameMapFor<XML88591Transcoder>(XMLUni::fgISO88591EncodingString8));
   
       //
       //  Add in our mappings for UTF-16 and UCS-4, little endian
  @@ -314,6 +314,7 @@
       #endif
       gMappings->put
       (
  +		(void*)XMLUni::fgUTF16LEncodingString,
           new EEndianNameMapFor<XMLUTF16Transcoder>
           (
               XMLUni::fgUTF16LEncodingString
  @@ -323,6 +324,7 @@
   
       gMappings->put
       (
  +		(void*)XMLUni::fgUTF16LEncodingString2,
           new EEndianNameMapFor<XMLUTF16Transcoder>
           (
               XMLUni::fgUTF16LEncodingString2
  @@ -332,6 +334,7 @@
   
       gMappings->put
       (
  +		(void*)XMLUni::fgUCS4LEncodingString,
           new EEndianNameMapFor<XMLUCS4Transcoder>
           (
               XMLUni::fgUCS4LEncodingString
  @@ -341,6 +344,7 @@
   
       gMappings->put
       (
  +		(void*)XMLUni::fgUCS4LEncodingString2,
           new EEndianNameMapFor<XMLUCS4Transcoder>
           (
               XMLUni::fgUCS4LEncodingString2
  @@ -357,6 +361,7 @@
       #endif
       gMappings->put
       (
  +		(void*)XMLUni::fgUTF16BEncodingString,
           new EEndianNameMapFor<XMLUTF16Transcoder>
           (
               XMLUni::fgUTF16BEncodingString
  @@ -366,6 +371,7 @@
   
       gMappings->put
       (
  +		(void*)XMLUni::fgUTF16BEncodingString2,
           new EEndianNameMapFor<XMLUTF16Transcoder>
           (
               XMLUni::fgUTF16BEncodingString2
  @@ -375,6 +381,7 @@
   
       gMappings->put
       (
  +		(void*)XMLUni::fgUCS4BEncodingString,
           new EEndianNameMapFor<XMLUCS4Transcoder>
           (
               XMLUni::fgUCS4BEncodingString
  @@ -384,6 +391,7 @@
   
       gMappings->put
       (
  +		(void*)XMLUni::fgUCS4BEncodingString2,
           new EEndianNameMapFor<XMLUCS4Transcoder>
           (
               XMLUni::fgUCS4BEncodingString2
  @@ -395,18 +403,18 @@
       //  Add in our mappings for IBM037, and the one alias we support for
       //  it, which is EBCDIC-CP-US.
       //
  -    gMappings->put(new ENameMapFor<XMLEBCDICTranscoder>(XMLUni::fgIBM037EncodingString));
  -    gMappings->put(new ENameMapFor<XMLEBCDICTranscoder>(XMLUni::fgIBM037EncodingString2));
  +    gMappings->put((void*)XMLUni::fgIBM037EncodingString, new ENameMapFor<XMLEBCDICTranscoder>(XMLUni::fgIBM037EncodingString));
  +    gMappings->put((void*)XMLUni::fgIBM037EncodingString2, new ENameMapFor<XMLEBCDICTranscoder>(XMLUni::fgIBM037EncodingString2));
   
       //
       //  Add in our mappings for IBM037 with Euro update, i.e. IBM1140. It
       //  has no aliases
       //
  -    gMappings->put(new ENameMapFor<XMLIBM1140Transcoder>(XMLUni::fgIBM1140EncodingString));
  +    gMappings->put((void*)XMLUni::fgIBM1140EncodingString, new ENameMapFor<XMLIBM1140Transcoder>(XMLUni::fgIBM1140EncodingString));
   
       //
       //  Add in our mappings for Windows-1252. We don't have any aliases for
       //  this one, so there is just one mapping.
       //
  -    gMappings->put(new ENameMapFor<XMLWin1252Transcoder>(XMLUni::fgWin1252EncodingString));
  +    gMappings->put((void*)XMLUni::fgWin1252EncodingString, new ENameMapFor<XMLWin1252Transcoder>(XMLUni::fgWin1252EncodingString));
   }
  
  
  
  1.14      +9 -13     xml-xerces/c/src/util/Transcoders/Win32/Win32TransService.cpp
  
  Index: Win32TransService.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/util/Transcoders/Win32/Win32TransService.cpp,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- Win32TransService.cpp	2000/05/09 00:22:44	1.13
  +++ Win32TransService.cpp	2000/07/07 22:16:56	1.14
  @@ -56,6 +56,9 @@
   
   /*
    * $Log: Win32TransService.cpp,v $
  + * Revision 1.14  2000/07/07 22:16:56  jpolast
  + * remove old put(value) function.  use put(key,value) instead.
  + *
    * Revision 1.13  2000/05/09 00:22:44  andyh
    * Memory Cleanup.  XMLPlatformUtils::Terminate() deletes all lazily
    * allocated memory; memory leak checking tools will no longer report
  @@ -261,11 +264,6 @@
       return fEncodingName;
   }
   
  -const XMLCh* CPMapEntry::getKey() const
  -{
  -    return fEncodingName;
  -}
  -
   unsigned int CPMapEntry::getWinCP() const
   {
       return fCPId;
  @@ -402,7 +400,7 @@
                   }
   
                   CPMapEntry* newEntry = new CPMapEntry(nameBuf, CPId, IEId);
  -                fCPMap->put(newEntry);
  +                fCPMap->put(nameBuf, newEntry);
               }
           }
   
  @@ -472,13 +470,8 @@
                   //
                   if (::wcscmp(uniAlias, aliasedEntry->getEncodingName()))
                   {
  -                    CPMapEntry* newEntry = new CPMapEntry
  -                    (
  -                        uniAlias
  -                        , aliasedEntry->getWinCP()
  -                        , aliasedEntry->getIEEncoding()
  -                    );
  -                    fCPMap->put(newEntry);
  +                    CPMapEntry* newEntry = new CPMapEntry(uniAlias, aliasedEntry->getWinCP(), aliasedEntry->getIEEncoding());
  +                    fCPMap->put(uniAlias, newEntry);
                   }
               }
               delete [] uniAlias;