diff options
author | Michi Henning <michi@zeroc.com> | 2004-06-10 06:51:42 +0000 |
---|---|---|
committer | Michi Henning <michi@zeroc.com> | 2004-06-10 06:51:42 +0000 |
commit | d69d895ad04736c39638239b6160f1a36464b3d5 (patch) | |
tree | 5b7bd31995d56be7da6603090dd65a58d7e659f8 /cpp/src/Slice/CsUtil.cpp | |
parent | Tidied up C# code generation. Changed default sequence mapping to array (diff) | |
download | ice-d69d895ad04736c39638239b6160f1a36464b3d5.tar.bz2 ice-d69d895ad04736c39638239b6160f1a36464b3d5.tar.xz ice-d69d895ad04736c39638239b6160f1a36464b3d5.zip |
Changed the code generator to map Slice structures to C# structures by
default, with mapping to C# classes enable with metadata. Added new
patching scheme for structures because, for value types, the existing
patching scheme was unsuitable.
Diffstat (limited to 'cpp/src/Slice/CsUtil.cpp')
-rwxr-xr-x | cpp/src/Slice/CsUtil.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/cpp/src/Slice/CsUtil.cpp b/cpp/src/Slice/CsUtil.cpp index ad73b92ba51..d6fd145a346 100755 --- a/cpp/src/Slice/CsUtil.cpp +++ b/cpp/src/Slice/CsUtil.cpp @@ -204,6 +204,11 @@ Slice::CsGenerator::isValueType(const TypePtr& type) } } } + StructPtr s = StructPtr::dynamicCast(type); + if(s) + { + return !s->hasMetaData("cs:class"); + } if(EnumPtr::dynamicCast(type)) { return true; @@ -873,6 +878,13 @@ Slice::CsGenerator::MetaDataVisitor::validate(const ContainedPtr& cont) continue; } } + if(StructPtr::dynamicCast(cont)) + { + if(s.substr(prefix.size()) == "class") + { + continue; + } + } cout << file << ": warning: ignoring invalid metadata `" << s << "'" << endl; } _history.insert(s); |