Index  Source Files  Annotated Class List  Alphabetical Class List  Class Hierarchy  Graphical Class Hierarchy   
 

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.

References m_pNode.

00042     : m_pNode(pNode) {}


Member Function Documentation

bool FIX::LIBXML_DOMAttributes::get const std::string &  ,
std::string & 
[virtual]
 

Implements FIX::DOMAttributes.

Definition at line 36 of file LIBXML_DOMDocument.cpp.

References m_pNode, QF_STACK_POP, and QF_STACK_PUSH.

Referenced by toMap().

00037   { QF_STACK_PUSH(LIBXML_DOMAttributes::get)
00038 
00039     xmlChar* result = xmlGetProp(m_pNode, (const xmlChar*)name.c_str());
00040     if(result == NULL) return false;
00041     value = (char*)result;
00042     return true;
00043 
00044     QF_STACK_POP
00045   }

DOMAttributes::map FIX::LIBXML_DOMAttributes::toMap  )  [virtual]
 

Implements FIX::DOMAttributes.

Definition at line 47 of file LIBXML_DOMDocument.cpp.

References get(), m_pNode, FIX::DOMAttributes::map, QF_STACK_POP, and QF_STACK_PUSH.

00048   { QF_STACK_PUSH(LIBXML_DOMAttributes::toMap)
00049 
00050     xmlAttr* attr = m_pNode->properties;
00051     DOMAttributes::map map;
00052     while( attr != 0 )
00053     {
00054       std::string value;
00055       std::string name;
00056       if( attr->name ) name = (char*)attr->name;
00057       get(name, value);
00058       map[name] = value;
00059       attr = attr->next;
00060     }
00061     return map;
00062 
00063     QF_STACK_POP
00064   }


Member Data Documentation

xmlNodePtr FIX::LIBXML_DOMAttributes::m_pNode [private]
 

Definition at line 48 of file LIBXML_DOMDocument.h.

Referenced by get(), LIBXML_DOMAttributes(), and toMap().


The documentation for this class was generated from the following files:
Generated on Mon Jul 24 19:36:45 2006 for QuickFIX by doxygen 1.3.6-20040222 written by Dimitri van Heesch, © 1997-2001