summaryrefslogtreecommitdiff
path: root/cpp/src/slice2vb/Gen.cpp
diff options
context:
space:
mode:
authorMichi Henning <michi@zeroc.com>2006-02-14 04:16:41 +0000
committerMichi Henning <michi@zeroc.com>2006-02-14 04:16:41 +0000
commit761ef1f4ddf4069f702ec99c377faa2d7b2a0694 (patch)
tree14a6c6a715b962043cfb3cbe5807f28714335a6d /cpp/src/slice2vb/Gen.cpp
parentBug 853. (diff)
downloadice-761ef1f4ddf4069f702ec99c377faa2d7b2a0694.tar.bz2
ice-761ef1f4ddf4069f702ec99c377faa2d7b2a0694.tar.xz
ice-761ef1f4ddf4069f702ec99c377faa2d7b2a0694.zip
Changed slice2cs and slice2vb to allow "clr:property" for all structs. It's
more consistent that way.
Diffstat (limited to 'cpp/src/slice2vb/Gen.cpp')
-rwxr-xr-xcpp/src/slice2vb/Gen.cpp16
1 files changed, 13 insertions, 3 deletions
diff --git a/cpp/src/slice2vb/Gen.cpp b/cpp/src/slice2vb/Gen.cpp
index 2568b0283f2..e9007cb2130 100755
--- a/cpp/src/slice2vb/Gen.cpp
+++ b/cpp/src/slice2vb/Gen.cpp
@@ -3255,11 +3255,16 @@ Slice::Gen::TypesVisitor::visitDataMember(const DataMemberPtr& p)
int baseTypes = 0;
bool isClass = false;
bool propertyMapping = false;
+ bool isValue = false;
ContainedPtr cont = ContainedPtr::dynamicCast(p->container());
assert(cont);
- if(StructPtr::dynamicCast(cont) && cont->hasMetaData("clr:class"))
+ if(StructPtr::dynamicCast(cont))
{
- baseTypes = DotNet::ICloneable;
+ isValue = isValueType(StructPtr::dynamicCast(cont));
+ if(!isValue || cont->hasMetaData("clr:class"))
+ {
+ baseTypes = DotNet::ICloneable;
+ }
if(cont->hasMetaData("clr:property"))
{
propertyMapping = true;
@@ -3297,7 +3302,12 @@ Slice::Gen::TypesVisitor::visitDataMember(const DataMemberPtr& p)
return;
}
- _out << nl << "Public Overridable Property " << propertyName << " As " << type;
+ _out << nl << "Public";
+ if(!isValue)
+ {
+ _out << " Overridable";
+ }
+ _out << " Property " << propertyName << " As " << type;
_out.inc();
_out << nl << "Get";
_out.inc();