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 78907 2007-07-16 10:22:58Z sowayaa $
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     ;
00049 
00050   /**
00051    * Define the content type of the element.
00052    *
00053    * @retval 0 if valid, -1 otherwise.
00054    */
00055   virtual int setContentType (CONTENT_TYPE type ACEXML_ENV_ARG_DECL)
00056     ;
00057 
00058   /**
00059    * Insert one more element into Mixed definition.
00060    */
00061   virtual int insertMixedElement (const ACEXML_Char *namespaceURI,
00062                                   const ACEXML_Char *localName,
00063                                   const ACEXML_Char *qName ACEXML_ENV_ARG_DECL)
00064     ;
00065 
00066   /**
00067    * Start a new group of children.
00068    */
00069   virtual int startChildGroup ();
00070 
00071   /**
00072    * End a new group of children.
00073    *
00074    * @retval 0 on success.
00075    */
00076   virtual int endChildGroup (CARDINALITY card ACEXML_ENV_ARG_DECL);
00077 
00078   /**
00079    * Set the type of current child group to Choice.
00080    *
00081    * @retval 0 on success, -1 if the type of the child group has
00082    * already been set and this action conflicts with the previous
00083    * setting.
00084    */
00085   virtual int setChoice ();
00086 
00087   /**
00088    * Set the type of current child group to Sequence.
00089    *
00090    * @retval 0 on success, -1 if the type of the child group has
00091    * already been set and this action conflicts with the previous
00092    * setting.
00093    */
00094   virtual int setSequence ();
00095 
00096   /**
00097    * Insert an new element into the current child group.
00098    *
00099    * @retval 0 on success, -1 otherwise.
00100    */
00101   virtual int insertElement  (const ACEXML_Char *namespaceURI,
00102                               const ACEXML_Char *localName,
00103                               const ACEXML_Char *qName ACEXML_ENV_ARG_DECL)
00104     ;
00105 
00106   /**
00107    * Dump the content of the attribute definition.
00108    */
00109   virtual void dump (void);
00110 private:
00111   CONTENT_TYPE type_;
00112 
00113   ACEXML_String element_;
00114 
00115   ACEXML_Element_Tree_List_Node *root_;
00116 
00117   ACEXML_Element_Tree_List_Stack active_list_;
00118 };
00119 
00120 
00121 #include /**/ "ace/post.h"
00122 
00123 #endif /* _ACEXML_DEBUG_ELEMENT_BUILDER_H_ */

Generated on Sun Jan 27 13:04:14 2008 for ACEXML by doxygen 1.3.6