summaryrefslogtreecommitdiff
path: root/cpp/src/slice2js/JsUtil.h
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2018-10-16 00:53:00 +0200
committerJose <jose@zeroc.com>2018-10-16 00:53:00 +0200
commitcf8292f9cdadcb6619287ada4f5273c25c5a3cfb (patch)
tree4a227f287d2a5e22e36b1f488f00a3c96add7a44 /cpp/src/slice2js/JsUtil.h
parentUpdated VS2017 requirement (diff)
downloadice-cf8292f9cdadcb6619287ada4f5273c25c5a3cfb.tar.bz2
ice-cf8292f9cdadcb6619287ada4f5273c25c5a3cfb.tar.xz
ice-cf8292f9cdadcb6619287ada4f5273c25c5a3cfb.zip
Typescript support
Diffstat (limited to 'cpp/src/slice2js/JsUtil.h')
-rw-r--r--cpp/src/slice2js/JsUtil.h34
1 files changed, 30 insertions, 4 deletions
diff --git a/cpp/src/slice2js/JsUtil.h b/cpp/src/slice2js/JsUtil.h
index 69d9ad6e9c6..e56162a698d 100644
--- a/cpp/src/slice2js/JsUtil.h
+++ b/cpp/src/slice2js/JsUtil.h
@@ -16,20 +16,46 @@
namespace Slice
{
+std::string relativePath(const std::string&, const std::string&);
+
class JsGenerator : private ::IceUtil::noncopyable
{
public:
virtual ~JsGenerator() {};
-protected:
-
static bool isClassType(const TypePtr&);
+ static std::string getModuleMetadata(const TypePtr&);
+ static std::string getModuleMetadata(const ContainedPtr&);
static std::string fixId(const std::string&);
static std::string fixId(const ContainedPtr&);
- static std::string typeToString(const TypePtr&);
+ static bool findMetaData(const std::string&, const StringList&, std::string&);
+ static std::string importPrefix(const TypePtr&,
+ const ContainedPtr&,
+ const std::vector<std::pair<std::string, std::string>>&);
+
+ static std::string importPrefix(const ContainedPtr&,
+ const ContainedPtr&,
+ const std::vector<std::pair<std::string, std::string>>&);
+ static std::string importPrefix(const std::string&, const ContainedPtr&);
+
+ static std::string getUnqualified(const std::string&, const std::string&, const std::string&);
+
+ static std::string typeToString(const TypePtr&,
+ const ContainedPtr& = 0,
+ const std::vector<std::pair<std::string, std::string>>& =
+ std::vector<std::pair<std::string, std::string>>(),
+ bool typeScript = false,
+ bool definition = false);
+
+ static std::string typeToString(const TypePtr&,
+ const ContainedPtr&,
+ const std::vector<std::pair<std::string, std::string>>&,
+ bool typeScript,
+ bool definition,
+ bool usealias);
+
static std::string getLocalScope(const std::string&, const std::string& separator = ".");
- static std::string getReference(const std::string&, const std::string&);
static std::string getHelper(const TypePtr&);
//