/usr/include/oce/LDOM_XmlReader.hxx is in liboce-ocaf-lite-dev 0.9.1-3.
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 | // File: LDOM_XmlReader.hxx
// Created: 20.07.01 15:27:57
// Author: Alexander GRIGORIEV
// Copyright: OpenCascade 2001
// History: AGV 060302: Input from istream
// AGV 130302: bug corr: was error if strlen(root_elem_name) < 7
#ifndef LDOM_XmlReader_HeaderFile
#define LDOM_XmlReader_HeaderFile
//#define XML_BUFFER_SIZE 1000
#define XML_BUFFER_SIZE 20480
#include <LDOM_BasicElement.hxx>
class TCollection_AsciiString;
class LDOM_OSStream;
// Class LDOM_XmlReader
//
class LDOM_XmlReader
{
public:
enum RecordType {
XML_UNKNOWN,
XML_HEADER,
XML_DOCTYPE,
XML_COMMENT,
XML_START_ELEMENT,
XML_END_ELEMENT,
XML_FULL_ELEMENT,
XML_TEXT,
XML_CDATA,
XML_EOF
};
// ---------- PUBLIC METHODS ----------
LDOM_XmlReader (const int aFileDes, const Handle(LDOM_MemManager)& aDocument,
TCollection_AsciiString& anErrorString);
// Constructor - takes a file descriptor for input
LDOM_XmlReader (istream& anInput, const Handle(LDOM_MemManager)& aDocument,
TCollection_AsciiString& anErrorString);
// Constructor - takes an istream for input
RecordType ReadRecord (LDOM_OSStream& theData);
// reading a markup or other element of XML format
LDOM_BasicElement& GetElement () const { return * myElement; }
// get the last element retrieved from the stream
static Standard_Boolean getInteger (LDOMBasicString& theValue,
const char * theStart,
const char * theEnd);
// try convert string theStart to LDOM_AsciiInteger, return False on success
private:
// ---------- PRIVATE (PROHIBITED) METHODS ----------
LDOM_XmlReader (const LDOM_XmlReader& theOther);
// Copy constructor
LDOM_XmlReader& operator = (const LDOM_XmlReader& theOther);
// Assignment
private:
// ---------- PRIVATE FIELDS ----------
Standard_Boolean myEOF;
int myFileDes; // alternative 1: file descriptor
istream& myIStream; // alternative 2: istream
TCollection_AsciiString & myError;
Handle(LDOM_MemManager) myDocument;
LDOM_BasicElement * myElement;
const LDOM_BasicNode * myLastChild; // optim. reading attributes
const char * myPtr;
const char * myEndPtr;
char myBuffer [XML_BUFFER_SIZE+4];
};
#endif
|