#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) |
virtual int | insertList (const ACEXML_Char *Name ACEXML_ENV_ARG_DECL) |
virtual int | setDefault (const DEFAULT_DECL def, const ACEXML_Char *value ACEXML_ENV_ARG_DECL) |
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 79 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().
00080 { 00081 cout << this->name_ << " "; 00082 00083 switch (this->type_) 00084 { 00085 case CDATA: 00086 cout << "CDATA "; 00087 break; 00088 case ID: 00089 cout << "ID "; 00090 break; 00091 case IDREF: 00092 cout << "IDREF "; 00093 break; 00094 case IDREFS: 00095 cout << "IDREFS "; 00096 break; 00097 case ENTITY: 00098 cout << "ENTITY "; 00099 break; 00100 case ENTITIES: 00101 cout << "ENTITIES "; 00102 break; 00103 case NMTOKEN: 00104 cout << "NMTOKEN "; 00105 break; 00106 case NMTOKENS: 00107 cout << "NMTOKENS "; 00108 break; 00109 case NOTATION: 00110 cout << "NOTATION "; 00111 // Fall thru 00112 case ENUMERATION: 00113 { 00114 cout << "("; 00115 ACEXML_STRING_QUEUE_ITERATOR iter (this->att_value_queue_); 00116 ACEXML_String *n = 0; 00117 00118 while (iter.advance () != 0) 00119 { 00120 if (n == 0) 00121 cout << " | "; 00122 iter.next (n); 00123 cout << *n; 00124 } 00125 cout << ") "; 00126 } 00127 break; 00128 default: 00129 cout << "*** UNKNOWN TYPE ***"; 00130 break; 00131 } 00132 00133 switch (this->default_decl_) 00134 { 00135 case REQUIRED: 00136 cout << "#REQUIRED"; 00137 break; 00138 case IMPLIED: 00139 cout << "#IMPLIED"; 00140 break; 00141 case FIXED: 00142 cout << "#FIXED " << this->default_value_; 00143 break; 00144 default: 00145 cout << "**** UNDEFINED DEFAULT DECL ****"; 00146 break; 00147 } 00148 } |
|
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.
00041 { 00042 if (this->type_ == ERROR_TYPE) 00043 { 00044 this->type_ = type; 00045 return 0; 00046 } 00047 ACEXML_THROW_RETURN (ACEXML_SAXParseException (ACE_TEXT("Attribute type redefinition in Debug Validator")), -1); 00048 00049 } |
|
Set default attribute declaration. Implements ACEXML_Attribute_Def_Builder. Definition at line 62 of file Debug_Attributes_Builder.cpp. References ACEXML_Char, default_decl_, and default_value_.
00065 { 00066 this->default_decl_ = def; 00067 this->default_value_.set (value, 0); 00068 return 0; 00069 } |
|
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 72 of file Debug_Attributes_Builder.cpp.
00073 { 00074 // @@ Not implemented. Always return 1 (true) for now. 00075 return 1; 00076 } |
|
Holds a queue of enumerated attribute values.
Definition at line 93 of file Debug_Attributes_Builder.h. |
|
Default value type.
Definition at line 87 of file Debug_Attributes_Builder.h. Referenced by dump(), and setDefault(). |
|
Default attribute value.
Definition at line 90 of file Debug_Attributes_Builder.h. Referenced by dump(), and setDefault(). |
|
Attribute name.
Definition at line 81 of file Debug_Attributes_Builder.h. |
|
Type of attribute.
Definition at line 84 of file Debug_Attributes_Builder.h. |