Merge pull request #2309 from mitza-oci/warnings
[ACE_TAO.git] / ACE / ACEXML / parser / debug_validator / Debug_Element_Builder.h
blob4f3e4e0cb651f7953acd1bb845bb206e9d6c4541
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file Debug_Element_Builder.h
7 * @author Nanbor Wang <nanbor@cs.wustl.edu>
8 */
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)
17 #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"
23 /**
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
33 public:
34 ACEXML_Debug_Element_Builder ();
36 virtual ~ACEXML_Debug_Element_Builder ();
38 /**
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);
47 /**
48 * Define the content type of the element.
50 * @retval 0 if valid, -1 otherwise.
52 virtual int setContentType (CONTENT_TYPE type);
54 /**
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);
61 /**
62 * Start a new group of children.
64 virtual int startChildGroup ();
66 /**
67 * End a new group of children.
69 * @retval 0 on success.
71 virtual int endChildGroup (CARDINALITY card);
73 /**
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
78 * setting.
80 virtual int setChoice ();
82 /**
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
87 * setting.
89 virtual int setSequence ();
91 /**
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 ();
105 private:
106 CONTENT_TYPE type_;
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_ */