summaryrefslogtreecommitdiff
path: root/cpp/src/Transform/TransformUtil.cpp
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2003-10-21 22:25:48 +0000
committerMark Spruiell <mes@zeroc.com>2003-10-21 22:25:48 +0000
commit623184c101c904eb0d456d325d3ced4d4475d3ae (patch)
tree56a4d02eeb1f966ad1f17405a9c6b2fe84e804e0 /cpp/src/Transform/TransformUtil.cpp
parentFreeze Index Windows port (diff)
downloadice-623184c101c904eb0d456d325d3ced4d4475d3ae.tar.bz2
ice-623184c101c904eb0d456d325d3ced4d4475d3ae.tar.xz
ice-623184c101c904eb0d456d325d3ced4d4475d3ae.zip
initial check-in
Diffstat (limited to 'cpp/src/Transform/TransformUtil.cpp')
-rw-r--r--cpp/src/Transform/TransformUtil.cpp33
1 files changed, 33 insertions, 0 deletions
diff --git a/cpp/src/Transform/TransformUtil.cpp b/cpp/src/Transform/TransformUtil.cpp
new file mode 100644
index 00000000000..e2f835115a3
--- /dev/null
+++ b/cpp/src/Transform/TransformUtil.cpp
@@ -0,0 +1,33 @@
+// **********************************************************************
+//
+// Copyright (c) 2003
+// ZeroC, Inc.
+// Billerica, MA, USA
+//
+// All Rights Reserved.
+//
+// Ice is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License version 2 as published by
+// the Free Software Foundation.
+//
+// **********************************************************************
+
+#include <Transform/TransformUtil.h>
+
+using namespace std;
+
+string
+Transform::typeName(const Slice::TypePtr& type)
+{
+ Slice::BuiltinPtr b = Slice::BuiltinPtr::dynamicCast(type);
+ if(b)
+ {
+ return b->kindAsString();
+ }
+ else
+ {
+ Slice::ContainedPtr c = Slice::ContainedPtr::dynamicCast(type);
+ assert(c);
+ return c->scoped();
+ }
+}