summaryrefslogtreecommitdiff
path: root/cpp/src/slice2php/Main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/slice2php/Main.cpp')
-rw-r--r--cpp/src/slice2php/Main.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/cpp/src/slice2php/Main.cpp b/cpp/src/slice2php/Main.cpp
index e5cb1ba7654..dd7b6f66159 100644
--- a/cpp/src/slice2php/Main.cpp
+++ b/cpp/src/slice2php/Main.cpp
@@ -20,6 +20,7 @@
#include <Slice/Preprocessor.h>
#include <Slice/FileTracker.h>
#include <Slice/PHPUtil.h>
+#include <Slice/Parser.h>
#include <Slice/Util.h>
#include <cstring>
#include <climits>
@@ -41,6 +42,22 @@ using namespace Slice::PHP;
using namespace IceUtil;
using namespace IceUtilInternal;
+namespace
+{
+
+//
+// Get the fully-qualified name of the given definition. If a suffix is provided,
+// it is prepended to the definition's unqualified name. If the nameSuffix
+// is provided, it is appended to the container's name.
+//
+string
+getAbsolute(const ContainedPtr& cont, bool ns, const string& pfx = std::string(), const string& suffix = std::string())
+{
+ return scopedToName(cont->scope() + pfx + cont->name() + suffix, ns);
+}
+
+}
+
//
// CodeVisitor generates the PHP mapping for a translation unit.
//