Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
dynamic
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MostafaMollaali
dynamic
Commits
5580ab1d
Commit
5580ab1d
authored
5 years ago
by
Dmitri Naumov
Browse files
Options
Downloads
Patches
Plain Diff
[GL/IO] Remove unused XmlStnIF::rapidReadFile().
XmlStnInterface::rapidReadFile
parent
8dfd43c4
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
GeoLib/IO/XmlIO/Qt/XmlStnInterface.cpp
+2
-66
2 additions, 66 deletions
GeoLib/IO/XmlIO/Qt/XmlStnInterface.cpp
GeoLib/IO/XmlIO/Qt/XmlStnInterface.h
+0
-3
0 additions, 3 deletions
GeoLib/IO/XmlIO/Qt/XmlStnInterface.h
with
2 additions
and
69 deletions
GeoLib/IO/XmlIO/Qt/XmlStnInterface.cpp
+
2
−
66
View file @
5580ab1d
...
@@ -513,69 +513,5 @@ void XmlStnInterface::writeBoreholeData(QDomDocument &doc,
...
@@ -513,69 +513,5 @@ void XmlStnInterface::writeBoreholeData(QDomDocument &doc,
}
}
}
}
}
}
}
// namespace IO
int
XmlStnInterface
::
rapidReadFile
(
const
std
::
string
&
fileName
)
}
// namespace GeoLib
{
std
::
ifstream
in
(
fileName
.
c_str
());
if
(
in
.
fail
())
{
ERR
(
"XmlStnInterface::rapidReadFile(): Can't open xml-file %s."
,
fileName
.
c_str
());
return
0
;
}
// buffer file
in
.
seekg
(
0
,
std
::
ios
::
end
);
std
::
size_t
length
=
in
.
tellg
();
in
.
seekg
(
0
,
std
::
ios
::
beg
);
auto
*
buffer
=
new
char
[
length
+
1
];
in
.
read
(
buffer
,
length
);
buffer
[
in
.
gcount
()]
=
'\0'
;
in
.
close
();
// build DOM tree
rapidxml
::
xml_document
<>
doc
;
doc
.
parse
<
0
>
(
buffer
);
// parse content
if
(
std
::
string
(
doc
.
first_node
()
->
name
())
!=
"OpenGeoSysSTN"
)
{
ERR
(
"XmlStnInterface::readFile() - Unexpected XML root."
);
return
0
;
}
// iterate over all station lists
for
(
rapidxml
::
xml_node
<>*
station_list
=
doc
.
first_node
()
->
first_node
();
station_list
;
station_list
=
station_list
->
next_sibling
())
{
auto
stations
=
std
::
make_unique
<
std
::
vector
<
GeoLib
::
Point
*>>
();
std
::
string
stnName
(
"[NN]"
);
stnName
=
station_list
->
first_node
(
"name"
)
->
value
();
for
(
rapidxml
::
xml_node
<>*
list_item
=
station_list
->
first_node
();
list_item
;
list_item
=
list_item
->
next_sibling
())
{
std
::
string
b
(
list_item
->
name
());
if
(
b
==
"stations"
)
{
rapidReadStations
(
list_item
,
stations
.
get
(),
fileName
);
}
if
(
b
==
"boreholes"
)
{
rapidReadStations
(
list_item
,
stations
.
get
(),
fileName
);
}
}
if
(
!
stations
->
empty
())
{
_geo_objs
.
addStationVec
(
std
::
move
(
stations
),
stnName
);
}
}
doc
.
clear
();
delete
[]
buffer
;
return
1
;
}
}
// end namespace IO
}
// end namespace GeoLib
This diff is collapsed.
Click to expand it.
GeoLib/IO/XmlIO/Qt/XmlStnInterface.h
+
0
−
3
View file @
5580ab1d
...
@@ -44,9 +44,6 @@ public:
...
@@ -44,9 +44,6 @@ public:
return
readFile
(
QString
(
fname
.
c_str
()))
!=
0
;
return
readFile
(
QString
(
fname
.
c_str
()))
!=
0
;
}
}
/// Reads an xml-file using the RapidXML parser integrated in the source code (i.e. this function is usable without Qt)
int
rapidReadFile
(
const
std
::
string
&
fileName
);
protected
:
protected
:
bool
write
()
override
;
bool
write
()
override
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment