Sd.h revision 7c478bd95313f5f23a4c958a745db2134aa03244
// Copyright (c) 1994 James Clark
// See the file COPYING for copying permission.
#pragma ident "%Z%%M% %I% %E% SMI"
#ifndef Sd_INCLUDED
#define Sd_INCLUDED 1
#ifdef __GNUG__
#pragma interface
#endif
#include "types.h"
#include "Boolean.h"
#include "Resource.h"
#include "CharsetInfo.h"
#include "ExternalId.h"
#include "ISet.h"
#include "Syntax.h"
#include "CharsetDecl.h"
#include "HashTable.h"
#include "EntityManager.h"
#include "Ptr.h"
// Information about the SGML declaration that is not syntax specific.
#ifdef SP_NAMESPACE
#endif
// These must be in the same order as in the SGML declaration.
enum BooleanFeature {
fURN,
};
enum {
};
// These must be in the same order as in the SGML declaration.
enum NumberFeature {
};
enum NetEnable {
};
enum EntityRef {
};
// These are names used in the SGML declaration.
enum ReservedName {
rALL,
rANY,
rNO,
rRE,
rREF,
rRS,
rURN,
};
enum Capacity {
};
void setDocCharsetDesc(const UnivCharsetDesc &);
int digitWeight(Char) const;
int hexDigitWeight(Char) const;
Number simpleLink() const;
Boolean implicitLink() const;
Number explicitLink() const;
Boolean startTagEmpty() const;
Boolean startTagUnclosed() const;
NetEnable startTagNetEnable() const;
void setStartTagNetEnable(NetEnable);
Boolean endTagEmpty() const;
Boolean endTagUnclosed() const;
Boolean attributeDefault() const;
Boolean attributeValueNotLiteral() const;
Boolean attributeOmitName() const;
Boolean emptyElementNormal() const;
Boolean implydefAttlist() const;
Boolean implydefDoctype() const;
Boolean implydefElement() const;
Boolean implydefEntity() const;
Boolean implydefNotation() const;
StringC reservedName(int) const;
const;
Boolean internalCharsetIsDocCharset() const;
const CharsetInfo &internalCharset() const;
const CharsetInfo &docCharset() const;
Char execToInternal(char) const;
StringC execToInternal(const char *) const;
void setCapacity(int, Number);
StringC capacityName(int) const;
Boolean scopeInstance() const;
void setScopeInstance();
void setDocCharsetDecl(CharsetDecl &);
const CharsetDecl &docCharsetDecl() const;
void setShorttag(Boolean);
void setEntityRef(EntityRef);
void setTypeValid(Boolean);
Boolean integrallyStored() const;
void setIntegrallyStored(Boolean);
// if null, use docCharset_
const CharsetInfo *internalCharsetPtr_;
static const char *const reservedName_[];
static const char *const generalDelimiterName_[];
static const char *const capacityName_[];
static const char *const quantityName_[];
};
inline
{
return (numberFeature_[fSIMPLE]
|| numberFeature_[fEXPLICIT]);
}
inline
{
return numberFeature_[fEXPLICIT];
}
inline
{
return booleanFeature_[fIMPLICIT];
}
inline
{
return numberFeature_[fSIMPLE];
}
inline
{
return booleanFeature_[fSTARTTAGEMPTY];
}
inline
{
return booleanFeature_[fSTARTTAGUNCLOSED];
}
inline
{
return netEnable_;
}
inline
{
netEnable_ = e;
}
inline
{
return booleanFeature_[fENDTAGEMPTY];
}
inline
{
return booleanFeature_[fENDTAGUNCLOSED];
}
inline
{
return booleanFeature_[fATTRIBDEFAULT];
}
inline
{
return booleanFeature_[fATTRIBVALUE];
}
inline
{
return booleanFeature_[fATTRIBOMITNAME];
}
inline
{
return booleanFeature_[fEMPTYNRM];
}
inline
{
return booleanFeature_[fIMPLYDEFATTLIST];
}
inline
{
return booleanFeature_[fIMPLYDEFDOCTYPE];
}
inline
{
return booleanFeature_[fIMPLYDEFELEMENT];
}
inline
{
return booleanFeature_[fIMPLYDEFENTITY];
}
inline
{
return booleanFeature_[fIMPLYDEFNOTATION];
}
inline
{
return numberFeature_[fCONCUR];
}
inline
{
return numberFeature_[fSUBDOC];
}
inline
{
return booleanFeature_[fOMITTAG];
}
inline
{
return booleanFeature_[fRANK];
}
inline
{
return booleanFeature_[fDATATAG];
}
inline
{
return booleanFeature_[fFORMAL];
}
inline
{
return booleanFeature_[fKEEPRSRE];
}
inline
{
}
inline
{
return internalCharset().execToDesc(c);
}
inline
{
return internalCharset().execToDesc(s);
}
inline
{
return execToInternal(reservedName_[i]);
}
inline
{
return internalCharsetIsDocCharset_;
}
inline
{
return docCharset_;
}
inline
{
return internalCharset().digitWeight(c);
}
inline
{
return internalCharset().hexDigitWeight(c);
}
inline
{
return capacity_[i];
}
inline
{
capacity_[i] = n;
}
inline
{
return execToInternal(capacityName_[i]);
}
inline
{
return scopeInstance_;
}
inline
void Sd::setScopeInstance()
{
scopeInstance_ = 1;
}
inline
{
}
inline
{
return docCharsetDecl_;
}
inline
{
booleanFeature_[i] = b;
}
inline
{
numberFeature_[i] = n;
}
inline
{
return www_;
}
inline
{
www_ = b;
}
inline
{
return entityRef_;
}
inline
{
entityRef_ = r;
}
inline
{
return typeValid_;
}
inline
{
typeValid_ = b;
}
inline
{
return integrallyStored_;
}
inline
{
integrallyStored_ = b;
}
#ifdef SP_NAMESPACE
}
#endif
#endif /* Sd_INCLUDED */