/usr/include/oce/LDOMParser.hxx is in liboce-ocaf-lite-dev 0.17.2-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 | // Created on: 2001-07-20
// Created by: Alexander GRIGORIEV
// Copyright (c) 2001-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
//AGV 060302: Input from istream
#ifndef LDOMParser_HeaderFile
#define LDOMParser_HeaderFile
#include <LDOM_Document.hxx>
#include <LDOM_OSStream.hxx>
class LDOM_XmlReader;
//class istream;
// Class LDOMParser
//
class LDOMParser
{
public:
// ---------- PUBLIC METHODS ----------
LDOMParser () : myReader (NULL), myCurrentData (16384) {}
// Empty constructor
virtual Standard_EXPORT ~LDOMParser ();
// Destructor
Standard_EXPORT LDOM_Document
getDocument ();
// Get the LDOM_Document
Standard_EXPORT Standard_Boolean
parse (const char * const aFileName);
// Parse a file
// Returns True if error occurred, then GetError() can be called
Standard_EXPORT Standard_Boolean
parse (istream& anInput);
// Parse a C++ stream
// Returns True if error occurred, then GetError() can be called
Standard_EXPORT const TCollection_AsciiString&
GetError (TCollection_AsciiString& aData) const;
// Return text describing a parsing error, or Empty if no error occurred
protected:
// ---------- PROTECTED METHODS ----------
Standard_EXPORT virtual Standard_Boolean
startElement ();
// virtual hook on 'StartElement' event for descendant classes
Standard_EXPORT virtual Standard_Boolean
endElement ();
// virtual hook on 'EndElement' event for descendant classes
Standard_EXPORT LDOM_Element
getCurrentElement () const;
// to be called from startElement() and endElement()
private:
// ---------- PRIVATE METHODS ----------
Standard_Boolean ParseDocument ();
Standard_Boolean ParseElement ();
// ---------- PRIVATE (PROHIBITED) METHODS ----------
LDOMParser (const LDOMParser& theOther);
// Copy constructor
LDOMParser& operator = (const LDOMParser& theOther);
// Assignment
private:
// ---------- PRIVATE FIELDS ----------
LDOM_XmlReader * myReader;
Handle(LDOM_MemManager) myDocument;
LDOM_OSStream myCurrentData;
TCollection_AsciiString myError;
};
#endif
|