Public Member Functions | Private Attributes
FIX::LIBXML_DOMAttributes Class Reference

XML attribute as represented by libxml. More...

#include <LIBXML_DOMDocument.h>

Inheritance diagram for FIX::LIBXML_DOMAttributes:
Inheritance graph
[legend]
Collaboration diagram for FIX::LIBXML_DOMAttributes:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 LIBXML_DOMAttributes (xmlNodePtr pNode)
bool get (const std::string &, std::string &)
DOMAttributes::map toMap ()

Private Attributes

xmlNodePtr m_pNode

Detailed Description

XML attribute as represented by libxml.

Definition at line 38 of file LIBXML_DOMDocument.h.


Constructor & Destructor Documentation

FIX::LIBXML_DOMAttributes::LIBXML_DOMAttributes ( xmlNodePtr  pNode) [inline]

Definition at line 41 of file LIBXML_DOMDocument.h.

    : m_pNode(pNode) {}

Member Function Documentation

bool FIX::LIBXML_DOMAttributes::get ( const std::string &  name,
std::string &  value 
) [virtual]

Implements FIX::DOMAttributes.

Definition at line 33 of file LIBXML_DOMDocument.cpp.

References m_pNode.

  {
    xmlChar* result = xmlGetProp(m_pNode, (const xmlChar*)name.c_str());
    if(result == NULL) return false;
    value = (char*)result;
    xmlFree( result );
    return true;
  }

Implements FIX::DOMAttributes.

Definition at line 42 of file LIBXML_DOMDocument.cpp.

References m_pNode.

  {
    xmlAttr* attr = m_pNode->properties;
    DOMAttributes::map map;
    while( attr != 0 )
    {
      std::string value;
      std::string name;
      if( attr->name ) name = (char*)attr->name;
      get(name, value);
      map[name] = value;
      attr = attr->next;
    }
    return map;
  }

Member Data Documentation

xmlNodePtr FIX::LIBXML_DOMAttributes::m_pNode [private]

Definition at line 48 of file LIBXML_DOMDocument.h.

Referenced by get(), and toMap().


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

Generated on Mon Jun 23 2014 23:49:39 for QuickFIX by doxygen 1.7.6.1 written by Dimitri van Heesch, © 1997-2001