Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

cppdom::HasAttributeValuePredicate Class Reference

#include <predicates.h>

List of all members.

Public Methods

 HasAttributeValuePredicate (const std::string &attrName, const std::string &val)
 set the attribute name to match. More...

void setName (const std::string &attrName)
 set the attribute name to match. More...

void setValue (const std::string &val)
 set the attribute value to match. More...

bool operator() (const XMLNodePtr &node)

Private Attributes

std::string mName
std::string mValue


Constructor & Destructor Documentation

cppdom::HasAttributeValuePredicate::HasAttributeValuePredicate const std::string &    attrName,
const std::string &    val
[inline]
 

set the attribute name to match.

set the attribute value to match.

Definition at line 74 of file predicates.h.

References mName, and mValue.

00075          : mName(attrName), mValue(val)
00076       {}


Member Function Documentation

bool cppdom::HasAttributeValuePredicate::operator() const XMLNodePtr   node [inline]
 

Definition at line 84 of file predicates.h.

References mName, and mValue.

00085       {
00086          // if doesn't have the attribute, then were done.
00087          if (!node->hasAttribute(mName))
00088          {
00089             return false;
00090          }
00091 
00092          return mValue == (std::string)node->getAttribute(mName);
00093       }

void cppdom::HasAttributeValuePredicate::setName const std::string &    attrName [inline]
 

set the attribute name to match.

Definition at line 79 of file predicates.h.

References mName.

00079 { mName = attrName; }

void cppdom::HasAttributeValuePredicate::setValue const std::string &    val [inline]
 

set the attribute value to match.

Definition at line 82 of file predicates.h.

References mValue.

00082 { mValue = val; }


Member Data Documentation

std::string cppdom::HasAttributeValuePredicate::mName [private]
 

Definition at line 95 of file predicates.h.

Referenced by HasAttributeValuePredicate(), operator()(), and setName().

std::string cppdom::HasAttributeValuePredicate::mValue [private]
 

Definition at line 96 of file predicates.h.

Referenced by HasAttributeValuePredicate(), operator()(), and setValue().


The documentation for this class was generated from the following file:
Generated on Thu Jan 2 21:29:20 2003 for cppdom by doxygen1.2.15