Dillo v3.1.1-98-g318d1f14
Loading...
Searching...
No Matches
CssSimpleSelector Class Reference

#include <css.hh>

Public Types

enum  { ELEMENT_NONE = -1 , ELEMENT_ANY = -2 }
 
enum  SelectType { SELECT_NONE , SELECT_CLASS , SELECT_PSEUDO_CLASS , SELECT_ID }
 

Public Member Functions

 CssSimpleSelector ()
 
 ~CssSimpleSelector ()
 
void setElement (int e)
 
void setSelect (SelectType t, const char *v)
 
lout::misc::SimpleVector< char * > * getClass ()
 
const char * getPseudoClass ()
 
const char * getId ()
 
int getElement ()
 
bool match (const DoctreeNode *node)
 Return whether simple selector matches at a given node of the document tree.
 
int specificity ()
 Return the specificity of the simple selector.
 
void print ()
 

Private Attributes

int element
 
char * pseudo
 
char * id
 
lout::misc::SimpleVector< char * > klass
 

Detailed Description

Definition at line 355 of file css.hh.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
ELEMENT_NONE 
ELEMENT_ANY 

Definition at line 362 of file css.hh.

◆ SelectType

Enumerator
SELECT_NONE 
SELECT_CLASS 
SELECT_PSEUDO_CLASS 
SELECT_ID 

Definition at line 367 of file css.hh.

Constructor & Destructor Documentation

◆ CssSimpleSelector()

CssSimpleSelector::CssSimpleSelector ( )

Definition at line 231 of file css.cc.

References element, ELEMENT_ANY, and pseudo.

◆ ~CssSimpleSelector()

CssSimpleSelector::~CssSimpleSelector ( )

Member Function Documentation

◆ getClass()

lout::misc::SimpleVector< char * > * CssSimpleSelector::getClass ( )
inline

Definition at line 378 of file css.hh.

References klass.

Referenced by CssStyleSheet::addRule().

◆ getElement()

int CssSimpleSelector::getElement ( )
inline

Definition at line 381 of file css.hh.

References element.

Referenced by CssStyleSheet::addRule().

◆ getId()

const char * CssSimpleSelector::getId ( )
inline

Definition at line 380 of file css.hh.

References id.

Referenced by CssStyleSheet::addRule().

◆ getPseudoClass()

const char * CssSimpleSelector::getPseudoClass ( )
inline

Definition at line 379 of file css.hh.

References pseudo.

Referenced by CssParser::parseSimpleSelector().

◆ match()

bool CssSimpleSelector::match ( const DoctreeNode node)

Return whether simple selector matches at a given node of the document tree.

Definition at line 267 of file css.cc.

References dStrAsciiCasecmp(), element, DoctreeNode::element, ELEMENT_ANY, lout::misc::SimpleVector< T >::get(), DoctreeNode::id, klass, DoctreeNode::klass, pseudo, DoctreeNode::pseudo, and lout::misc::SimpleVector< T >::size().

Referenced by CssSelector::match().

◆ print()

void CssSimpleSelector::print ( )

◆ setElement()

void CssSimpleSelector::setElement ( int  e)
inline

Definition at line 376 of file css.hh.

References element.

Referenced by CssParser::parseSimpleSelector().

◆ setSelect()

◆ specificity()

int CssSimpleSelector::specificity ( )

Return the specificity of the simple selector.

The result is used in CssSelector::specificity ().

Definition at line 298 of file css.cc.

References element, ELEMENT_ANY, klass, pseudo, and lout::misc::SimpleVector< T >::size().

Member Data Documentation

◆ element

int CssSimpleSelector::element
private

◆ id

char * CssSimpleSelector::id
private

Definition at line 358 of file css.hh.

Referenced by getId(), and CssParser::parseSimpleSelector().

◆ klass

lout::misc::SimpleVector<char *> CssSimpleSelector::klass
private

◆ pseudo

char* CssSimpleSelector::pseudo
private

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