diff options
Diffstat (limited to 'cpp/src/Transform/TransformUtil.cpp')
-rw-r--r-- | cpp/src/Transform/TransformUtil.cpp | 33 |
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(); + } +} |