#include <ParamXMLPrinter.h>
Public メソッド | |
const char * | CStr () const |
void | DecDepth () |
void | IncDepth () |
void | Indent () |
void | LineBreak () |
ParamXMLPrinter () | |
bool | Visit (const TiXmlUnknown &unknown) |
bool | Visit (const TiXmlComment &comment) |
bool | Visit (const TiXmlDeclaration &declaration) |
bool | Visit (const TiXmlText &text) |
bool | VisitEnter (const TiXmlElement &element, const TiXmlAttribute *firstAttribute) |
bool | VisitEnter (const TiXmlDocument &) |
bool | VisitExit (const TiXmlElement &element) |
bool | VisitExit (const TiXmlDocument &) |
Protected 変数 | |
TIXML_STRING | m_buffer |
int | m_depth |
TIXML_STRING | m_indetStr |
bool | m_simpleTextPrint |
ParamXMLPrinter.h の 45 行で定義されています。
Onikiri::ParamXMLPrinter::ParamXMLPrinter | ( | ) | [inline] |
ParamXMLPrinter.h の 50 行で定義されています。
参照先 m_depth・m_indetStr・m_simpleTextPrint.
00051 { 00052 m_simpleTextPrint = false; 00053 m_indetStr = " "; 00054 m_depth = 0; 00055 }
const char* Onikiri::ParamXMLPrinter::CStr | ( | ) | const [inline] |
ParamXMLPrinter.h の 57 行で定義されています。
参照先 m_buffer.
参照元 Onikiri::ParamXMLTree::ToXMLString().
00058 { 00059 return m_buffer.c_str(); 00060 }
Here is the caller graph for this function:
void Onikiri::ParamXMLPrinter::DecDepth | ( | ) | [inline] |
ParamXMLPrinter.h の 67 行で定義されています。
参照先 m_depth.
参照元 VisitEnter()・VisitExit().
00068 { 00069 m_depth--; 00070 }
Here is the caller graph for this function:
void Onikiri::ParamXMLPrinter::IncDepth | ( | ) | [inline] |
ParamXMLPrinter.h の 62 行で定義されています。
参照先 m_depth.
参照元 VisitEnter().
00063 { 00064 m_depth++; 00065 }
Here is the caller graph for this function:
void Onikiri::ParamXMLPrinter::Indent | ( | ) | [inline] |
ParamXMLPrinter.h の 72 行で定義されています。
参照先 m_buffer・m_depth・m_indetStr.
参照元 Visit()・VisitEnter()・VisitExit().
00073 { 00074 for( int i = 0; i < m_depth; i++ ){ 00075 m_buffer += m_indetStr; 00076 } 00077 }
Here is the caller graph for this function:
void Onikiri::ParamXMLPrinter::LineBreak | ( | ) | [inline] |
ParamXMLPrinter.h の 79 行で定義されています。
参照先 m_buffer.
参照元 Visit()・VisitEnter()・VisitExit().
00080 { 00081 m_buffer += "\n"; 00082 }
Here is the caller graph for this function:
bool Onikiri::ParamXMLPrinter::Visit | ( | const TiXmlUnknown & | unknown | ) | [inline] |
ParamXMLPrinter.h の 207 行で定義されています。
参照先 Indent()・LineBreak()・m_buffer.
00208 { 00209 Indent(); 00210 m_buffer += "<"; 00211 m_buffer += unknown.Value(); 00212 m_buffer += ">"; 00213 LineBreak(); 00214 return true; 00215 }
関数の呼び出しグラフ:
bool Onikiri::ParamXMLPrinter::Visit | ( | const TiXmlComment & | comment | ) | [inline] |
ParamXMLPrinter.h の 196 行で定義されています。
参照先 Indent()・LineBreak()・m_buffer.
00197 { 00198 Indent(); 00199 m_buffer += "<!--"; 00200 m_buffer += comment.Value(); 00201 m_buffer += "-->"; 00202 LineBreak(); 00203 return true; 00204 }
関数の呼び出しグラフ:
bool Onikiri::ParamXMLPrinter::Visit | ( | const TiXmlDeclaration & | declaration | ) | [inline] |
ParamXMLPrinter.h の 187 行で定義されています。
参照先 Indent()・LineBreak()・m_buffer.
00188 { 00189 Indent(); 00190 declaration.Print( 0, 0, &m_buffer ); 00191 LineBreak(); 00192 return true; 00193 }
関数の呼び出しグラフ:
bool Onikiri::ParamXMLPrinter::Visit | ( | const TiXmlText & | text | ) | [inline] |
ParamXMLPrinter.h の 160 行で定義されています。
参照先 Indent()・LineBreak()・m_buffer・m_simpleTextPrint・str.
00161 { 00162 if( text.CDATA() ){ 00163 Indent(); 00164 m_buffer += "<![CDATA["; 00165 m_buffer += text.Value(); 00166 m_buffer += "]]>"; 00167 LineBreak(); 00168 } 00169 else if( m_simpleTextPrint ){ 00170 //TIXML_STRING str; 00171 //TiXmlBase::EncodeString( text.ValueTStr(), &str ); 00172 00173 // Text data is output as raw data. 00174 m_buffer += text.ValueTStr(); 00175 } 00176 else{ 00177 Indent(); 00178 TIXML_STRING str; 00179 TiXmlBase::EncodeString( text.ValueTStr(), &str ); 00180 m_buffer += str; 00181 LineBreak(); 00182 } 00183 return true; 00184 }
関数の呼び出しグラフ:
bool Onikiri::ParamXMLPrinter::VisitEnter | ( | const TiXmlElement & | element, | |
const TiXmlAttribute * | firstAttribute | |||
) | [inline] |
ParamXMLPrinter.h の 94 行で定義されています。
参照先 DecDepth()・IncDepth()・Indent()・LineBreak()・m_buffer・m_simpleTextPrint.
00095 { 00096 Indent(); 00097 m_buffer += "<"; 00098 m_buffer += element.Value(); 00099 #if 0 00100 for( const TiXmlAttribute* attrib = firstAttribute; attrib; attrib = attrib->Next() ){ 00101 m_buffer += " "; 00102 attrib->Print( 0, 0, &m_buffer ); 00103 } 00104 #else 00105 IncDepth(); 00106 for( const TiXmlAttribute* attrib = firstAttribute; attrib; attrib = attrib->Next() ){ 00107 LineBreak(); 00108 Indent(); 00109 attrib->Print( 0, 0, &m_buffer ); 00110 } 00111 DecDepth(); 00112 if( firstAttribute ){ 00113 LineBreak(); 00114 Indent(); 00115 } 00116 #endif 00117 if( !element.FirstChild() ){ 00118 m_buffer += " />"; 00119 LineBreak(); 00120 } 00121 else{ 00122 m_buffer += ">"; 00123 if( element.FirstChild()->ToText() && 00124 element.LastChild() == element.FirstChild() && 00125 element.FirstChild()->ToText()->CDATA() == false 00126 ){ 00127 m_simpleTextPrint = true; 00128 } 00129 else{ 00130 LineBreak(); 00131 } 00132 } 00133 IncDepth(); 00134 return true; 00135 }
関数の呼び出しグラフ:
bool Onikiri::ParamXMLPrinter::VisitEnter | ( | const TiXmlDocument & | ) | [inline] |
bool Onikiri::ParamXMLPrinter::VisitExit | ( | const TiXmlElement & | element | ) | [inline] |
ParamXMLPrinter.h の 138 行で定義されています。
参照先 DecDepth()・Indent()・LineBreak()・m_buffer・m_simpleTextPrint.
00139 { 00140 DecDepth(); 00141 if( !element.FirstChild() ){ 00142 // nothing. 00143 } 00144 else{ 00145 if( m_simpleTextPrint ){ 00146 m_simpleTextPrint = false; 00147 } 00148 else{ 00149 Indent(); 00150 } 00151 m_buffer += "</"; 00152 m_buffer += element.Value(); 00153 m_buffer += ">"; 00154 LineBreak(); 00155 } 00156 return true; 00157 }
関数の呼び出しグラフ:
bool Onikiri::ParamXMLPrinter::VisitExit | ( | const TiXmlDocument & | ) | [inline] |
TIXML_STRING Onikiri::ParamXMLPrinter::m_buffer [protected] |
ParamXMLPrinter.h の 218 行で定義されています。
参照元 CStr()・Indent()・LineBreak()・Visit()・VisitEnter()・VisitExit().
int Onikiri::ParamXMLPrinter::m_depth [protected] |
TIXML_STRING Onikiri::ParamXMLPrinter::m_indetStr [protected] |
bool Onikiri::ParamXMLPrinter::m_simpleTextPrint [protected] |