summaryrefslogtreecommitdiff
path: root/ACEXML/parser/debug_validator/Debug_Attributes_Builder.h
diff options
context:
space:
mode:
Diffstat (limited to 'ACEXML/parser/debug_validator/Debug_Attributes_Builder.h')
-rw-r--r--ACEXML/parser/debug_validator/Debug_Attributes_Builder.h53
1 files changed, 52 insertions, 1 deletions
diff --git a/ACEXML/parser/debug_validator/Debug_Attributes_Builder.h b/ACEXML/parser/debug_validator/Debug_Attributes_Builder.h
index 906e2c3ec93..7737964927d 100644
--- a/ACEXML/parser/debug_validator/Debug_Attributes_Builder.h
+++ b/ACEXML/parser/debug_validator/Debug_Attributes_Builder.h
@@ -14,6 +14,11 @@
#include "common/Attributes_Def_Builder.h"
#include "parser/debug_validator/Debug_DTD_Manager_Export.h"
+#include "ace/Hash_Map_Manager.h"
+#include "ace/Unbounded_Queue.h"
+
+typedef ACE_Unbounded_Queue<ACEXML_String> ACEXML_STRING_QUEUE;
+typedef ACE_Unbounded_Queue_Iterator<ACEXML_String> ACEXML_STRING_QUEUE_ITERATOR;
/**
* @ class ACEXML_Debug_Attribute_Builder Debug_Attributes_Builder.h "parser/debug_validator/Debug_Attributes_Builder.h"
@@ -26,9 +31,17 @@ class ACEXML_DEBUG_DTD_MANAGER_Export ACEXML_Debug_Attribute_Builder
public:
ACEXML_Debug_Attribute_Builder ();
+ ACEXML_Debug_Attribute_Builder (const ACEXML_Debug_Attribute_Builder &rhs);
+
virtual ~ACEXML_Debug_Attribute_Builder ();
/**
+ * Specify the name of the attribute.
+ */
+ virtual int setName (const ACEXML_Char *n);
+ virtual const ACEXML_Char *getName (void);
+
+ /**
* Set the attribute type.
*/
virtual int setAttType (const ATT_TYPE type,
@@ -39,7 +52,7 @@ public:
/**
* Insert an element for NOTATION or ENUMERATION type attribute.
*/
- virtual int insertList (const ACEXML_Char Name,
+ virtual int insertList (const ACEXML_Char *Name,
ACEXML_Env &xmlenv)
// ACE_THORW_SPEC ((ACEXML_SAXException))
;
@@ -61,13 +74,43 @@ public:
virtual int validAttr (void);
private:
+ /// Attribute name.
+ ACEXML_String name_;
+
/// Type of attribute.
ATT_TYPE type_;
/// Default value type.
DEFAULT_DECL default_decl_;
+
+ /// Default attribute value.
+ ACEXML_String default_value_;
+
+ /// Holds a queue of enumerated attribute values.
+ ACEXML_STRING_QUEUE att_value_queue_;
};
+typedef ACE_Hash_Map_Entry<ACEXML_String,
+ ACEXML_Debug_Attribute_Builder> ACEXML_ATT_MAP_ENTRY;
+
+typedef ACE_Hash_Map_Manager_Ex <ACEXML_String,
+ ACEXML_Debug_Attribute_Builder,
+ ACE_Hash<ACEXML_String>,
+ ACE_Equal_To<ACEXML_String>,
+ ACE_Null_Mutex> ACEXML_ATT_MAP;
+
+typedef ACE_Hash_Map_Iterator_Ex<ACEXML_String,
+ ACEXML_Debug_Attribute_Builder,
+ ACE_Hash<ACEXML_String>,
+ ACE_Equal_To<ACEXML_String>,
+ ACE_Null_Mutex> ACEXML_ATT_MAP_ITER;
+
+typedef ACE_Hash_Map_Reverse_Iterator_Ex<ACEXML_String,
+ ACEXML_Debug_Attribute_Builder,
+ ACE_Hash<ACEXML_String>,
+ ACE_Equal_To<ACEXML_String>,
+ ACE_Null_Mutex> ACEXML_ATT_MAP_REVERSE_ITER;
+
/**
* @ class ACEXML_Debug_Attributes_Builder Debug_Attributes_Builder.h "parser/debug_validator/Debug_Attributes_Builder.h"
*
@@ -104,6 +147,14 @@ public:
virtual int insertAttribute (ACEXML_Attribute_Def_Builder *def,
ACEXML_Env &xmlenv);
+protected:
+ /// The name of the element type these attributes applied.
+ ACEXML_String element_name_;
+
+ /// Collection of attributes.
+ ACEXML_ATT_MAP attributes_;
};
+
+
#endif /* _ACEXML_DEBUG_ATTRIBUTES_BUILDER_H_ */