SGMLApplication.h revision 7c478bd95313f5f23a4c958a745db2134aa03244
// Copyright (c) 1995 James Clark
// See the file COPYING for copying permission.
#pragma ident "%Z%%M% %I% %E% SMI"
#ifndef SGMLApplication_INCLUDED
#define SGMLApplication_INCLUDED 1
#ifdef __GNUG__
#pragma interface
#endif
#include <stddef.h>
#ifndef SP_API
#define SP_API /* as nothing */
#endif
#ifdef SP_MULTI_BYTE
#ifdef SP_WCHAR_T_USHORT
#else
typedef unsigned short Char;
#endif
#else
typedef unsigned char Char;
#endif
// A Position represents a position in an OpenEntity.
// The meaning of a Position depends on the
// particular implementation of OpenEntity.
// It might be a line number or it might be
// an offset in the entity. The only thing
// that can be done with Position is to use
// it with an OpenEntityPtr to get a Location.
typedef unsigned long Position;
struct CharString {
};
struct ExternalId {
bool haveSystemId;
bool havePublicId;
bool haveGeneratedSystemId;
};
struct Notation {
};
struct Attribute;
struct Entity {
bool isInternal;
// Following valid if isInternal is true
// Following valid if isInternal is false
const Attribute *attributes;
};
struct Attribute {
enum Type {
};
enum Defaulted {
specified, // not defaulted
definition, // defaulted from definition
current // defaulted from current value
};
struct CdataChunk {
bool isSdata;
// This rather awkward representation of non-SGML characters was chosen
// for backwards compatibility.
bool isNonSgml; // valid only if !isSdata
};
// Following valid if type == cdata
// Following valid if type == tokenized
bool isId; // non-ESIS (probably)
bool isGroup; // non-ESIS
// length of notation.name will be 0 if no notation
};
struct PiEvent {
};
struct StartElementEvent {
enum ContentType {
empty, // declared EMPTY or with CONREF attribute
};
bool included; // non-ESIS
const Attribute *attributes;
};
struct EndElementEvent {
};
struct DataEvent {
};
struct SdataEvent {
};
struct ExternalDataEntityRefEvent {
};
struct SubdocEntityRefEvent {
};
struct NonSgmlCharEvent {
Char c;
};
struct ErrorEvent {
enum Type {
info, // not an error
warning, // not an error
};
};
struct AppinfoEvent {
bool none;
};
struct StartDtdEvent {
bool haveExternalId;
};
struct EndDtdEvent {
};
struct EndPrologEvent {
};
// non-ESIS
struct GeneralEntityEvent {
// no position
};
// non-ESIS
struct CommentDeclEvent {
const CharString *comments;
const CharString *seps;
};
// non-ESIS
struct MarkedSectionStartEvent {
enum Status {
include,
};
struct Param {
enum Type {
temp,
include,
};
};
};
// non-ESIS
struct MarkedSectionEndEvent {
enum Status {
include,
};
};
struct IgnoredCharsEvent {
};
Location();
void init();
unsigned long lineNumber;
unsigned long columnNumber;
unsigned long byteOffset;
unsigned long entityOffset;
const void *other;
};
OpenEntityPtr(const OpenEntityPtr &);
void operator=(const OpenEntityPtr &);
void operator=(OpenEntity *);
~OpenEntityPtr();
const OpenEntity *operator->() const;
operator int() const;
};
OpenEntity();
virtual ~OpenEntity();
unsigned count_;
};
};
inline
const SGMLApplication::OpenEntity *
{
return ptr_;
}
inline
{
}
inline
{
return ptr_ != 0;
}
#endif /* not SGMLApplication_INCLUDED */