3 //=============================================================================
5 * @file Debug_Element_Builder.h
7 * @author Nanbor Wang <nanbor@cs.wustl.edu>
9 //=============================================================================
10 #ifndef _ACEXML_DEBUG_ELEMENT_BUILDER_H_
11 #define _ACEXML_DEBUG_ELEMENT_BUILDER_H_
13 #include /**/ "ace/pre.h"
14 #include "ACEXML/parser/debug_validator/Debug_DTD_Manager_Export.h"
16 #if !defined (ACE_LACKS_PRAGMA_ONCE)
18 #endif /* ACE_LACKS_PRAGMA_ONCE */
20 #include "ACEXML/common/Element_Def_Builder.h"
21 #include "ACEXML/parser/debug_validator/Element_Tree.h"
24 * @class ACEXML_Debug_Element_Builder Debug_Element_Builder.h "parser/debug_validator/Debug_Element_Builder.h"
26 * This class prints out the element definition for debugging purpose.
28 * @todo This class is not namespace-aware.
30 class ACEXML_DEBUG_DTD_MANAGER_Export ACEXML_Debug_Element_Builder
31 : public ACEXML_Element_Def_Builder
34 ACEXML_Debug_Element_Builder ();
36 virtual ~ACEXML_Debug_Element_Builder ();
39 * Define the name of the element.
41 * @retval 0 if valid, -1 otherwise.
43 virtual int setElementName (const ACEXML_Char
*namespaceURI
,
44 const ACEXML_Char
*localName
,
45 const ACEXML_Char
*qName
);
48 * Define the content type of the element.
50 * @retval 0 if valid, -1 otherwise.
52 virtual int setContentType (CONTENT_TYPE type
);
55 * Insert one more element into Mixed definition.
57 virtual int insertMixedElement (const ACEXML_Char
*namespaceURI
,
58 const ACEXML_Char
*localName
,
59 const ACEXML_Char
*qName
);
62 * Start a new group of children.
64 virtual int startChildGroup ();
67 * End a new group of children.
69 * @retval 0 on success.
71 virtual int endChildGroup (CARDINALITY card
);
74 * Set the type of current child group to Choice.
76 * @retval 0 on success, -1 if the type of the child group has
77 * already been set and this action conflicts with the previous
80 virtual int setChoice ();
83 * Set the type of current child group to Sequence.
85 * @retval 0 on success, -1 if the type of the child group has
86 * already been set and this action conflicts with the previous
89 virtual int setSequence ();
92 * Insert an new element into the current child group.
94 * @retval 0 on success, -1 otherwise.
96 virtual int insertElement (const ACEXML_Char
*namespaceURI
,
97 const ACEXML_Char
*localName
,
98 const ACEXML_Char
*qName
)
102 * Dump the content of the attribute definition.
104 virtual void dump ();
108 ACEXML_String element_
;
110 ACEXML_Element_Tree_List_Node
*root_
;
112 ACEXML_Element_Tree_List_Stack active_list_
;
116 #include /**/ "ace/post.h"
118 #endif /* _ACEXML_DEBUG_ELEMENT_BUILDER_H_ */