There is no equivalent in C++ to Java's concept of an interface.  There may
be no implementation of pure virtual functions in C++, but usually, there
will need to be a virtual table somewhere, and the somewhere is usually in
the DLL or shared library that defines the abstract base class.

I suppose you could have inline constructors and an inline virtual
destructor, but that just propagates copies of the throughout various
executables, and that can be dangerous.

Those functions to which you are referring do not exist, and should never
be called, which is why they are private and unimplemented.  That's to
prevent copying and assignment with it doesn't really make sense for the
class.

Dave



                                                                                       
                                                 
                      "Fabrice Toledano                                                
                                                 
                      Expway"                   To:      <[EMAIL PROTECTED]> 
                                                 
                      <fabrice.toledano         cc:      (bcc: David N 
Bertoni/Cambridge/IBM)                                           
                      @expway.fr>               Subject: why are contenthandler and 
errorhandler not pure interfaces ?                  
                                                                                       
                                                 
                      09/20/2002 06:38                                                 
                                                 
                      AM                                                               
                                                 
                      Please respond to                                                
                                                 
                      xerces-c-dev                                                     
                                                 
                                                                                       
                                                 
                                                                                       
                                                 



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






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

Reply via email to