Dillo v3.1.1-98-g318d1f14
|
#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 |
CssSimpleSelector::CssSimpleSelector | ( | ) |
Definition at line 231 of file css.cc.
References element, ELEMENT_ANY, and pseudo.
CssSimpleSelector::~CssSimpleSelector | ( | ) |
Definition at line 237 of file css.cc.
References dFree(), lout::misc::SimpleVector< T >::get(), klass, pseudo, and lout::misc::SimpleVector< T >::size().
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 379 of file css.hh.
References pseudo.
Referenced by CssParser::parseSimpleSelector().
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().
void CssSimpleSelector::print | ( | ) |
Definition at line 312 of file css.cc.
References element, lout::misc::SimpleVector< T >::get(), klass, pseudo, and lout::misc::SimpleVector< T >::size().
|
inline |
Definition at line 376 of file css.hh.
References element.
Referenced by CssParser::parseSimpleSelector().
void CssSimpleSelector::setSelect | ( | SelectType | t, |
const char * | v | ||
) |
Definition at line 244 of file css.cc.
References dStrdup(), lout::misc::SimpleVector< T >::increase(), klass, pseudo, SELECT_CLASS, SELECT_ID, SELECT_PSEUDO_CLASS, lout::misc::SimpleVector< T >::set(), and lout::misc::SimpleVector< T >::size().
Referenced by CssParser::parseSimpleSelector().
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().
|
private |
Definition at line 357 of file css.hh.
Referenced by CssSimpleSelector(), getElement(), match(), CssParser::parseSimpleSelector(), print(), setElement(), and specificity().
|
private |
Definition at line 358 of file css.hh.
Referenced by getId(), and CssParser::parseSimpleSelector().
|
private |
Definition at line 359 of file css.hh.
Referenced by getClass(), match(), CssParser::parseSimpleSelector(), print(), setSelect(), specificity(), and ~CssSimpleSelector().
|
private |
Definition at line 358 of file css.hh.
Referenced by CssSimpleSelector(), getPseudoClass(), match(), CssParser::parseSimpleSelector(), print(), setSelect(), specificity(), and ~CssSimpleSelector().