This is usually a C++ trick to avoid someone from attempting to copy an object that is not meant to be copied (in the usual sense of the word). Often this is done for things that are reference counted and not meant to be directly copied. Typically, the compiler should generate a compile time error if someone attempts to use the copy constructor or assignment operator unless it's the class itself or a friend. In the latter case the linker should generate an error. Seems like this is what you are seeing? I don't know enough about these classes as I have always used DOM so perhaps someone more knowledgable about the SAX implemenation can comment as to why these two classes are defined this way.
 
Samar Lotia
-----Original Message-----
From: Fabrice Toledano Expway [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 20, 2002 8:38 AM
To: [EMAIL PROTECTED]
Subject: why are contenthandler and errorhandler not pure interfaces ?

Hi,
I can't link *without Xerces lib* my app, using those 2 Xerces includes, "sax2/contenthandler.hpp" and "sax2/errorhandler.hpp"). I want my app to receive a pointer on that interface from a client, and then use it, so my app should not need Xerces library to build.
 
In fact after a try, it's just because of those private methods present in what I believed should be an interface :
 
(here for contenthandler, it's the same for errorhandler)
 
private :
    /* Unimplemented Constructors and operators */
    /* Copy constructor */
    ContentHandler(const ContentHandler&);
    /** Assignment operator */
    void operator=(const ContentHandler&);
 
Except commenting those 2 functions in the hpp file, I don't see how to avoid linking with the library, any idea ?
 
Moreover, what does the 'unimplemented' word stand for here ?
 
Maybe I missed something,
 
Thanks !
 
Nikko
 
 
 

Reply via email to