Public Member Functions | Protected Attributes

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 Member Functions

 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)
virtual
ACEXML_Attribute_Def_Builder
getAttribute_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.
ACEXML_ATT_MAP attributes_
 Collection of attributes.

Detailed Description

This class prints out Attribute definitions for debugging purpose.

Definition at line 122 of file Debug_Attributes_Builder.h.


Constructor & Destructor Documentation

ACEXML_Debug_Attributes_Builder::ACEXML_Debug_Attributes_Builder (  ) 

Definition at line 151 of file Debug_Attributes_Builder.cpp.

{
}

ACEXML_Debug_Attributes_Builder::~ACEXML_Debug_Attributes_Builder (  )  [virtual]

Definition at line 155 of file Debug_Attributes_Builder.cpp.

{
}


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 196 of file Debug_Attributes_Builder.cpp.

{
  // @@ Print print.
  cout << "<!ATTLIST " << this->element_name_ << endl;

  ACEXML_ATT_MAP_ITER iter (this->attributes_);
  ACEXML_ATT_MAP_ENTRY *item;

  while (iter.advance () != 0)
    {
      iter.next (item);
      cout << "\n\t";
      item->int_id_.dump ();
    }
  cout << ">" << endl;
}

ACEXML_Attribute_Def_Builder * ACEXML_Debug_Attributes_Builder::getAttribute_Def_Builder (  )  [virtual]

Acquire an Attribute_Builder.

Implements ACEXML_Attributes_Def_Builder.

Definition at line 169 of file Debug_Attributes_Builder.cpp.

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 180 of file Debug_Attributes_Builder.cpp.

{
  ACEXML_Attribute_Def_Builder::VAR ptr (def);

  if (def != 0)
    {
      ACEXML_String attname (def->getName (), 0, 0);
      ACEXML_Debug_Attribute_Builder *ptr =
        dynamic_cast<ACEXML_Debug_Attribute_Builder *> (def);
      this->attributes_.bind (attname, *ptr);
      return 0;
    }
  ACEXML_THROW_RETURN (ACEXML_SAXParseException (ACE_TEXT("ACEXML_Debug_Attributes_Builder internal error")), -1);
}

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 160 of file Debug_Attributes_Builder.cpp.

{
  this->element_name_.set (qName, 0);
  return 0;
}


Member Data Documentation

Collection of attributes.

Definition at line 160 of file Debug_Attributes_Builder.h.

The name of the element type these attributes applied.

Definition at line 157 of file Debug_Attributes_Builder.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines