C# Class Majestic12.HTMLheuristics

This class will control HTML tag heuristics that will allow faster matching of tags to avoid long cycles as well as creation of same strings over and over again. This is effectively a fancy hash lookup table with attributes being hashed in context of tag
Inheritance: IDisposable
Mostrar archivo Open project: arktronic/sevenauth Class Usage Examples

Public Methods

Method Description
AddTag ( string p_sTag, string sAttributeNames ) : bool

Adds tag to list of tracked tags (don't add too many, if you have got multiple same first 2 chars then duplicates won't be added, so make sure the first added tags are the MOST LIKELY to be found)

Dispose ( ) : void

Disposes of resources

GetAttr ( int iAttrID ) : string
GetAttrData ( int iAttrID ) : byte[]
GetString ( int iID ) : string

Returns string for ID returned by GetMatch

GetStringData ( int iID ) : byte[]
GetTwoCharString ( byte cChar1, byte cChar2 ) : string
MatchAttr ( byte bChar, int iTagID ) : short
MatchTag ( byte cChar1, byte cChar2 ) : short

Private Methods

Method Description
AddAttribute ( string sAttr, short usID, short usAttrID ) : void
AddTag ( string sTag, short usID, short usDataID ) : bool
Dispose ( bool bDisposing ) : void
HTMLheuristics ( ) : System

Static constructor

SetHash ( char cChar1, char cChar2, short usID ) : bool

Method Details

AddTag() public method

Adds tag to list of tracked tags (don't add too many, if you have got multiple same first 2 chars then duplicates won't be added, so make sure the first added tags are the MOST LIKELY to be found)
public AddTag ( string p_sTag, string sAttributeNames ) : bool
p_sTag string
sAttributeNames string Comma delimited list of attributed
return bool

Dispose() public method

Disposes of resources
public Dispose ( ) : void
return void

GetAttr() public method

public GetAttr ( int iAttrID ) : string
iAttrID int
return string

GetAttrData() public method

public GetAttrData ( int iAttrID ) : byte[]
iAttrID int
return byte[]

GetString() public method

Returns string for ID returned by GetMatch
public GetString ( int iID ) : string
iID int ID
return string

GetStringData() public method

public GetStringData ( int iID ) : byte[]
iID int
return byte[]

GetTwoCharString() public method

public GetTwoCharString ( byte cChar1, byte cChar2 ) : string
cChar1 byte
cChar2 byte
return string

MatchAttr() public method

public MatchAttr ( byte bChar, int iTagID ) : short
bChar byte
iTagID int
return short

MatchTag() public method

public MatchTag ( byte cChar1, byte cChar2 ) : short
cChar1 byte
cChar2 byte
return short