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 /php/src/IcePHP/Profile.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 'php/src/IcePHP/Profile.cpp')
-rw-r--r-- | php/src/IcePHP/Profile.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/php/src/IcePHP/Profile.cpp b/php/src/IcePHP/Profile.cpp index 5d00cef2494..84a9c2c22ba 100644 --- a/php/src/IcePHP/Profile.cpp +++ b/php/src/IcePHP/Profile.cpp @@ -1126,7 +1126,16 @@ IcePHP::CodeVisitor::visitOperation(const Slice::OperationPtr& p) void IcePHP::CodeVisitor::visitDataMember(const Slice::DataMemberPtr& p) { - _out << "public $" << fixIdent(p->name()) << ';' << endl; + Slice::ContainedPtr cont = Slice::ContainedPtr::dynamicCast(p->container()); + assert(cont); + if(Slice::ClassDefPtr::dynamicCast(cont) && (cont->hasMetaData("protected") || p->hasMetaData("protected"))) + { + _out << "protected $" << fixIdent(p->name()) << ';' << endl; + } + else + { + _out << "public $" << fixIdent(p->name()) << ';' << endl; + } } void |