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

Debug_Element_Builder.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file    Debug_Element_Builder.h
00006  *
00007  *  $Id: Debug_Element_Builder.h,v 1.1.1.1 2003/02/21 18:36:32 chad Exp $
00008  *
00009  *  @author Nanbor Wang <nanbor@cs.wustl.edu>
00010  */
00011 //=============================================================================
00012 #ifndef _ACEXML_DEBUG_ELEMENT_BUILDER_H_
00013 #define _ACEXML_DEBUG_ELEMENT_BUILDER_H_
00014 
00015 #include "ace/pre.h"
00016 #include "ACEXML/parser/debug_validator/Debug_DTD_Manager_Export.h"
00017 
00018 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00019 #pragma once
00020 #endif /* ACE_LACKS_PRAGMA_ONCE */
00021 
00022 #include "ACEXML/common/Element_Def_Builder.h"
00023 #include "ACEXML/parser/debug_validator/Element_Tree.h"
00024 
00025 /**
00026  * @class ACEXML_Debug_Element_Builder Debug_Element_Builder.h "parser/debug_validator/Debug_Element_Builder.h"
00027  *
00028  * This class prints out the element definition for debugging purpose.
00029  *
00030  * @todo This class is not namespace-aware.
00031  */
00032 class ACEXML_DEBUG_DTD_MANAGER_Export ACEXML_Debug_Element_Builder
00033   : public ACEXML_Element_Def_Builder
00034 {
00035 public:
00036   ACEXML_Debug_Element_Builder ();
00037 
00038   virtual ~ACEXML_Debug_Element_Builder ();
00039 
00040   /**
00041    * Define the name of the element.
00042    *
00043    * @retval 0 if valid, -1 otherwise.
00044    */
00045   virtual int setElementName (const ACEXML_Char *namespaceURI,
00046                               const ACEXML_Char *localName,
00047                               const ACEXML_Char *qName ACEXML_ENV_ARG_DECL)
00048         ACE_THROW_SPEC ((ACEXML_SAXException))
00049     ;
00050 
00051   /**
00052    * Define the content type of the element.
00053    *
00054    * @retval 0 if valid, -1 otherwise.
00055    */
00056   virtual int setContentType (CONTENT_TYPE type ACEXML_ENV_ARG_DECL)
00057         ACE_THROW_SPEC ((ACEXML_SAXException))
00058     ;
00059 
00060   /**
00061    * Insert one more element into Mixed definition.
00062    */
00063   virtual int insertMixedElement (const ACEXML_Char *namespaceURI,
00064                                   const ACEXML_Char *localName,
00065                                   const ACEXML_Char *qName ACEXML_ENV_ARG_DECL)
00066         ACE_THROW_SPEC ((ACEXML_SAXException))
00067     ;
00068 
00069   /**
00070    * Start a new group of children.
00071    */
00072   virtual int startChildGroup ();
00073 
00074   /**
00075    * End a new group of children.
00076    *
00077    * @retval 0 on success.
00078    */
00079   virtual int endChildGroup (CARDINALITY card ACEXML_ENV_ARG_DECL);
00080 
00081   /**
00082    * Set the type of current child group to Choice.
00083    *
00084    * @retval 0 on success, -1 if the type of the child group has
00085    * already been set and this action conflicts with the previous
00086    * setting.
00087    */
00088   virtual int setChoice ();
00089 
00090   /**
00091    * Set the type of current child group to Sequence.
00092    *
00093    * @retval 0 on success, -1 if the type of the child group has
00094    * already been set and this action conflicts with the previous
00095    * setting.
00096    */
00097   virtual int setSequence ();
00098 
00099   /**
00100    * Insert an new element into the current child group.
00101    *
00102    * @retval 0 on success, -1 otherwise.
00103    */
00104   virtual int insertElement  (const ACEXML_Char *namespaceURI,
00105                               const ACEXML_Char *localName,
00106                               const ACEXML_Char *qName ACEXML_ENV_ARG_DECL)
00107         ACE_THROW_SPEC ((ACEXML_SAXException))
00108     ;
00109 
00110   /**
00111    * Dump the content of the attribute definition.
00112    */
00113   virtual void dump (void);
00114 private:
00115   CONTENT_TYPE type_;
00116 
00117   ACEXML_String element_;
00118 
00119   ACEXML_Element_Tree_List_Node *root_;
00120 
00121   ACEXML_Element_Tree_List_Stack active_list_;
00122 };
00123 
00124 
00125 #include "ace/post.h"
00126 
00127 #endif /* _ACEXML_DEBUG_ELEMENT_BUILDER_H_ */

Generated on Mon Jun 16 13:23:20 2003 for ACEXML by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002