@@ -42,7 +42,7 @@ void ParseFile(LPCSTR path, CMemoryWriter& W, IReader* F, XMLDocument* xml)
4242 }
4343}
4444
45- void XMLDocument::Load (LPCSTR path_alias, LPCSTR path, LPCSTR _xml_filename)
45+ void XMLDocument::Load (pcstr path_alias, pcstr path, pcstr _xml_filename)
4646{
4747 shared_str fn = correct_file_name (path, _xml_filename);
4848
@@ -52,7 +52,7 @@ void XMLDocument::Load(LPCSTR path_alias, LPCSTR path, LPCSTR _xml_filename)
5252}
5353
5454// инициализация и загрузка XML файла
55- void XMLDocument::Load (LPCSTR path, LPCSTR xml_filename)
55+ void XMLDocument::Load (pcstr path, pcstr xml_filename)
5656{
5757 xr_strcpy (m_xml_file_name, xml_filename);
5858 // Load and parse xml file
@@ -76,7 +76,7 @@ void XMLDocument::Load(LPCSTR path, LPCSTR xml_filename)
7676 m_root = m_Doc.FirstChildElement ();
7777}
7878
79- XML_NODE* XMLDocument::NavigateToNode (XML_NODE* start_node, LPCSTR path, int node_index)
79+ XML_NODE* XMLDocument::NavigateToNode (XML_NODE* start_node, pcstr path, int node_index)
8080{
8181 R_ASSERT3 (start_node && path, " NavigateToNode failed in XML file " , m_xml_file_name);
8282 XML_NODE* node = NULL ;
@@ -119,12 +119,12 @@ XML_NODE* XMLDocument::NavigateToNode(XML_NODE* start_node, LPCSTR path, int nod
119119 return node;
120120}
121121
122- XML_NODE* XMLDocument::NavigateToNode (LPCSTR path, int node_index)
122+ XML_NODE* XMLDocument::NavigateToNode (pcstr path, int node_index)
123123{
124124 return NavigateToNode (GetLocalRoot () ? GetLocalRoot () : GetRoot (), path, node_index);
125125}
126126
127- XML_NODE* XMLDocument::NavigateToNodeWithAttribute (LPCSTR tag_name, LPCSTR attrib_name, LPCSTR attrib_value)
127+ XML_NODE* XMLDocument::NavigateToNodeWithAttribute (pcstr tag_name, pcstr attrib_name, pcstr attrib_value)
128128{
129129 XML_NODE* root = GetLocalRoot () ? GetLocalRoot () : GetRoot ();
130130 int tabsCount = GetNodesNum (root, tag_name);
@@ -140,21 +140,21 @@ XML_NODE* XMLDocument::NavigateToNodeWithAttribute(LPCSTR tag_name, LPCSTR attri
140140 return NULL ;
141141}
142142
143- LPCSTR XMLDocument::Read (LPCSTR path, int index, LPCSTR default_str_val)
143+ pcstr XMLDocument::Read (pcstr path, int index, pcstr default_str_val)
144144{
145145 XML_NODE* node = NavigateToNode (path, index);
146146 LPCSTR result = Read (node, default_str_val);
147147 return result;
148148}
149149
150- LPCSTR XMLDocument::Read (XML_NODE* start_node, LPCSTR path, int index, LPCSTR default_str_val)
150+ pcstr XMLDocument::Read (XML_NODE* start_node, pcstr path, int index, pcstr default_str_val)
151151{
152152 XML_NODE* node = NavigateToNode (start_node, path, index);
153153 LPCSTR result = Read (node, default_str_val);
154154 return result;
155155}
156156
157- LPCSTR XMLDocument::Read (XML_NODE* node, LPCSTR default_str_val)
157+ pcstr XMLDocument::Read (XML_NODE* node, pcstr default_str_val)
158158{
159159 if (node == NULL )
160160 return default_str_val;
@@ -182,7 +182,7 @@ int XMLDocument::ReadInt(XML_NODE* node, int default_int_val)
182182 return atoi (result_str);
183183}
184184
185- int XMLDocument::ReadInt (LPCSTR path, int index, int default_int_val)
185+ int XMLDocument::ReadInt (pcstr path, int index, int default_int_val)
186186{
187187 LPCSTR result_str = Read (path, index, NULL );
188188 if (result_str == NULL )
@@ -191,7 +191,7 @@ int XMLDocument::ReadInt(LPCSTR path, int index, int default_int_val)
191191 return atoi (result_str);
192192}
193193
194- int XMLDocument::ReadInt (XML_NODE* start_node, LPCSTR path, int index, int default_int_val)
194+ int XMLDocument::ReadInt (XML_NODE* start_node, pcstr path, int index, int default_int_val)
195195{
196196 LPCSTR result_str = Read (start_node, path, index, NULL );
197197 if (result_str == NULL )
@@ -200,7 +200,7 @@ int XMLDocument::ReadInt(XML_NODE* start_node, LPCSTR path, int index, int defau
200200 return atoi (result_str);
201201}
202202
203- float XMLDocument::ReadFlt (LPCSTR path, int index, float default_flt_val)
203+ float XMLDocument::ReadFlt (pcstr path, int index, float default_flt_val)
204204{
205205 LPCSTR result_str = Read (path, index, NULL );
206206 if (result_str == NULL )
@@ -209,7 +209,7 @@ float XMLDocument::ReadFlt(LPCSTR path, int index, float default_flt_val)
209209 return (float )atof (result_str);
210210}
211211
212- float XMLDocument::ReadFlt (XML_NODE* start_node, LPCSTR path, int index, float default_flt_val)
212+ float XMLDocument::ReadFlt (XML_NODE* start_node, pcstr path, int index, float default_flt_val)
213213{
214214 LPCSTR result_str = Read (start_node, path, index, NULL );
215215 if (result_str == NULL )
@@ -228,22 +228,22 @@ float XMLDocument::ReadFlt(XML_NODE* node, float default_flt_val)
228228 return (float )atof (result_str);
229229}
230230
231- LPCSTR XMLDocument::ReadAttrib (XML_NODE* start_node, LPCSTR path, int index, LPCSTR attrib, LPCSTR default_str_val)
231+ pcstr XMLDocument::ReadAttrib (XML_NODE* start_node, pcstr path, int index, pcstr attrib, pcstr default_str_val)
232232{
233233 XML_NODE* node = NavigateToNode (start_node, path, index);
234234 LPCSTR result = ReadAttrib (node, attrib, default_str_val);
235235
236236 return result;
237237}
238238
239- LPCSTR XMLDocument::ReadAttrib (LPCSTR path, int index, LPCSTR attrib, LPCSTR default_str_val)
239+ pcstr XMLDocument::ReadAttrib (pcstr path, int index, pcstr attrib, pcstr default_str_val)
240240{
241241 XML_NODE* node = NavigateToNode (path, index);
242242 LPCSTR result = ReadAttrib (node, attrib, default_str_val);
243243 return result;
244244}
245245
246- LPCSTR XMLDocument::ReadAttrib (XML_NODE* node, LPCSTR attrib, LPCSTR default_str_val)
246+ pcstr XMLDocument::ReadAttrib (XML_NODE* node, pcstr attrib, pcstr default_str_val)
247247{
248248 if (node == NULL )
249249 return default_str_val;
@@ -274,7 +274,7 @@ LPCSTR XMLDocument::ReadAttrib(XML_NODE* node, LPCSTR attrib, LPCSTR default_str
274274 }
275275}
276276
277- int XMLDocument::ReadAttribInt (XML_NODE* node, LPCSTR attrib, int default_int_val)
277+ int XMLDocument::ReadAttribInt (XML_NODE* node, pcstr attrib, int default_int_val)
278278{
279279 LPCSTR result_str = ReadAttrib (node, attrib, NULL );
280280
@@ -284,7 +284,7 @@ int XMLDocument::ReadAttribInt(XML_NODE* node, LPCSTR attrib, int default_int_va
284284 return atoi (result_str);
285285}
286286
287- int XMLDocument::ReadAttribInt (LPCSTR path, int index, LPCSTR attrib, int default_int_val)
287+ int XMLDocument::ReadAttribInt (pcstr path, int index, pcstr attrib, int default_int_val)
288288{
289289 LPCSTR result_str = ReadAttrib (path, index, attrib, NULL );
290290
@@ -294,7 +294,7 @@ int XMLDocument::ReadAttribInt(LPCSTR path, int index, LPCSTR attrib, int defaul
294294 return atoi (result_str);
295295}
296296
297- int XMLDocument::ReadAttribInt (XML_NODE* start_node, LPCSTR path, int index, LPCSTR attrib, int default_int_val)
297+ int XMLDocument::ReadAttribInt (XML_NODE* start_node, pcstr path, int index, pcstr attrib, int default_int_val)
298298{
299299 LPCSTR result_str = ReadAttrib (start_node, path, index, attrib, NULL );
300300
@@ -303,7 +303,7 @@ int XMLDocument::ReadAttribInt(XML_NODE* start_node, LPCSTR path, int index, LPC
303303 return atoi (result_str);
304304}
305305
306- float XMLDocument::ReadAttribFlt (LPCSTR path, int index, LPCSTR attrib, float default_flt_val)
306+ float XMLDocument::ReadAttribFlt (pcstr path, int index, pcstr attrib, float default_flt_val)
307307{
308308 LPCSTR result_str = ReadAttrib (path, index, attrib, NULL );
309309
@@ -313,7 +313,7 @@ float XMLDocument::ReadAttribFlt(LPCSTR path, int index, LPCSTR attrib, float de
313313 return (float )atof (result_str);
314314}
315315
316- float XMLDocument::ReadAttribFlt (XML_NODE* start_node, LPCSTR path, int index, LPCSTR attrib, float default_flt_val)
316+ float XMLDocument::ReadAttribFlt (XML_NODE* start_node, pcstr path, int index, pcstr attrib, float default_flt_val)
317317{
318318 LPCSTR result_str = ReadAttrib (start_node, path, index, attrib, NULL );
319319
@@ -323,7 +323,7 @@ float XMLDocument::ReadAttribFlt(XML_NODE* start_node, LPCSTR path, int index, L
323323 return (float )atof (result_str);
324324}
325325
326- float XMLDocument::ReadAttribFlt (XML_NODE* node, LPCSTR attrib, float default_flt_val)
326+ float XMLDocument::ReadAttribFlt (XML_NODE* node, pcstr attrib, float default_flt_val)
327327{
328328 LPCSTR result_str = ReadAttrib (node, attrib, NULL );
329329
@@ -333,7 +333,7 @@ float XMLDocument::ReadAttribFlt(XML_NODE* node, LPCSTR attrib, float default_fl
333333 return (float )atof (result_str);
334334}
335335
336- int XMLDocument::GetNodesNum (LPCSTR path, int index, LPCSTR tag_name)
336+ int XMLDocument::GetNodesNum (pcstr path, int index, pcstr tag_name)
337337{
338338 XML_NODE* node = NULL ;
339339
@@ -354,7 +354,7 @@ int XMLDocument::GetNodesNum(LPCSTR path, int index, LPCSTR tag_name)
354354 return GetNodesNum (node, tag_name);
355355}
356356
357- int XMLDocument::GetNodesNum (XML_NODE* node, LPCSTR tag_name)
357+ int XMLDocument::GetNodesNum (XML_NODE* node, pcstr tag_name)
358358{
359359 if (node == NULL )
360360 return 0 ;
@@ -382,15 +382,15 @@ int XMLDocument::GetNodesNum(XML_NODE* node, LPCSTR tag_name)
382382
383383// нахождение элемнета по его атрибуту
384384XML_NODE* XMLDocument::SearchForAttribute (
385- LPCSTR path, int index, LPCSTR tag_name, LPCSTR attrib, LPCSTR attrib_value_pattern)
385+ pcstr path, int index, pcstr tag_name, pcstr attrib, pcstr attrib_value_pattern)
386386{
387387 XML_NODE* start_node = NavigateToNode (path, index);
388388 XML_NODE* result = SearchForAttribute (start_node, tag_name, attrib, attrib_value_pattern);
389389 return result;
390390}
391391
392392XML_NODE* XMLDocument::SearchForAttribute (
393- XML_NODE* start_node, LPCSTR tag_name, LPCSTR attrib, LPCSTR attrib_value_pattern)
393+ XML_NODE* start_node, pcstr tag_name, pcstr attrib, pcstr attrib_value_pattern)
394394{
395395 while (start_node)
396396 {
@@ -419,7 +419,7 @@ XML_NODE* XMLDocument::SearchForAttribute(
419419
420420#ifdef DEBUG // debug & mixed
421421
422- LPCSTR XMLDocument::CheckUniqueAttrib (XML_NODE* start_node, LPCSTR tag_name, LPCSTR attrib_name)
422+ pcstr XMLDocument::CheckUniqueAttrib (XML_NODE* start_node, pcstr tag_name, pcstr attrib_name)
423423{
424424 m_AttribValues.clear_not_free ();
425425
0 commit comments