#include <parser/debug_validator/Debug_Attributes_Builder.h>
Inheritance diagram for ACEXML_Debug_Attribute_Builder:
Public Member Functions | |
ACEXML_Debug_Attribute_Builder () | |
ACEXML_Debug_Attribute_Builder (const ACEXML_Debug_Attribute_Builder &rhs) | |
virtual | ~ACEXML_Debug_Attribute_Builder () |
virtual int | setName (const ACEXML_Char *n) |
virtual const ACEXML_Char * | getName (void) |
virtual int | setAttType (const ATT_TYPE type ACEXML_ENV_ARG_DECL) ACE_THROW_SPEC((ACEXML_SAXException)) |
virtual int | insertList (const ACEXML_Char *Name ACEXML_ENV_ARG_DECL) ACE_THROW_SPEC((ACEXML_SAXException)) |
virtual int | setDefault (const DEFAULT_DECL def, const ACEXML_Char *value ACEXML_ENV_ARG_DECL) ACE_THROW_SPEC((ACEXML_SAXException)) |
virtual int | validAttr (void) |
virtual void | dump (void) |
Private Attributes | |
ACEXML_String | name_ |
Attribute name. | |
ATT_TYPE | type_ |
Type of attribute. | |
DEFAULT_DECL | default_decl_ |
Default value type. | |
ACEXML_String | default_value_ |
Default attribute value. | |
ACEXML_STRING_QUEUE | att_value_queue_ |
Holds a queue of enumerated attribute values. |
Definition at line 34 of file Debug_Attributes_Builder.h.
|
Definition at line 6 of file Debug_Attributes_Builder.cpp.
00007 : type_ (ERROR_TYPE), 00008 default_decl_ (INVALID) 00009 { 00010 } |
|
Definition at line 12 of file Debug_Attributes_Builder.cpp.
00013 : name_ (rhs.name_), 00014 type_ (rhs.type_), 00015 default_decl_ (rhs.default_decl_), 00016 default_value_ (rhs.default_value_), 00017 att_value_queue_ (rhs.att_value_queue_) 00018 { 00019 } |
|
Definition at line 21 of file Debug_Attributes_Builder.cpp.
00022 { 00023 } |
|
Dump the content of the attribute definition. Implements ACEXML_Attribute_Def_Builder. Definition at line 82 of file Debug_Attributes_Builder.cpp. References ACEXML_String, ACEXML_STRING_QUEUE_ITERATOR, ACE_Unbounded_Queue_Iterator< ACEXML_String >::advance(), default_decl_, default_value_, and ACE_Unbounded_Queue_Iterator< ACEXML_String >::next(). Referenced by ACEXML_Debug_Attributes_Builder::dump().
00083 { 00084 cout << this->name_ << " "; 00085 00086 switch (this->type_) 00087 { 00088 case CDATA: 00089 cout << "CDATA "; 00090 break; 00091 case ID: 00092 cout << "ID "; 00093 break; 00094 case IDREF: 00095 cout << "IDREF "; 00096 break; 00097 case IDREFS: 00098 cout << "IDREFS "; 00099 break; 00100 case ENTITY: 00101 cout << "ENTITY "; 00102 break; 00103 case ENTITIES: 00104 cout << "ENTITIES "; 00105 break; 00106 case NMTOKEN: 00107 cout << "NMTOKEN "; 00108 break; 00109 case NMTOKENS: 00110 cout << "NMTOKENS "; 00111 break; 00112 case NOTATION: 00113 cout << "NOTATION "; 00114 // Fall thru 00115 case ENUMERATION: 00116 { 00117 cout << "("; 00118 ACEXML_STRING_QUEUE_ITERATOR iter (this->att_value_queue_); 00119 ACEXML_String *n = 0; 00120 00121 while (iter.advance () != 0) 00122 { 00123 if (n == 0) 00124 cout << " | "; 00125 iter.next (n); 00126 cout << *n; 00127 } 00128 cout << ") "; 00129 } 00130 break; 00131 default: 00132 cout << "*** UNKNOWN TYPE ***"; 00133 break; 00134 } 00135 00136 switch (this->default_decl_) 00137 { 00138 case REQUIRED: 00139 cout << "#REQUIRED"; 00140 break; 00141 case IMPLIED: 00142 cout << "#IMPLIED"; 00143 break; 00144 case FIXED: 00145 cout << "#FIXED " << this->default_value_; 00146 break; 00147 default: 00148 cout << "**** UNDEFINED DEFAULT DECL ****"; 00149 break; 00150 } 00151 } |
|
Get the name of the attribute. Implements ACEXML_Attribute_Def_Builder. Definition at line 33 of file Debug_Attributes_Builder.cpp.
00034 { 00035 return this->name_.fast_rep (); 00036 } |
|
Insert an element for NOTATION or ENUMERATION type attribute. Implements ACEXML_Attribute_Def_Builder. |
|
Set the attribute type. Implements ACEXML_Attribute_Def_Builder. Definition at line 39 of file Debug_Attributes_Builder.cpp. References ACE_TEXT, and ACEXML_THROW_RETURN.
00042 { 00043 if (this->type_ == ERROR_TYPE) 00044 { 00045 this->type_ = type; 00046 return 0; 00047 } 00048 ACEXML_THROW_RETURN (ACEXML_SAXParseException (ACE_TEXT("Attribute type redefinition in Debug Validator")), -1); 00049 00050 } |
|
Set default attribute declaration. Implements ACEXML_Attribute_Def_Builder. Definition at line 64 of file Debug_Attributes_Builder.cpp. References ACEXML_Char.
00068 { 00069 this->default_decl_ = def; 00070 this->default_value_.set (value, 0); 00071 return 0; 00072 } |
|
Specify the name of the attribute. Implements ACEXML_Attribute_Def_Builder. Definition at line 26 of file Debug_Attributes_Builder.cpp. References ACEXML_Char.
00027 { 00028 this->name_.set (n, 0); 00029 return 0; 00030 } |
|
Check validity of the current attribute definition being built.
Implements ACEXML_Attribute_Def_Builder. Definition at line 75 of file Debug_Attributes_Builder.cpp.
00076 { 00077 // @@ Not implemented. Always return 1 (true) for now. 00078 return 1; 00079 } |
|
Holds a queue of enumerated attribute values.
Definition at line 96 of file Debug_Attributes_Builder.h. |
|
Default value type.
Definition at line 90 of file Debug_Attributes_Builder.h. Referenced by dump(). |
|
Default attribute value.
Definition at line 93 of file Debug_Attributes_Builder.h. Referenced by dump(). |
|
Attribute name.
Definition at line 84 of file Debug_Attributes_Builder.h. |
|
Type of attribute.
Definition at line 87 of file Debug_Attributes_Builder.h. |