summaryrefslogtreecommitdiff
path: root/cpp/src/Slice/Parser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/Slice/Parser.cpp')
-rw-r--r--cpp/src/Slice/Parser.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/cpp/src/Slice/Parser.cpp b/cpp/src/Slice/Parser.cpp
index 0277dd28607..87bfa29c765 100644
--- a/cpp/src/Slice/Parser.cpp
+++ b/cpp/src/Slice/Parser.cpp
@@ -327,6 +327,18 @@ Slice::Contained::scope() const
}
string
+Slice::Contained::flattenedScope() const
+{
+ string s = scope();
+ string flattenedScope;
+ for(string::const_iterator r = s.begin(); r != s.end(); ++r)
+ {
+ flattenedScope += ((*r) == ':') ? '_' : *r;
+ }
+ return flattenedScope;
+}
+
+string
Slice::Contained::file() const
{
return _file;