diff options
author | Jose <jose@zeroc.com> | 2019-10-10 21:35:54 +0200 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2019-10-10 21:52:59 +0200 |
commit | 28a1cc3857486ffc0a29776fc273b110f2ee37c4 (patch) | |
tree | 8ea1889f4ea8d2659b6c5023e97e93f80263292e /cpp/src/slice2swift/SwiftUtil.h | |
parent | Remove synchronization from getCachedSwiftObject (diff) | |
download | ice-28a1cc3857486ffc0a29776fc273b110f2ee37c4.tar.bz2 ice-28a1cc3857486ffc0a29776fc273b110f2ee37c4.tar.xz ice-28a1cc3857486ffc0a29776fc273b110f2ee37c4.zip |
Improve swift metadata validation
Diffstat (limited to 'cpp/src/slice2swift/SwiftUtil.h')
-rw-r--r-- | cpp/src/slice2swift/SwiftUtil.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/cpp/src/slice2swift/SwiftUtil.h b/cpp/src/slice2swift/SwiftUtil.h index 2265ba15ae6..d52783a067f 100644 --- a/cpp/src/slice2swift/SwiftUtil.h +++ b/cpp/src/slice2swift/SwiftUtil.h @@ -106,7 +106,7 @@ protected: std::string modeToString(Operation::Mode); std::string getOptionalFormat(const TypePtr&); - bool isNullableType(const TypePtr&); + static bool isNullableType(const TypePtr&); bool isProxyType(const TypePtr&); bool isClassType(const TypePtr&); @@ -152,6 +152,7 @@ private: virtual bool visitModuleStart(const ModulePtr&); virtual bool visitClassDefStart(const ClassDefPtr&); + virtual void visitOperation(const OperationPtr&); virtual bool visitExceptionStart(const ExceptionPtr&); virtual bool visitStructStart(const StructPtr&); virtual void visitSequence(const SequencePtr&); @@ -161,7 +162,10 @@ private: private: - void validate(const ContainedPtr&); + StringList validate(const SyntaxTreeBasePtr&, const StringList&, + const std::string&, const std::string&, + bool local = false, + bool operationParameter = false); typedef std::map<std::string, std::string> ModuleMap; typedef std::map<std::string, ModuleMap> ModulePrefix; |