diff options
author | Mark Spruiell <mes@zeroc.com> | 2007-06-19 11:25:17 -0700 |
---|---|---|
committer | Mark Spruiell <mes@zeroc.com> | 2007-06-19 11:25:17 -0700 |
commit | ddcfe70b4f05fb00e466486fc19076147f79298d (patch) | |
tree | acfa4428263b22b3f9226d04a3fe8f910bd21bdd /cpp/src/slice2vb/Gen.cpp | |
parent | For UDP multicast bind to the multicast address rather than 0.0.0.0 unless on... (diff) | |
download | ice-ddcfe70b4f05fb00e466486fc19076147f79298d.tar.bz2 ice-ddcfe70b4f05fb00e466486fc19076147f79298d.tar.xz ice-ddcfe70b4f05fb00e466486fc19076147f79298d.zip |
bug 2245 - adding support for protected class data members
Diffstat (limited to 'cpp/src/slice2vb/Gen.cpp')
-rwxr-xr-x | cpp/src/slice2vb/Gen.cpp | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/cpp/src/slice2vb/Gen.cpp b/cpp/src/slice2vb/Gen.cpp index 2cbb6103d1c..043148e2eac 100755 --- a/cpp/src/slice2vb/Gen.cpp +++ b/cpp/src/slice2vb/Gen.cpp @@ -3373,6 +3373,7 @@ Slice::Gen::TypesVisitor::visitDataMember(const DataMemberPtr& p) bool isClass = false; bool propertyMapping = false; bool isValue = false; + bool isProtected = false; ContainedPtr cont = ContainedPtr::dynamicCast(p->container()); assert(cont); if(StructPtr::dynamicCast(cont)) @@ -3399,6 +3400,7 @@ Slice::Gen::TypesVisitor::visitDataMember(const DataMemberPtr& p) { propertyMapping = true; } + isProtected = cont->hasMetaData("protected") || p->hasMetaData("protected"); } _out << sp; @@ -3414,14 +3416,28 @@ Slice::Gen::TypesVisitor::visitDataMember(const DataMemberPtr& p) dataMemberName += "_prop"; } - _out << nl << (propertyMapping ? "Private" : "Public") << ' ' << dataMemberName << " As " << type; + _out << nl; + if(propertyMapping) + { + _out << "Private"; + } + else if(isProtected) + { + _out << "Protected"; + } + else + { + _out << "Public"; + } + + _out << ' ' << dataMemberName << " As " << type; if(!propertyMapping) { return; } - _out << nl << "Public"; + _out << nl << (isProtected ? "Protected" : "Public"); if(!isValue) { _out << " Overridable"; |