CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Private Attributes
SaxToDom2 Class Reference

#include <SaxToDom2.h>

Inheritance diagram for SaxToDom2:

Public Types

typedef
XERCES_CPP_NAMESPACE::Attributes 
Attributes
 
typedef
XERCES_CPP_NAMESPACE::SAXParseException 
SAXParseException
 

Public Member Functions

const TinyDom2dom () const
 
void endElement (const XMLCh *const uri, const XMLCh *const name, const XMLCh *const qname)
 
void error (const SAXParseException &e)
 
 SaxToDom2 ()
 
void startElement (const XMLCh *const uri, const XMLCh *const localname, const XMLCh *const qname, const Attributes &attrs)
 
 ~SaxToDom2 ()
 

Private Attributes

TinyDom2 dom_
 
std::vector< Node2parent_
 

Detailed Description

Definition at line 17 of file SaxToDom2.h.

Member Typedef Documentation

typedef XERCES_CPP_NAMESPACE::Attributes SaxToDom2::Attributes

Definition at line 21 of file SaxToDom2.h.

typedef XERCES_CPP_NAMESPACE::SAXParseException SaxToDom2::SAXParseException

Definition at line 22 of file SaxToDom2.h.

Constructor & Destructor Documentation

SaxToDom2::SaxToDom2 ( )

Definition at line 13 of file SaxToDom2.cc.

14 {
15  AttList2 al;
16  al [ TagName("name") ] = TagName("myTinyDomTest");
17  Node2 nm(TagName("TinyDom2"), al);
18  parent_.push_back( nm );
19 }
Definition: TagName.h:9
std::vector< Node2 > parent_
Definition: SaxToDom2.h:36
std::pair< TagName, AttList2 > Node2
Definition: TinyDom2.h:14
std::map< TagName, TagName > AttList2
Definition: TinyDom2.h:13
SaxToDom2::~SaxToDom2 ( )

Definition at line 21 of file SaxToDom2.cc.

22 { }

Member Function Documentation

const TinyDom2 & SaxToDom2::dom ( ) const

Definition at line 25 of file SaxToDom2.cc.

26 {
27  return dom_;
28 }
TinyDom2 dom_
Definition: SaxToDom2.h:37
void SaxToDom2::endElement ( const XMLCh *const  uri,
const XMLCh *const  name,
const XMLCh *const  qname 
)

Definition at line 55 of file SaxToDom2.cc.

58 {
59  parent_.pop_back();
60 }
std::vector< Node2 > parent_
Definition: SaxToDom2.h:36
void SaxToDom2::error ( const SAXParseException e)
void SaxToDom2::startElement ( const XMLCh *const  uri,
const XMLCh *const  localname,
const XMLCh *const  qname,
const Attributes attrs 
)

Definition at line 31 of file SaxToDom2.cc.

References i, StrX::localForm(), and relativeConstraints::value.

35 {
36  StrX strx(name); // element-name
37  AttList2 al;
38 
39  for (unsigned int i = 0; i < atts.getLength(); ++i)
40  {
41  const XMLCh* aname = atts.getLocalName(i);
42  const XMLCh* value = atts.getValue(i);
43  al[TagName((StrX(aname).localForm()))]=TagName(StrX(value).localForm());
44  }
45 
46  // add the new element to the dom-tree
47  Node2 nm(TagName(strx.localForm()) , al);
48  Node2 par = parent_.back();
49  dom_.addEdge(par, nm, AnotherDummy2());
50 
51  parent_.push_back(nm);
52 }
int i
Definition: DBlmapReader.cc:9
Definition: TagName.h:9
TinyDom2 dom_
Definition: SaxToDom2.h:37
std::vector< Node2 > parent_
Definition: SaxToDom2.h:36
Definition: StrX.h:32
std::pair< TagName, AttList2 > Node2
Definition: TinyDom2.h:14
void addEdge(const N &from, const N &to, const E &edge)
Definition: adjgraph.h:266
std::map< TagName, TagName > AttList2
Definition: TinyDom2.h:13

Member Data Documentation

TinyDom2 SaxToDom2::dom_
private

Definition at line 37 of file SaxToDom2.h.

std::vector<Node2> SaxToDom2::parent_
private

Definition at line 36 of file SaxToDom2.h.