net_instaweb::HtmlNode Class Reference

Base class for HtmlElement and HtmlLeafNode. More...

#include "html_node.h"

Inheritance diagram for net_instaweb::HtmlNode:
net_instaweb::HtmlElement net_instaweb::HtmlLeafNode net_instaweb::HtmlCdataNode net_instaweb::HtmlCharactersNode net_instaweb::HtmlCommentNode net_instaweb::HtmlDirectiveNode net_instaweb::HtmlIEDirectiveNode

List of all members.

Public Member Functions

HtmlElementparent () const
virtual bool live () const =0
virtual void MarkAsDead (const HtmlEventListIterator &end)=0
void * operator new (size_t size, Arena< HtmlNode > *arena)
void operator delete (void *ptr, Arena< HtmlNode > *arena)

Protected Member Functions

 HtmlNode (HtmlElement *parent)
virtual void SynthesizeEvents (const HtmlEventListIterator &iter, HtmlEventList *queue)=0
virtual HtmlEventListIterator begin () const =0
 Return an iterator pointing to the first event associated with this node.
virtual HtmlEventListIterator end () const =0
 Return an iterator pointing to the last event associated with this node.
void operator delete (void *ptr)
 Version that affects visibility of the destructor.

Friends

class HtmlParse
class HtmlLexer
class HtmlTestingPeer

Detailed Description

Base class for HtmlElement and HtmlLeafNode.


Constructor & Destructor Documentation

net_instaweb::HtmlNode::HtmlNode ( HtmlElement parent  )  [inline, explicit, protected]
Todo:
TODO(jmarantz): jmaessen suggests instantiating the html nodes without parents and computing them from context at the time they are instantiated from the lexer. This is a little more difficult when synthesizing new nodes, however. We assert sanity, however, when calling HtmlParse::ApplyFilter.

Member Function Documentation

virtual void net_instaweb::HtmlNode::MarkAsDead ( const HtmlEventListIterator &  end  )  [pure virtual]

Marks a node as dead. The queue's end iterator should be passed in, to remove references to stale iterators, and to force IsRewritable to return false.

Implemented in net_instaweb::HtmlElement, and net_instaweb::HtmlLeafNode.

virtual void net_instaweb::HtmlNode::SynthesizeEvents ( const HtmlEventListIterator &  iter,
HtmlEventList *  queue 
) [protected, pure virtual]

Create new event object(s) representing this node, and insert them into the queue just before the given iterator; also, update this node object as necessary so that begin() and end() will return iterators pointing to the new event(s). The line number for each event should probably be -1.

Implemented in net_instaweb::HtmlElement, net_instaweb::HtmlCdataNode, net_instaweb::HtmlCharactersNode, net_instaweb::HtmlCommentNode, net_instaweb::HtmlIEDirectiveNode, and net_instaweb::HtmlDirectiveNode.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Generated on Tue May 29 16:33:50 2012 for Page Speed Optimization Libraries by  doxygen 1.6.3