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

ACEXML_Debug_Attributes_Builder Class Reference

#include "parser/debug_validator/Debug_Attributes_Builder.h"

Inheritance diagram for ACEXML_Debug_Attributes_Builder:

Inheritance graph
[legend]
Collaboration diagram for ACEXML_Debug_Attributes_Builder:

Collaboration graph
[legend]
List of all members.

Public Methods

 ACEXML_Debug_Attributes_Builder ()
virtual ~ACEXML_Debug_Attributes_Builder ()
virtual int setElement (const ACEXML_Char *namespaceURI, const ACEXML_Char *localName, const ACEXML_Char *qName ACEXML_ENV_ARG_DECL) ACE_THROW_SPEC((ACEXML_SAXException))
virtual ACEXML_Attribute_Def_BuildergetAttribute_Def_Builder ()
virtual int insertAttribute (ACEXML_Attribute_Def_Builder *def ACEXML_ENV_ARG_DECL)
virtual void dump (void)

Protected Attributes

ACEXML_String element_name_
 The name of the element type these attributes applied. More...

ACEXML_ATT_MAP attributes_
 Collection of attributes. More...


Detailed Description

This class prints out Attribute definitions for debugging purpose.

Definition at line 125 of file Debug_Attributes_Builder.h.


Constructor & Destructor Documentation

ACEXML_Debug_Attributes_Builder::ACEXML_Debug_Attributes_Builder  
 

Definition at line 154 of file Debug_Attributes_Builder.cpp.

00155 {
00156 }

ACEXML_Debug_Attributes_Builder::~ACEXML_Debug_Attributes_Builder   [virtual]
 

Definition at line 158 of file Debug_Attributes_Builder.cpp.

00159 {
00160 }


Member Function Documentation

void ACEXML_Debug_Attributes_Builder::dump void    [virtual]
 

Dump the content of the attribute definition.

Implements ACEXML_Attributes_Def_Builder.

Definition at line 200 of file Debug_Attributes_Builder.cpp.

References ACE_Hash_Map_Iterator_Ex< ACEXML_String, ACEXML_Debug_Attribute_Builder, ACE_Hash< ACEXML_String >, ACE_Equal_To< ACEXML_String >, ACE_Null_Mutex >::advance, ACEXML_Debug_Attribute_Builder::dump, element_name_, and ACE_Hash_Map_Entry< ACEXML_String, ACEXML_Debug_Attribute_Builder >::int_id_.

00201 {
00202   // @@ Print print.
00203   cout << "<!ATTLIST " << this->element_name_ << endl;
00204 
00205   ACEXML_ATT_MAP_ITER iter (this->attributes_);
00206   ACEXML_ATT_MAP_ENTRY *item;
00207 
00208   while (iter.advance () != 0)
00209     {
00210       iter.next (item);
00211       cout << "\n\t";
00212       item->int_id_.dump ();
00213     }
00214   cout << ">" << endl;
00215 }

ACEXML_Attribute_Def_Builder * ACEXML_Debug_Attributes_Builder::getAttribute_Def_Builder   [virtual]
 

Acquire an Attribute_Builder.

Implements ACEXML_Attributes_Def_Builder.

Definition at line 173 of file Debug_Attributes_Builder.cpp.

References ACE_NEW_RETURN.

00174 {
00175   ACEXML_Attribute_Def_Builder *tmp;
00176 
00177   ACE_NEW_RETURN (tmp,
00178                   ACEXML_Debug_Attribute_Builder (),
00179                   0);
00180   return tmp;
00181 }

int ACEXML_Debug_Attributes_Builder::insertAttribute ACEXML_Attribute_Def_Builder *def    ACEXML_ENV_ARG_DECL [virtual]
 

Add a definition for one attribute.

Implements ACEXML_Attributes_Def_Builder.

Definition at line 184 of file Debug_Attributes_Builder.cpp.

References ACE_TEXT, ACEXML_ENV_ARG_DECL, ACEXML_String, ACEXML_THROW_RETURN, attributes_, ACE_Hash_Map_Manager_Ex< ACEXML_String, ACEXML_Debug_Attribute_Builder, ACE_Hash< ACEXML_String >, ACE_Equal_To< ACEXML_String >, ACE_Null_Mutex >::bind, and ACEXML_Attribute_Def_Builder::VAR.

00185 {
00186   ACEXML_Attribute_Def_Builder::VAR ptr (def);
00187 
00188   if (def != 0)
00189     {
00190       ACEXML_String attname (def->getName (), 0, 0);
00191       ACEXML_Debug_Attribute_Builder *ptr =
00192         ACE_dynamic_cast (ACEXML_Debug_Attribute_Builder *, def);
00193       this->attributes_.bind (attname, *ptr);
00194       return 0;
00195     }
00196   ACEXML_THROW_RETURN (ACEXML_SAXParseException (ACE_TEXT("ACEXML_Debug_Attributes_Builder internal error")), -1);
00197 }

int ACEXML_Debug_Attributes_Builder::setElement const ACEXML_Char   namespaceURI,
const ACEXML_Char   localName,
const ACEXML_Char *qName    ACEXML_ENV_ARG_DECL
[virtual]
 

Set the element name that the attribute builder applies.

Return values:
0  if valid, -1 otherwise.

Implements ACEXML_Attributes_Def_Builder.

Definition at line 163 of file Debug_Attributes_Builder.cpp.

References ACEXML_Char, and ACEXML_ENV_ARG_DECL_NOT_USED.

00167 {
00168   this->element_name_.set (qName, 0);
00169   return 0;
00170 }


Member Data Documentation

ACEXML_ATT_MAP ACEXML_Debug_Attributes_Builder::attributes_ [protected]
 

Collection of attributes.

Definition at line 164 of file Debug_Attributes_Builder.h.

Referenced by insertAttribute.

ACEXML_String ACEXML_Debug_Attributes_Builder::element_name_ [protected]
 

The name of the element type these attributes applied.

Definition at line 161 of file Debug_Attributes_Builder.h.

Referenced by dump.


The documentation for this class was generated from the following files:
Generated on Mon Jun 16 13:26:40 2003 for ACEXML by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002