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

cvs commit: xml-xerces/c/src/util HeaderDummy.cpp PlatformUtils.cpp PlatformUtils.hpp TransService.cpp XMLString.cpp XMLURL.cpp

roddey      00/01/18 16:57:00

  Modified:    c/src/util HeaderDummy.cpp PlatformUtils.cpp
                        PlatformUtils.hpp TransService.cpp XMLString.cpp
                        XMLURL.cpp
  Log:
  Changes to get rid of dependence on old utils standard streams and to
  get rid of the fgLibLocation stuff.
  
  Revision  Changes    Path
  1.2       +3 -1      xml-xerces/c/src/util/HeaderDummy.cpp
  
  Index: HeaderDummy.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/util/HeaderDummy.cpp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- HeaderDummy.cpp	1999/11/09 01:04:18	1.1
  +++ HeaderDummy.cpp	2000/01/19 00:56:59	1.2
  @@ -56,9 +56,13 @@
   
   /**
    * $Log: HeaderDummy.cpp,v $
  - * Revision 1.1  1999/11/09 01:04:18  twl
  - * Initial revision
  + * Revision 1.2  2000/01/19 00:56:59  roddey
  + * Changes to get rid of dependence on old utils standard streams and to
  + * get rid of the fgLibLocation stuff.
    *
  + * Revision 1.1.1.1  1999/11/09 01:04:18  twl
  + * Initial checkin
  + *
    * Revision 1.2  1999/11/08 20:45:07  rahul
    * Swat for adding in Product name and CVS comment log variable.
    *
  @@ -77,7 +81,6 @@
   #include <util/NullPointerException.hpp>
   #include <util/PlatformUtils.hpp>
   #include <util/RuntimeException.hpp>
  -#include <util/TextOutputStream.hpp>
   #include <util/UnexpectedEOFException.hpp>
   #include <util/UnsupportedEncodingException.hpp>
   #include <util/UTFDataFormatException.hpp>
  
  
  
  1.4       +6 -10     xml-xerces/c/src/util/PlatformUtils.cpp
  
  Index: PlatformUtils.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/util/PlatformUtils.cpp,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- PlatformUtils.cpp	1999/12/18 00:18:10	1.3
  +++ PlatformUtils.cpp	2000/01/19 00:56:59	1.4
  @@ -56,6 +56,10 @@
   
   /**
    * $Log: PlatformUtils.cpp,v $
  + * Revision 1.4  2000/01/19 00:56:59  roddey
  + * Changes to get rid of dependence on old utils standard streams and to
  + * get rid of the fgLibLocation stuff.
  + *
    * Revision 1.3  1999/12/18 00:18:10  roddey
    * More changes to support the new, completely orthagonal support for
    * intrinsic encodings.
  @@ -97,7 +101,6 @@
   // ---------------------------------------------------------------------------
   //  XMLPlatformUtils: Static Data Members
   // ---------------------------------------------------------------------------
  -const char*         XMLPlatformUtils::fgLibLocation = 0;
   bool                XMLPlatformUtils::fgInitFlag = false;
   XMLNetAccessor*     XMLPlatformUtils::fgNetAccessor = 0;
   XMLTransService*    XMLPlatformUtils::fgTransService = 0;
  @@ -128,10 +131,6 @@
       //  level per-platform setup. It cannot use any XML util services at all,
       //  i.e. only native services.
       //
  -    //  One important thing it does is to set the fgLibLocation string, which
  -    //  can be used by any subsequent init code that needs to find stuff
  -    //  relative to the lib/DLL.
  -    //
       platformInit();
   
       //
  @@ -164,13 +163,10 @@
   
       //
       //  Now lets ask the per-platform code to give us an instance of the type
  -    //  of network access implementation he wants to use.
  +    //  of network access implementation he wants to use. This can return
  +    //  a zero pointer if this platform doesn't want to support this.
       //
       fgNetAccessor = makeNetAccessor();
  -    if (!fgNetAccessor)
  -    {
  -        // <TBD> For now its returning a null, but later this will be required
  -    }
   }
   
   
  
  
  
  1.3       +4 -16     xml-xerces/c/src/util/PlatformUtils.hpp
  
  Index: PlatformUtils.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/util/PlatformUtils.hpp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- PlatformUtils.hpp	2000/01/12 00:16:22	1.2
  +++ PlatformUtils.hpp	2000/01/19 00:56:59	1.3
  @@ -56,6 +56,10 @@
   
   /**
    * $Log: PlatformUtils.hpp,v $
  + * Revision 1.3  2000/01/19 00:56:59  roddey
  + * Changes to get rid of dependence on old utils standard streams and to
  + * get rid of the fgLibLocation stuff.
  + *
    * Revision 1.2  2000/01/12 00:16:22  roddey
    * Changes to deal with multiply nested, relative pathed, entities and to deal
    * with the new URL class changes.
  @@ -125,16 +129,9 @@
       //      This is the transcoding service. This is provided by the per
       //      platform driver, so each platform can choose what implemenation
       //      it wants to use.
  -    //
  -    //  fgLibLocation
  -    //      This is the location of the shared library or DLL. For some
  -    //      platforms, it might be some fixed directory and others will
  -    //      discover it dynamically. All other needed stuff is relative to
  -    //      this path.
       // -----------------------------------------------------------------------
       static XMLNetAccessor*      fgNetAccessor;
       static XMLTransService*     fgTransService;
  -    static const char*          fgLibLocation;
   
   
       // -----------------------------------------------------------------------
  @@ -175,15 +172,6 @@
           ,       XMLByte* const  toFill
       );
       static void resetFile(FileHandle theFile);
  -
  -
  -    // -----------------------------------------------------------------------
  -    //  Standard out/error support
  -    // -----------------------------------------------------------------------
  -    static void writeToStdErr(const char* const toWrite);
  -    static void writeToStdErr(const XMLCh* const toWrite);
  -    static void writeToStdOut(const XMLCh* const toWrite);
  -    static void writeToStdOut(const char* const toWrite);
   
   
       // -----------------------------------------------------------------------
  
  
  
  1.4       +1 -154    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.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TransService.cpp	2000/01/13 01:17:40	1.3
  +++ TransService.cpp	2000/01/19 00:56:59	1.4
  @@ -68,161 +68,8 @@
   #include <util/XMLUTF8Transcoder.hpp>
   #include <util/XMLUTF16Transcoder.hpp>
   #include <util/XMLUni.hpp>
  +#include <util/TransENameMap.hpp>
   
  -
  -
  -// ---------------------------------------------------------------------------
  -//  Local types
  -//
  -//  This class is a very simple class used to hold mappings from encoding
  -//  names to factory methods for our intrinsic transcoders. This allows us
  -//  to quickly find one of these objects, via a hash table, and invoke the
  -//  factory to create the appropriate type of transcoder.
  -//
  -//  Derived from it is a simple templatized class that lets us provide the
  -//  correct implementation of the virtual factory method.
  -// ---------------------------------------------------------------------------
  -class ENameMap
  -{
  -public :
  -    // -----------------------------------------------------------------------
  -    //  Destructor
  -    // -----------------------------------------------------------------------
  -    ~ENameMap()
  -    {
  -        delete [] fEncodingName;
  -    }
  -
  -
  -    // -----------------------------------------------------------------------
  -    //  Virtual factory method
  -    // -----------------------------------------------------------------------
  -    virtual XMLTranscoder* makeNew
  -    (
  -        const   unsigned int    blockSize
  -    )   const = 0;
  -
  -
  -    // -----------------------------------------------------------------------
  -    //  Getter methods
  -    // -----------------------------------------------------------------------
  -    const XMLCh* getKey() const
  -    {
  -        return fEncodingName;
  -    }
  -
  -
  -protected :
  -    // -----------------------------------------------------------------------
  -    //  Hidden constructors
  -    // -----------------------------------------------------------------------
  -    ENameMap(const XMLCh* const encodingName) :
  -
  -        fEncodingName(XMLString::replicate(encodingName))
  -    {
  -    }
  -
  -
  -    ENameMap(){};
  -private :
  -    // -----------------------------------------------------------------------
  -    //  Unimplemented constructors and operators
  -    // -----------------------------------------------------------------------
  -    ENameMap(const ENameMap&);
  -    void operator=(const ENameMap&);
  -
  -
  -    // -----------------------------------------------------------------------
  -    //  Private data members
  -    //
  -    //  fEncodingName
  -    //      This is the encoding name for the transcoder that is controlled
  -    //      by this map instance.
  -    // -----------------------------------------------------------------------
  -    XMLCh*  fEncodingName;
  -};
  -
  -
  -template <class TType> class ENameMapFor : public ENameMap
  -{
  -public :
  -    // -----------------------------------------------------------------------
  -    //  Constructors and Destructor
  -    // -----------------------------------------------------------------------
  -    ENameMapFor(const XMLCh* const encodingName) :
  -
  -        ENameMap(encodingName)
  -    {
  -    }
  -
  -    ~ENameMapFor()
  -    {
  -    }
  -
  -
  -    // -----------------------------------------------------------------------
  -    //  Implementation of virtual factory method
  -    // -----------------------------------------------------------------------
  -    virtual XMLTranscoder* makeNew(const unsigned int blockSize) const
  -    {
  -        return new TType(getKey(), blockSize);
  -    }
  -
  -
  -private :
  -    // -----------------------------------------------------------------------
  -    //  Unimplemented constructors and operators
  -    // -----------------------------------------------------------------------
  -    ENameMapFor(){};
  -    ENameMapFor(const ENameMapFor<TType>&){};
  -    void operator=(const ENameMapFor<TType>&){};
  -};
  -
  -
  -template <class TType> class EEndianNameMapFor : public ENameMap
  -{
  -public :
  -    // -----------------------------------------------------------------------
  -    //  Constructors and Destructor
  -    // -----------------------------------------------------------------------
  -    EEndianNameMapFor(const XMLCh* const encodingName, const bool swapped) :
  -
  -        ENameMap(encodingName)
  -        , fSwapped(swapped)
  -    {
  -    }
  -
  -    ~EEndianNameMapFor()
  -    {
  -    }
  -
  -
  -    // -----------------------------------------------------------------------
  -    //  Implementation of virtual factory method
  -    // -----------------------------------------------------------------------
  -    virtual XMLTranscoder* makeNew(const unsigned int blockSize) const
  -    {
  -        return new TType(getKey(), blockSize, fSwapped);
  -    }
  -
  -
  -private :
  -    // -----------------------------------------------------------------------
  -    //  Unimplemented constructors and operators
  -    // -----------------------------------------------------------------------
  -    EEndianNameMapFor(const EEndianNameMapFor<TType>&);
  -    void operator=(const EEndianNameMapFor<TType>&);
  -
  -
  -    // -----------------------------------------------------------------------
  -    //  Private data members
  -    //
  -    //  fSwapped
  -    //      Indicates whether the endianess of the encoding is opposite of
  -    //      that of the local host.
  -    // -----------------------------------------------------------------------
  -    bool    fSwapped;
  -};
   
   
   // ---------------------------------------------------------------------------
  
  
  
  1.5       +4 -1      xml-xerces/c/src/util/XMLString.cpp
  
  Index: XMLString.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/util/XMLString.cpp,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- XMLString.cpp	2000/01/12 00:16:23	1.4
  +++ XMLString.cpp	2000/01/19 00:56:59	1.5
  @@ -56,6 +56,10 @@
   
   /**
    * $Log: XMLString.cpp,v $
  + * Revision 1.5  2000/01/19 00:56:59  roddey
  + * Changes to get rid of dependence on old utils standard streams and to
  + * get rid of the fgLibLocation stuff.
  + *
    * Revision 1.4  2000/01/12 00:16:23  roddey
    * Changes to deal with multiply nested, relative pathed, entities and to deal
    * with the new URL class changes.
  @@ -86,7 +90,6 @@
   #include <util/IllegalArgumentException.hpp>
   #include <util/Janitor.hpp>
   #include <util/PlatformUtils.hpp>
  -#include <util/StdOut.hpp>
   #include <util/RuntimeException.hpp>
   #include <util/TransService.hpp>
   #include <util/TranscodingException.hpp>
  
  
  
  1.3       +3 -6      xml-xerces/c/src/util/XMLURL.cpp
  
  Index: XMLURL.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/util/XMLURL.cpp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- XMLURL.cpp	2000/01/17 23:38:06	1.2
  +++ XMLURL.cpp	2000/01/19 00:56:59	1.3
  @@ -56,6 +56,10 @@
   
   /**
    * $Log: XMLURL.cpp,v $
  + * Revision 1.3  2000/01/19 00:56:59  roddey
  + * Changes to get rid of dependence on old utils standard streams and to
  + * get rid of the fgLibLocation stuff.
  + *
    * Revision 1.2  2000/01/17 23:38:06  abagchi
    * Changed string "localhost" to XMLUni::fgLocalHostString
    *
  @@ -137,12 +141,6 @@
   static const XMLCh gHTTPString[] =
   {
           chLatin_h, chLatin_t, chLatin_t, chLatin_p, chNull
  -};
  -
  -static const XMLCh gLocalHostString[] =
  -{
  -        chLatin_l, chLatin_o, chLatin_c, chLatin_a, chLatin_l
  -    ,   chLatin_h, chLatin_o, chLatin_s, chLatin_t, chNull
   };
   
   static TypeEntry gTypeList[XMLURL::Protocols_Count] =