Hi!
I don't arrive to resolve the following problem:

In file included from superv.cc:9:
superv.h:105: parse error before `*'
In file included from fonction.cc:1:
superv.h:105: parse error before `*'
make: *** [superv] Erreur 1


Extract of superv.h
void genereTree (Matos *m, char *dsn, int debug, const DOMDocument *doc, const DOMElement *descElem)

Thanks for answering quickly
Marion
/*!\author Nguyen
 *\author Bucheton
 *\version 1.0
 *\date avril 2004
 */

#ifndef SUPERV_H
#define SUPERV_H

using namespace std;
#include <iostream>
#include <libpq++.h>
#include <stdio.h>
#include <string>
#include <xercesc/dom/DOM.hpp>
#include <xercesc/dom/DOMImplementation.hpp>
#include <xercesc/dom/DOMImplementationLS.hpp>
#include <xercesc/dom/DOMWriter.hpp>
#include <xercesc/framework/LocalFileFormatTarget.hpp>
#include <xercesc/util/XMLUni.hpp>
#include <xercesc/util/PlatformUtils.hpp>
#include <xercesc/util/XMLString.hpp>
#include <xercesc/dom/DOMErrorHandler.hpp>
#include <xercesc/util/XercesDefs.hpp>
#include <xercesc/sax/ErrorHandler.hpp>
#include <xercesc/dom/DOMWriterFilter.hpp>
#include <xercesc/sax/SAXParseException.hpp>
#include <xercesc/util/XMLUniDefs.hpp>
#include <xercesc/dom/DOMError.hpp>
#ifdef HAVE_GETOPT_H
#include <getopt.h>
#endif


//Structures de donn�es
struct Element;

/*!
 *\fn struct Matos
 *\brief Donn&es repr�sentant un mat�riel
 *\param id identifiant du mat�riel
 *\param cnx type de connexion au r�seau du mat�riel
 *\param desc liste des descendants
 */
struct Matos
{  
  string id;
  string cnx;
  Element *desc;
};


/*!
 *\fn struct Element
 *\brief Donn�es repr�sentant une liste de descendants
 *\param m mat�riel
 *\param suivant pointeur vers le descendant suivant
 */
struct Element 
{
  Matos *m;
  Element *suivant;
  
};


//Functions 

/*! \fn Matos* Creerdesc(string id,string cnx) 
 *  \brief Cr�ation d'un mat�riel
 *  \param id une string contenant l'identifiant du mat�riel
 *  \param cnx une string contenant le type de connexion au r�seau du mat�riel
 *  \return n pointeur Matos
 */
Matos* Creerdesc(string id,string cnx);


/*! \fn void  Ajouterdesc(Matos *m, char*dsn, int debug)
 *  \brief Ajout d'un descendant
 *  \param m mat�riel a ajouter comme descendant
 *  \param dsn une string contenant les param�tres de connexion � la base de donn�es
 *  \param debug un entier (0 ou 1) permettant l'activation du mode "debug"
 */
void  Ajouterdesc(Matos *m, char *dsn, int debug);


/*! \fn void  Affiche(Matos *m, char*dsn, int debug)
 *  \brief Affichage de l'arbre g�n�rer
 *  \param m mat�riel dont les descendants seront affich�s
 *  \param dsn une string contenant les param�tres de connexion � la base de donn�es
 *  \param debug un entier (0 ou 1) permettant l'activation du mode "debug"
 */
void Affiche(Matos *m, char *dsn,int debug);


/*! \fn void genereTree(Matos *m, char*dsn, int debug, DOMDocument *doc, DOMElement *descElem)
 *  \brief G�n�ration d'un fichier Tree � partir de l'arbre pr�c�demment cr��
 *  \param m mat�riel dont les descendants seront rajout� dans le fichier Tree
 *  \param dsn une string contenant les param�tres de connexion � la base de donn�es
 *  \param debug un entier (0 ou 1) permettant l'activation du mode "debug"
 *  \param doc un DOMDocument qui contient l'arbre g�n�r� pr�dememment
 *  \param descElem un DOMElement qui repr�sente la balise des descendants
 */
void genereTree (Matos *m, char *dsn, int debug, const DOMDocument *doc, const DOMElement *descElem);


/*! \fn void  AjouterElem(Matos *m)
 *  \brief Ajout d'un �l�ment mat�riel dans une liste
 *  \param m mat�riel � ajouter � la liste des descendants
 */
void AjouterElem(Matos *m);


/*! \ void usage()
 *  \brief Fonction permettant l'affichage de l'aide
 */
void usage();



//classes de xerces
XERCES_CPP_NAMESPACE_USE

class DOMPrintFilter : public DOMWriterFilter {
 public:
  
  /** @name Constructors */
  DOMPrintFilter(unsigned long whatToShow = DOMNodeFilter::SHOW_ALL);
  //@{
  
  /** @name Destructors */
  ~DOMPrintFilter(){};
  //@{
  
  /** @ interface from DOMWriterFilter */
  virtual short acceptNode(const DOMNode*) const;
  //@{
  
  virtual unsigned long getWhatToShow() const {return fWhatToShow;};
  
  virtual void          setWhatToShow(unsigned long toShow) {fWhatToShow = toShow;};
  
 private:
  // unimplemented copy ctor and assignement operator
  DOMPrintFilter(const DOMPrintFilter&);
  DOMPrintFilter & operator = (const DOMPrintFilter&);
  
  unsigned long fWhatToShow;
  
};

class DOMTreeErrorReporter : public ErrorHandler
{
public:
    // -----------------------------------------------------------------------
    //  Constructors and Destructor
    // -----------------------------------------------------------------------
  DOMTreeErrorReporter() :
    fSawErrors(false)
    {
    }
  
  ~DOMTreeErrorReporter()
    {
    }
  
  
  // -----------------------------------------------------------------------
  //  Implementation of the error handler interface
  // -----------------------------------------------------------------------
  void warning(const SAXParseException& toCatch);
  void error(const SAXParseException& toCatch);
  void fatalError(const SAXParseException& toCatch);
  void resetErrors();
  
  // -----------------------------------------------------------------------
  //  Getter methods
  // -----------------------------------------------------------------------
  bool getSawErrors() const;
  
  // -----------------------------------------------------------------------
  //  Private data members
  //
  //  fSawErrors
  //      This is set if we get any errors, and is queryable via a getter
  //      method. Its used by the main code to suppress output if there are
  //      errors.
  // -----------------------------------------------------------------------
  bool    fSawErrors;
};

inline bool DOMTreeErrorReporter::getSawErrors() const
{
  return fSawErrors;
}

// ---------------------------------------------------------------------------
//  This is a simple class that lets us do easy (though not terribly efficient)
//  trancoding of XMLCh data to local code page for display.
// ---------------------------------------------------------------------------
class StrX
{//Erreur
  public :
    // -----------------------------------------------------------------------
    //  Constructors and Destructor
    // -----------------------------------------------------------------------
    StrX(const XMLCh* const toTranscode)
    {
      // Call the private transcoding method
      fLocalForm = XMLString::transcode(toTranscode);
    }
  
  ~StrX()
    {
      XMLString::release(&fLocalForm);
    }
  
  
  // -----------------------------------------------------------------------
  //  Getter methods
  // -----------------------------------------------------------------------
  const char* localForm() const
    {
      return fLocalForm;
    }

private :
  // -----------------------------------------------------------------------
  //  Private data members
  //
  //  fLocalForm
  //      This is the local code page form of the string.
  // -----------------------------------------------------------------------
  char*   fLocalForm;
};


class XStr
{
public :
    // -----------------------------------------------------------------------
    //  Constructors and Destructor
    // -----------------------------------------------------------------------
    XStr(const char* const toTranscode)
    {
        // Call the private transcoding method
        fUnicodeForm = XMLString::transcode(toTranscode);
    }

    ~XStr()
    {
        XMLString::release(&fUnicodeForm);
    }


    // -----------------------------------------------------------------------
    //  Getter methods
    // -----------------------------------------------------------------------
    const XMLCh* unicodeForm() const
    {
        return fUnicodeForm;
    }

private :
    // -----------------------------------------------------------------------
    //  Private data members
    //
    //  fUnicodeForm
    //      This is the Unicode XMLCh format of the string.
    // -----------------------------------------------------------------------
    XMLCh*   fUnicodeForm;
};


#define X(str) XStr(str).unicodeForm() 


inline XERCES_STD_QUALIFIER ostream& operator<<(XERCES_STD_QUALIFIER ostream& target, const StrX& toDump)
{
  target << toDump.localForm();
  return target;
}


class DOMPrintErrorHandler : public DOMErrorHandler
{
 public:
  
  DOMPrintErrorHandler(){};
    ~DOMPrintErrorHandler(){};
    
    /** @name The error handler interface */
    bool handleError(const DOMError& domError);
    void resetErrors(){};
    
    private :
  /* Unimplemented constructors and operators */
  DOMPrintErrorHandler(const DOMErrorHandler&);
 void operator=(const DOMErrorHandler&);
 
};

#endif

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

Reply via email to