summaryrefslogtreecommitdiff
path: root/TAO/tao/PortableServer
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2017-12-01 15:33:24 +0100
committerJohnny Willemsen <jwillemsen@remedy.nl>2017-12-01 15:33:24 +0100
commitca4cc89f788025e0405fbd649035753c42d930ef (patch)
tree06951910e0d0e6db03e2b8220bc4a56f6280a93a /TAO/tao/PortableServer
parentd79eac1fee4f07bc60fa0c61d37bbff8c3f637cb (diff)
downloadATCD-ca4cc89f788025e0405fbd649035753c42d930ef.tar.gz
Put back protected copy/assignment
* TAO/tao/PortableServer/Servant_Base.cpp: * TAO/tao/PortableServer/Servant_Base.h:
Diffstat (limited to 'TAO/tao/PortableServer')
-rw-r--r--TAO/tao/PortableServer/Servant_Base.cpp17
-rw-r--r--TAO/tao/PortableServer/Servant_Base.h15
2 files changed, 24 insertions, 8 deletions
diff --git a/TAO/tao/PortableServer/Servant_Base.cpp b/TAO/tao/PortableServer/Servant_Base.cpp
index 168697e5179..e0fb3cb406d 100644
--- a/TAO/tao/PortableServer/Servant_Base.cpp
+++ b/TAO/tao/PortableServer/Servant_Base.cpp
@@ -64,6 +64,23 @@ TAO_ServantBase::TAO_ServantBase (TAO_Operation_Table* optable)
{
}
+TAO_ServantBase::TAO_ServantBase (const TAO_ServantBase &rhs)
+ : TAO_Abstract_ServantBase ()
+ , ref_count_ (1)
+ , optable_ (rhs.optable_)
+{
+}
+
+TAO_ServantBase &
+TAO_ServantBase::operator= (const TAO_ServantBase &rhs)
+{
+ if (this != &rhs)
+ {
+ this->optable_ = rhs.optable_;
+ }
+ return *this;
+}
+
TAO_ServantBase::~TAO_ServantBase (void)
{
}
diff --git a/TAO/tao/PortableServer/Servant_Base.h b/TAO/tao/PortableServer/Servant_Base.h
index 6ada4fa3e7a..6de277edbe6 100644
--- a/TAO/tao/PortableServer/Servant_Base.h
+++ b/TAO/tao/PortableServer/Servant_Base.h
@@ -184,9 +184,15 @@ public:
protected:
- /// Constructor, only derived classes can be created.
+ /// Default constructor, only derived classes can be created.
explicit TAO_ServantBase (TAO_Operation_Table* optable = 0);
+ /// Copy constructor, protected so no instances can be created.
+ TAO_ServantBase (const TAO_ServantBase &);
+
+ /// Assignment operator.
+ TAO_ServantBase &operator= (const TAO_ServantBase &);
+
void synchronous_upcall_dispatch (
TAO_ServerRequest & req,
TAO::Portable_Server::Servant_Upcall* servant_upcall,
@@ -197,13 +203,6 @@ protected:
TAO::Portable_Server::Servant_Upcall* servant_upcall,
TAO_ServantBase *derived_this);
-private:
- /// Copy constructor, private so no instances can be created.
- TAO_ServantBase (const TAO_ServantBase &);
-
- /// Assignment operator.
- TAO_ServantBase &operator= (const TAO_ServantBase &);
-
protected:
/// Reference counter.
ACE_Atomic_Op<TAO_SYNCH_MUTEX, unsigned long> ref_count_;