Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
ogs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
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
Karsten Rink
ogs
Commits
bb41eedf
Commit
bb41eedf
authored
9 years ago
by
Tom Fischer
Browse files
Options
Downloads
Patches
Plain Diff
[GL] Dynamic type checks for classes Station and Borehole.
parent
28685c8f
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
GeoLib/Station.cpp
+6
-0
6 additions, 0 deletions
GeoLib/Station.cpp
GeoLib/Station.h
+1
-0
1 addition, 0 deletions
GeoLib/Station.h
GeoLib/StationBorehole.cpp
+8
-0
8 additions, 0 deletions
GeoLib/StationBorehole.cpp
GeoLib/StationBorehole.h
+3
-0
3 additions, 0 deletions
GeoLib/StationBorehole.h
with
18 additions
and
0 deletions
GeoLib/Station.cpp
+
6
−
0
View file @
bb41eedf
...
...
@@ -75,5 +75,11 @@ Station* Station::createStation(const std::string &name, double x, double y, dou
return
station
;
}
bool
isStation
(
GeoLib
::
Point
const
*
pnt
)
{
GeoLib
::
Station
const
*
bh
(
dynamic_cast
<
GeoLib
::
Station
const
*>
(
pnt
));
return
bh
!=
nullptr
;
}
}
// namespace
This diff is collapsed.
Click to expand it.
GeoLib/Station.h
+
1
−
0
View file @
bb41eedf
...
...
@@ -103,6 +103,7 @@ private:
};
bool
isStation
(
GeoLib
::
Point
const
*
pnt
);
}
// namespace
#endif // GEO_STATION_H
This diff is collapsed.
Click to expand it.
GeoLib/StationBorehole.cpp
+
8
−
0
View file @
bb41eedf
...
...
@@ -292,4 +292,12 @@ void StationBorehole::addSoilLayer ( double x, double y, double z, const std::st
_profilePntVec
.
push_back
(
new
Point
(
x
,
y
,
z
));
_soilName
.
push_back
(
soil_name
);
}
bool
isBorehole
(
GeoLib
::
Point
const
*
pnt
)
{
GeoLib
::
StationBorehole
const
*
bh
(
dynamic_cast
<
GeoLib
::
StationBorehole
const
*>
(
pnt
));
return
bh
!=
nullptr
;
}
}
// namespace
This diff is collapsed.
Click to expand it.
GeoLib/StationBorehole.h
+
3
−
0
View file @
bb41eedf
...
...
@@ -116,6 +116,9 @@ private:
/// Contains the points for the lower boundaries of all layers
std
::
vector
<
Point
*>
_profilePntVec
;
};
bool
isBorehole
(
GeoLib
::
Point
const
*
pnt
);
}
// namespace
#endif // GEO_STATIONBOREHOLE_H
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