DTDElementDecl Class Reference

#include <DTDElementDecl.hpp>

Inheritance diagram for DTDElementDecl:

XMLElementDecl XMemory List of all members.

Public Types

 Empty
 Any
 Mixed_Simple
 Children
 ModelTypes_Count
enum  ModelTypes {
  Empty, Any, Mixed_Simple, Children,
  ModelTypes_Count
}

Public Member Functions

 DTDElementDecl (MemoryManager *const manager=XMLPlatformUtils::fgMemoryManager)
 DTDElementDecl (const XMLCh *const elemRawName, const unsigned int uriId, const ModelTypes modelType, MemoryManager *const manager=XMLPlatformUtils::fgMemoryManager)
 DTDElementDecl (QName *const elementName, const ModelTypes modelType=Any, MemoryManager *const manager=XMLPlatformUtils::fgMemoryManager)
 ~DTDElementDecl ()
virtual XMLAttDeffindAttr (const XMLCh *const qName, const unsigned int uriId, const XMLCh *const baseName, const XMLCh *const prefix, const LookupOpts options, bool &wasAdded) const
virtual XMLAttDefListgetAttDefList () const
virtual CharDataOpts getCharDataOpts () const
virtual bool hasAttDefs () const
virtual bool resetDefs ()
virtual const ContentSpecNode * getContentSpec () const
virtual ContentSpecNode * getContentSpec ()
virtual void setContentSpec (ContentSpecNode *toAdopt)
virtual XMLContentModelgetContentModel ()
virtual void setContentModel (XMLContentModel *const newModelToAdopt)
virtual const XMLChgetFormattedContentModel () const
const XMLChgetKey () const
const DTDAttDefgetAttDef (const XMLCh *const attName) const
DTDAttDefgetAttDef (const XMLCh *const attName)
ModelTypes getModelType () const
const XMLChgetDOMTypeInfoName () const
const XMLChgetDOMTypeInfoUri () const
void addAttDef (DTDAttDef *const toAdd)
void setModelType (const DTDElementDecl::ModelTypes toSet)

Private Member Functions

void faultInAttDefList () const
XMLContentModelcreateChildModel ()
XMLContentModelmakeContentModel ()
XMLChformatContentModel () const

Private Attributes

RefHashTableOf< DTDAttDef > * fAttDefs
DTDAttDefListfAttList
ContentSpecNode * fContentSpec
ModelTypes fModelType
XMLContentModelfContentModel
XMLChfFormattedModel

Detailed Description

Definition at line 148 of file DTDElementDecl.hpp.


Member Enumeration Documentation

enum DTDElementDecl::ModelTypes

Enumerator:
Empty 
Any 
Mixed_Simple 
Children 
ModelTypes_Count 

Definition at line 158 of file DTDElementDecl.hpp.


Constructor & Destructor Documentation

DTDElementDecl::DTDElementDecl ( MemoryManager *const   manager = XMLPlatformUtils::fgMemoryManager  ) 

DTDElementDecl::DTDElementDecl ( const XMLCh *const   elemRawName,
const unsigned int  uriId,
const ModelTypes  modelType,
MemoryManager *const   manager = XMLPlatformUtils::fgMemoryManager 
)

DTDElementDecl::DTDElementDecl ( QName *const   elementName,
const ModelTypes  modelType = Any,
MemoryManager *const   manager = XMLPlatformUtils::fgMemoryManager 
)

DTDElementDecl::~DTDElementDecl (  ) 


Member Function Documentation

void DTDElementDecl::addAttDef ( DTDAttDef *const   toAdd  ) 

XMLContentModel* DTDElementDecl::createChildModel (  )  [private]

void DTDElementDecl::faultInAttDefList (  )  const [private]

virtual XMLAttDef* DTDElementDecl::findAttr ( const XMLCh *const   qName,
const unsigned int  uriId,
const XMLCh *const   baseName,
const XMLCh *const   prefix,
const LookupOpts  options,
bool &  wasAdded 
) const [virtual]

XMLCh* DTDElementDecl::formatContentModel (  )  const [private]

DTDAttDef* DTDElementDecl::getAttDef ( const XMLCh *const   attName  ) 

const DTDAttDef* DTDElementDecl::getAttDef ( const XMLCh *const   attName  )  const

virtual XMLAttDefList& DTDElementDecl::getAttDefList (  )  const [virtual]

Get a list of attributes defined for this element.

The derived class should return a reference to some member object which implements the XMLAttDefList interface. This object gives the scanner the ability to look through the attributes defined for this element.

It is done this way for efficiency, though of course this is not thread safe. The scanner guarantees that it won't ever call this method in any nested way, but the outside world must be careful about when it calls this method, and optimally never would.

Implements XMLElementDecl.

virtual CharDataOpts DTDElementDecl::getCharDataOpts (  )  const [virtual]

The character data options for this element type

The derived class should return an appropriate character data opts value which correctly represents its tolerance towards whitespace or character data inside of its instances. This allows the scanner to do all of the validation of character data.

Implements XMLElementDecl.

XMLContentModel * DTDElementDecl::getContentModel (  )  [inline, virtual]

Get a pointer to the abstract content model

This method will return a const pointer to the content model object of this element. This class is a simple abstraction that allows an element to define and use multiple, specialized content model types internally but still allow the outside world to do simple stuff with them.

Returns:
A pointer to the element's content model, via the basic abstract content model type.

Implements XMLElementDecl.

Definition at line 304 of file DTDElementDecl.hpp.

References fContentModel, and makeContentModel().

ContentSpecNode * DTDElementDecl::getContentSpec (  )  [inline, virtual]

Get a pointer to the content spec node

This method is identical to the previous one, except that it is non const.

Implements XMLElementDecl.

Definition at line 294 of file DTDElementDecl.hpp.

References fContentSpec.

const ContentSpecNode * DTDElementDecl::getContentSpec (  )  const [inline, virtual]

Get a pointer to the content spec node

This method will return a const pointer to the content spec node object of this element.

Returns:
A const pointer to the element's content spec node

Implements XMLElementDecl.

Definition at line 299 of file DTDElementDecl.hpp.

References fContentSpec.

const XMLCh * DTDElementDecl::getDOMTypeInfoName (  )  const [inline, virtual]

Returns:
the name part of DOM Level 3 TypeInfo

Implements XMLElementDecl.

Definition at line 334 of file DTDElementDecl.hpp.

const XMLCh * DTDElementDecl::getDOMTypeInfoUri (  )  const [inline, virtual]

Returns:
the uri part of DOM Level 3 TypeInfo

Implements XMLElementDecl.

Definition at line 338 of file DTDElementDecl.hpp.

virtual const XMLCh* DTDElementDecl::getFormattedContentModel (  )  const [virtual]

Geta formatted string of the content model

This method is a convenience method which will create a formatted representation of the content model of the element. It will not always exactly recreate the original model, since some normalization or or reformatting may occur. But, it will be a technically accurate representation of the original content model.

Returns:
A pointer to an internal buffer which contains the formatted content model. The caller does not own this buffer and should copy it if it needs to be kept around.

Implements XMLElementDecl.

const XMLCh * DTDElementDecl::getKey (  )  const [inline]

Definition at line 321 of file DTDElementDecl.hpp.

References XMLElementDecl::getFullName().

DTDElementDecl::ModelTypes DTDElementDecl::getModelType (  )  const [inline]

Definition at line 329 of file DTDElementDecl.hpp.

References fModelType.

virtual bool DTDElementDecl::hasAttDefs (  )  const [virtual]

Indicate whether this element type defined any attributes

The derived class should return a boolean that indicates whether this element has any attributes defined for it or not. This is an optimization that allows the scanner to skip some work if no attributes exist.

Implements XMLElementDecl.

XMLContentModel* DTDElementDecl::makeContentModel (  )  [private]

Referenced by getContentModel().

virtual bool DTDElementDecl::resetDefs (  )  [virtual]

Reset the flags on the attribute definitions.

This method is called by the scanner at the beginning of each scan of a start tag, asking this element decl to reset the 'declared' flag of each of its attribute defs. This allows the scanner to mark each one as declared yet or not.

Implements XMLElementDecl.

void DTDElementDecl::setContentModel ( XMLContentModel *const   newModelToAdopt  )  [inline, virtual]

Set the content model object for this element type

This method will adopt the based content model object. This is called by the actual validator which is parsing its DTD or Schema or whatever a creating an element decl. It will build what it feels is the correct content model type object and store it on the element decl object via this method.

Parameters:
newModelToAdopt This method will adopt the passed content model object. Any previous object is destroyed.

Implements XMLElementDecl.

Definition at line 312 of file DTDElementDecl.hpp.

References fContentModel.

virtual void DTDElementDecl::setContentSpec ( ContentSpecNode *  toAdopt  )  [virtual]

Set the content spec node object for this element type

This method will adopt the based content spec node object. This is called by the actual validator which is parsing its DTD or Schema or whatever and store it on the element decl object via this method.

Parameters:
toAdopt This method will adopt the passed content node spec object. Any previous object is destroyed.

Implements XMLElementDecl.

void DTDElementDecl::setModelType ( const DTDElementDecl::ModelTypes  toSet  )  [inline]

Definition at line 346 of file DTDElementDecl.hpp.

References fModelType.


Member Data Documentation

RefHashTableOf<DTDAttDef>* DTDElementDecl::fAttDefs [private]

Definition at line 283 of file DTDElementDecl.hpp.

DTDAttDefList* DTDElementDecl::fAttList [private]

Definition at line 284 of file DTDElementDecl.hpp.

XMLContentModel* DTDElementDecl::fContentModel [private]

Definition at line 287 of file DTDElementDecl.hpp.

Referenced by getContentModel(), and setContentModel().

ContentSpecNode* DTDElementDecl::fContentSpec [private]

Definition at line 285 of file DTDElementDecl.hpp.

Referenced by getContentSpec().

XMLCh* DTDElementDecl::fFormattedModel [private]

Definition at line 288 of file DTDElementDecl.hpp.

ModelTypes DTDElementDecl::fModelType [private]

Definition at line 286 of file DTDElementDecl.hpp.

Referenced by getModelType(), and setModelType().


The documentation for this class was generated from the following file:
Generated on Thu Dec 7 01:30:37 2006 for DT2005.panorama by  doxygen 1.4.7