iweEntity Interface Reference

Processing Entity interface. More...

#include <weiParser.h>

Inheritance diagram for iweEntity:

iweDocument WeHtmlEntity WeHtmlDocument WeHtmlDocument WeInnerText WeRefrenceObject WeRefrenceObject WeCData WeHtmlComment WePhpInclude WeScript WeScript

List of all members.

Public Member Functions

virtual ~iweEntity ()
virtual const string Attr (string)
 Gets the attribute value.
virtual void Attr (string, string)
 Sets the attribute.
void ClearAttr (void)
virtual iweEntityChild (string type)
 Clears all attributes.
virtual iweEntityChild (int idx)
 Access to children by index.
virtual WeEntityListChildren ()
void ClearChildren (void)
 Direct access to the children collection.
virtual const string & InnerText (void)=0
virtual const string & OuterText (void)=0
iweEntityFindID (string id)
 Finds the entity with given ID.
WeEntityListFindTags (string tag)
 Finds the entity with given tag name.
virtual WeScannerToken Parse (string tagName, WeTagScanner &scanner, iweTransport *processor=NULL)
virtual WeCmpResultsDiff (iweEntity &cmp, weCmpMode mode=weCmpDefault)=0
virtual weCmpState Compare (iweEntity &cmp, weCmpMode mode=weCmpDefault)=0
virtual bool operator== (iweEntity &cmp)
iweDocumentGetRootDocument (void)
 Gets the root document.
const string ID (void) const
 Gets the entity unique ID.
const iweEntityParent (void) const
 Access the Parent.
void Parent (iweEntity *prnt)
 Access the Parent.
const string & Name (void) const
 Name property access.
void Name (const string &EntityName)
 Access the Parent.

Static Public Member Functions

static const weCmpModeCompareMode (void)
 CompareMode property access.
static void CompareMode (const weCmpMode &cMode)
 CompareMode property access.

Protected Member Functions

virtual void GenerateId (void)
 Generates an identifier.
bool IsParentTag (string tag)
 Query if 'tag' is parent tag.


Detailed Description

Processing Entity interface.

Author:
A. Abramov
Date:
08.06.2009

Definition at line 47 of file weiParser.h.


Constructor & Destructor Documentation

virtual iweEntity::~iweEntity (  )  [inline, virtual]

Definition at line 50 of file weiParser.h.


Member Function Documentation

void iweEntity::Attr ( string  name,
string  value 
) [virtual]

Sets the attribute.

Parameters:
name - The attribute name.
value - The attribute value.

Implemented in WeInnerText.

Definition at line 61 of file weiParser.cpp.

const string iweEntity::Attr ( string  name  )  [virtual]

Gets the attribute value.

Parameters:
name - The attribute name.
Return values:
attribute value if the attribute exist, empty string otherwise.

Implemented in WeInnerText.

Definition at line 41 of file weiParser.cpp.

iweEntity * iweEntity::Child ( int  idx  )  [virtual]

Access to children by index.

Parameters:
idx - index of the child in the collection
Return values:
null if it fails, the pointer to the WeHtmlEntity else.

Implemented in WeInnerText.

Definition at line 94 of file weiParser.cpp.

iweEntity * iweEntity::Child ( string  type  )  [virtual]

Clears all attributes.

Access to children by entity name.

Parameters:
type - name of the child in the collection
Return values:
null if it no children of such type, the pointer to the WeHtmlEntity else.

Implemented in WeInnerText.

Definition at line 73 of file weiParser.cpp.

virtual WeEntityList& iweEntity::Children (  )  [inline, virtual]

Implemented in WeInnerText.

Definition at line 58 of file weiParser.h.

void iweEntity::ClearAttr ( void   )  [inline]

Definition at line 54 of file weiParser.h.

void iweEntity::ClearChildren ( void   ) 

Direct access to the children collection.

Clears a children.

Author:
A. Abramov
Date:
28.05.2009

Definition at line 206 of file weiParser.cpp.

virtual weCmpState iweEntity::Compare ( iweEntity cmp,
weCmpMode  mode = weCmpDefault 
) [pure virtual]

Implemented in WeHtmlEntity, WeInnerText, and WeHtmlDocument.

static void iweEntity::CompareMode ( const weCmpMode cMode  )  [inline, static]

CompareMode property access.

CompareMode property defines how the entities will be compared by default, i.e by the == operator, or if mode not set for the IsEqual function
WeCompareDefault for default comparison means the strict comparison mode (WeCompatreStrict). But is not recommended to set the WeCompareDefault as the default mode.
The CompareMode property of the WeHtmlEntity used to access this variable.

Definition at line 101 of file weiParser.h.

static const weCmpMode& iweEntity::CompareMode ( void   )  [inline, static]

CompareMode property access.

CompareMode property defines how the entities will be compared by default, i.e by the == operator, or if mode not set for the IsEqual function
WeCompareDefault for default comparison means the strict comparison mode (WeCompatreStrict). But is not recommended to set the WeCompareDefault as the default mode.
The CompareMode property of the WeHtmlEntity used to access this variable.

Definition at line 100 of file weiParser.h.

virtual WeCmpResults* iweEntity::Diff ( iweEntity cmp,
weCmpMode  mode = weCmpDefault 
) [pure virtual]

Implemented in WeHtmlEntity, WeInnerText, and WeHtmlDocument.

iweEntity * iweEntity::FindID ( string  id  ) 

Finds the entity with given ID.

Searches through children for entity with given id. Returns point to itself, if given ID is the ID of the called entity.

Parameters:
id - The entity identifier.
Return values:
null if it no objects found, pointer to the object else.

Definition at line 153 of file weiParser.cpp.

WeEntityList & iweEntity::FindTags ( string  tag  ) 

Finds the entity with given tag name.

Searches through children for entity with given tag name. Returns the collection of entities which tag names coincide with the given tag name.

Parameters:
tag - The tag name to search.
Return values:
empty list if it no objects found, list of the objects else.

Definition at line 180 of file weiParser.cpp.

void iweEntity::GenerateId ( void   )  [protected, virtual]

Generates an identifier.

Definition at line 110 of file weiParser.cpp.

iweDocument * iweEntity::GetRootDocument ( void   ) 

Gets the root document.

Return values:
null if no root document found, else the pointer to root document.

Definition at line 222 of file weiParser.cpp.

const string iweEntity::ID ( void   )  const [inline]

Gets the entity unique ID.

Definition at line 105 of file weiParser.h.

virtual const string& iweEntity::InnerText ( void   )  [pure virtual]

Implemented in WeHtmlEntity, WeInnerText, and WeHtmlDocument.

bool iweEntity::IsParentTag ( string  tag  )  [protected]

Query if 'tag' is parent tag.

Parameters:
tag - The tag name.
Return values:
true if tag is in the parent tree, false if not.

Definition at line 241 of file weiParser.cpp.

void iweEntity::Name ( const string &  EntityName  )  [inline]

Access the Parent.

Definition at line 87 of file weiParser.h.

const string& iweEntity::Name ( void   )  const [inline]

Name property access.

Name property represents the entity TAG name. Some names defined for the special entities. These names are starts with '#' sign (for example #text for inner text).

Definition at line 86 of file weiParser.h.

virtual bool iweEntity::operator== ( iweEntity cmp  )  [inline, virtual]

Definition at line 71 of file weiParser.h.

virtual const string& iweEntity::OuterText ( void   )  [pure virtual]

Implemented in WeHtmlEntity, WeInnerText, and WeHtmlDocument.

void iweEntity::Parent ( iweEntity prnt  )  [inline]

Access the Parent.

Definition at line 78 of file weiParser.h.

const iweEntity* iweEntity::Parent ( void   )  const [inline]

Access the Parent.

Definition at line 77 of file weiParser.h.

virtual WeScannerToken iweEntity::Parse ( string  tagName,
WeTagScanner scanner,
iweTransport processor = NULL 
) [inline, virtual]

Implemented in WeHtmlEntity.

Definition at line 67 of file weiParser.h.


The documentation for this interface was generated from the following files:


 
©2009 Positive Technologies
 
Generated on Tue Jul 14 18:27:31 2009 for WebEngine by 
 
 
1.5.7
 
Get wpcObj at SourceForge.net. Fast, secure and Free Open Source software downloads