Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

Fl_XmlAttributes Class Reference
[eFLTK XML module]

The Fl_XmlAttributes class is map for node attributes. More...

#include <Fl_XmlNode.h>

Inheritance diagram for Fl_XmlAttributes:

Fl_String_String_Map Fl_Map List of all members.

Public Types

typedef Fl_String_String_Iterator Iterator

Public Methods

 Fl_XmlAttributes ()
 Constructs empty attribute map.

Fl_XmlAttributes & operator= (const Fl_XmlAttributes &src)
 Assign operator. More...

bool has_attribute (const char *attr) const
 Search for named attribute. More...

Fl_Stringget_attribute (const char *attr) const
 Returns attribute value for given attribute. More...

void set_attribute (const char *attr, const char *value)
 Set new value to attribute 'attr'. More...

void set_attribute (const char *attr, const Fl_String &value)
 Set new value to attribute 'attr'. More...


Detailed Description

The Fl_XmlAttributes class is map for node attributes.

Definition at line 19 of file Fl_XmlNode.h.


Member Function Documentation

Fl_String& Fl_XmlAttributes::get_attribute const char *    attr const [inline]
 

Returns attribute value for given attribute.

If not found, empty string is returned. HTML tags can have empty attributes, for those you should use has_attribute() method.

Parameters:
attr  name of attribute

Definition at line 47 of file Fl_XmlNode.h.

Referenced by Fl_XmlNode::get_attribute().

bool Fl_XmlAttributes::has_attribute const char *    attr const [inline]
 

Search for named attribute.

Returns true, if given attribute is found.

Parameters:
attr  name of attribute to search

Definition at line 39 of file Fl_XmlNode.h.

Referenced by Fl_XmlNode::has_attribute().

Fl_XmlAttributes& Fl_XmlAttributes::operator= const Fl_XmlAttributes &    src
 

Assign operator.

Makes deep copy of map to another.

Parameters:
src  as copy source

void Fl_XmlAttributes::set_attribute const char *    attr,
const Fl_String   value
[inline]
 

Set new value to attribute 'attr'.

If attribute is not found, it's added to map.

Parameters:
attr  attribute name
value  attribute value

Definition at line 63 of file Fl_XmlNode.h.

void Fl_XmlAttributes::set_attribute const char *    attr,
const char *    value
[inline]
 

Set new value to attribute 'attr'.

If attribute is not found, it's added to map.

Parameters:
attr  attribute name
value  attribute value

Definition at line 55 of file Fl_XmlNode.h.

Referenced by Fl_XmlNode::set_attribute().


The documentation for this class was generated from the following file:
Generated on Thu Jul 31 15:33:57 2003 for eFLTK by doxygen1.2.15