diff options
author | Jose <jose@zeroc.com> | 2017-03-20 11:11:16 +0100 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2017-03-20 11:11:16 +0100 |
commit | 11c1140a8041b3dcdd79b9244422e56ebe8da10c (patch) | |
tree | 04cba9afe9ec7fb3e723ca45cb76afcfb5cc4885 /cpp/src/slice2cs/CsUtil.cpp | |
parent | Fixed (ICE-7678) - Python build failure with VS 2015 (diff) | |
download | ice-11c1140a8041b3dcdd79b9244422e56ebe8da10c.tar.bz2 ice-11c1140a8041b3dcdd79b9244422e56ebe8da10c.tar.xz ice-11c1140a8041b3dcdd79b9244422e56ebe8da10c.zip |
Update IceSSL::ConnectionInfo to use native certs and remove NativeConnectionInfo
Diffstat (limited to 'cpp/src/slice2cs/CsUtil.cpp')
-rw-r--r-- | cpp/src/slice2cs/CsUtil.cpp | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/cpp/src/slice2cs/CsUtil.cpp b/cpp/src/slice2cs/CsUtil.cpp index 9f442018932..b2cd8c4efe8 100644 --- a/cpp/src/slice2cs/CsUtil.cpp +++ b/cpp/src/slice2cs/CsUtil.cpp @@ -261,7 +261,7 @@ Slice::CsGenerator::getStaticId(const TypePtr& type) } string -Slice::CsGenerator::typeToString(const TypePtr& type, bool optional, bool local) +Slice::CsGenerator::typeToString(const TypePtr& type, bool optional, bool local, const StringList& metaData) { if(!type) { @@ -305,6 +305,19 @@ Slice::CsGenerator::typeToString(const TypePtr& type, bool optional, bool local) "Ice.Value" }; + if(local) + { + for(StringList::const_iterator i = metaData.begin(); i != metaData.end(); ++i) + { + const string clrType = "cs:type:"; + const string meta = *i; + if(meta.find(clrType) == 0) + { + return meta.substr(clrType.size()); + } + } + } + BuiltinPtr builtin = BuiltinPtr::dynamicCast(type); if(builtin) { @@ -2539,6 +2552,20 @@ Slice::CsGenerator::MetaDataVisitor::validate(const ContainedPtr& cont) } } } + else if(DataMemberPtr::dynamicCast(cont)) + { + DataMemberPtr dataMember = DataMemberPtr::dynamicCast(cont); + StructPtr st = StructPtr::dynamicCast(dataMember->container()); + ExceptionPtr ex = ExceptionPtr::dynamicCast(dataMember->container()); + ClassDefPtr cl = ClassDefPtr::dynamicCast(dataMember->container()); + bool isLocal = (st && st->isLocal()) || (ex && ex->isLocal()) || (cl && cl->isLocal()); + static const string csTypePrefix = csPrefix + "type:"; + if(isLocal && s.find(csTypePrefix) == 0) + { + newLocalMetaData.push_back(s); + continue; + } + } static const string csAttributePrefix = csPrefix + "attribute:"; static const string csTie = csPrefix + "tie"; |