summaryrefslogtreecommitdiff
path: root/TAO
diff options
context:
space:
mode:
authorschmidt <douglascraigschmidt@users.noreply.github.com>1999-02-20 03:43:04 +0000
committerschmidt <douglascraigschmidt@users.noreply.github.com>1999-02-20 03:43:04 +0000
commit60dd5fd0dee7fa29ce58db1da555f5227a164fb4 (patch)
tree20029a90ee54618093d62ec84bfece914cf45754 /TAO
parent0967a255aabed79c8a1f451550d316da92745601 (diff)
downloadATCD-60dd5fd0dee7fa29ce58db1da555f5227a164fb4.tar.gz
.
Diffstat (limited to 'TAO')
-rw-r--r--TAO/tao/IIOP_Transport.h2
-rw-r--r--TAO/tao/InconsistentTypeCodeC.h36
-rw-r--r--TAO/tao/MProfile.cpp73
-rw-r--r--TAO/tao/MProfile.h62
-rw-r--r--TAO/tao/MProfile.i132
-rw-r--r--TAO/tao/Pluggable.cpp80
-rw-r--r--TAO/tao/Pluggable.h182
-rw-r--r--TAO/tao/try_macros.h2
-rw-r--r--TAO/tao/varout.cpp3
-rw-r--r--TAO/tao/varout.h48
10 files changed, 333 insertions, 287 deletions
diff --git a/TAO/tao/IIOP_Transport.h b/TAO/tao/IIOP_Transport.h
index 7515d9446ba..8b6391a20ba 100644
--- a/TAO/tao/IIOP_Transport.h
+++ b/TAO/tao/IIOP_Transport.h
@@ -13,7 +13,7 @@
// IIOP Transport specific processing
//
// = AUTHOR
-// Fred Kuhns
+// Fred Kuhns <fredk@cs.wustl.edu>
//
// ============================================================================
diff --git a/TAO/tao/InconsistentTypeCodeC.h b/TAO/tao/InconsistentTypeCodeC.h
index 272828abbe6..4dafde9bf86 100644
--- a/TAO/tao/InconsistentTypeCodeC.h
+++ b/TAO/tao/InconsistentTypeCodeC.h
@@ -1,5 +1,6 @@
/* -*- C++ -*- */
// $Id$
+
// ============================================================================
//
// = LIBRARY
@@ -17,7 +18,6 @@
// Information on TAO is available at
// http://www.cs.wustl.edu/~schmidt/TAO.html
//
-//
// Modified by Jeff Parsons <jp4@cs.wustl.edu>
//
// ============================================================================
@@ -38,25 +38,31 @@
#if !defined (_CORBA_ORB_INCONSISTENTTYPECODE_CH_)
#define _CORBA_ORB_INCONSISTENTTYPECODE_CH_
- class TAO_Export CORBA_ORB_InconsistentTypeCode : public CORBA::UserException
- {
- public:
- CORBA_ORB_InconsistentTypeCode (void); // default ctor
- CORBA_ORB_InconsistentTypeCode (const CORBA_ORB_InconsistentTypeCode &); // copy ctor
- ~CORBA_ORB_InconsistentTypeCode (void); // dtor
-
- CORBA_ORB_InconsistentTypeCode &operator= (const CORBA_ORB_InconsistentTypeCode &);
-
- virtual void _raise (void);
+class TAO_Export CORBA_ORB_InconsistentTypeCode : public CORBA::UserException
+{
+ // = TITLE
+ // @@ Jeff, please fill in here.
+ //
+ // = DESCRIPTION
+ // @@ Jeff, please fill in here.
+public:
+ CORBA_ORB_InconsistentTypeCode (void);
+ // default ctor
+ CORBA_ORB_InconsistentTypeCode (const CORBA_ORB_InconsistentTypeCode &);
+ // copy ctor
+ ~CORBA_ORB_InconsistentTypeCode (void);
+ // dtor
- static CORBA_ORB_InconsistentTypeCode *_narrow (CORBA::Exception *);
+ CORBA_ORB_InconsistentTypeCode &operator= (const CORBA_ORB_InconsistentTypeCode &);
+ virtual void _raise (void);
- // = TAO extension
- static CORBA::Exception *_alloc (void);
+ static CORBA_ORB_InconsistentTypeCode *_narrow (CORBA::Exception *);
- }; // exception CORBA::ORB::InconsistentTypeCode
+ // = TAO extension
+ static CORBA::Exception *_alloc (void);
+};
#endif /* end #if !defined */
diff --git a/TAO/tao/MProfile.cpp b/TAO/tao/MProfile.cpp
index 27a06dfbed2..61028db5860 100644
--- a/TAO/tao/MProfile.cpp
+++ b/TAO/tao/MProfile.cpp
@@ -17,42 +17,39 @@ TAO_MProfile::set (CORBA::ULong sz)
{
// We do, so release all of our profiles.
for (TAO_PHandle h = 0; h < this->size_; h++ )
- {
- if (this->pfiles_[h])
- {
- this->pfiles_[h]->_decr_refcnt ();
- this->pfiles_[h] = 0;
- }
- }
+ if (this->pfiles_[h])
+ {
+ this->pfiles_[h]->_decr_refcnt ();
+ this->pfiles_[h] = 0;
+ }
- if (size_)
+ if (this->size_)
delete [] this->pfiles_;
- if (fwded_mprofile_)
- delete fwded_mprofile_;
+ if (this->fwded_mprofile_)
+ delete this->fwded_mprofile_;
- pfiles_ = 0;
- current_ = 0;
- size_ = 0;
- last_= 0;
+ this->pfiles_ = 0;
+ this->current_ = 0;
+ this->size_ = 0;
+ this->last_= 0;
- return 0;
- }
+ return 0;
+ }
- // see if we already have an existing profile list
- // or if we need to get ridof what we have
+ // See if we already have an existing profile list or if we need to
+ // get ridof what we have.
+ // @@ Fred, please be consistent with your use of this-> as a prefix
+ // for data members.
if (size_)
{
-
// We do, so release all of our profiles.
for (TAO_PHandle h = 0; h < size_; h++)
- {
- if (this->pfiles_[h])
- {
- this->pfiles_[h]->_decr_refcnt ();
- this->pfiles_[h] = 0;
- }
- }
+ if (this->pfiles_[h])
+ {
+ this->pfiles_[h]->_decr_refcnt ();
+ this->pfiles_[h] = 0;
+ }
// Next see if we can reuse our profile list memory Since
if (this->size_ != sz)
@@ -61,22 +58,20 @@ TAO_MProfile::set (CORBA::ULong sz)
delete [] this->pfiles_;
ACE_NEW_RETURN (this->pfiles_,
- TAO_Profile_ptr [sz],
+ TAO_Profile_ptr[sz],
-1);
}
}
else
- {
- // first time, initialize!
- ACE_NEW_RETURN (this->pfiles_,
- TAO_Profile_ptr [sz],
- -1);
- } // this->pfiles_
+ // first time, initialize!
+ ACE_NEW_RETURN (this->pfiles_,
+ TAO_Profile_ptr [sz],
+ -1);
+ // this->pfiles_
ACE_OS::memset (this->pfiles_,
0,
sizeof (TAO_Profile_ptr) * sz);
-
size_ = sz;
this->last_ = 0;
this->current_ = 0;
@@ -95,7 +90,7 @@ TAO_MProfile::set (TAO_MProfile *mprofile)
// this->size_. This is so we can use set () to trim a profile
// list!!
- if (! mprofile)
+ if (mprofile == 0)
return this->set ((CORBA::ULong) 0);
this->set (mprofile->last_);
@@ -103,7 +98,7 @@ TAO_MProfile::set (TAO_MProfile *mprofile)
// set indexes ...
this->last_ = mprofile->last_;
- // these are set in set (ULong);
+ // These are set in set (ULong);
// this->current_ = 0;
// this->fwded_mprofile_ = 0;
@@ -115,12 +110,10 @@ TAO_MProfile::set (TAO_MProfile *mprofile)
this->pfiles_[h] = mprofile->pfiles_[h];
this->pfiles_[h]->_incr_refcnt ();
}
- } // for (TAO_PHandle ...)
+ }
if (mprofile->fwded_mprofile_)
- {
- this->fwded_mprofile_ = mprofile->fwded_mprofile_;
- }
+ this->fwded_mprofile_ = mprofile->fwded_mprofile_;
return 1;
}
diff --git a/TAO/tao/MProfile.h b/TAO/tao/MProfile.h
index 047244e432a..43c63c366b6 100644
--- a/TAO/tao/MProfile.h
+++ b/TAO/tao/MProfile.h
@@ -23,26 +23,23 @@
#include "tao/corbafwd.h"
class TAO_Profile;
-typedef TAO_Profile * TAO_Profile_ptr;
-// @@ Fred, please don't create global typedefs that aren't prefixed
-// by TAO_.
+typedef TAO_Profile *TAO_Profile_ptr;
typedef CORBA::ULong TAO_PHandle;
class TAO_Export TAO_MProfile
{
// = TITLE
- // TAO_MProfile
+ // This class implements the basic interface for supporting
+ // multiple profiles.
//
// = DESCRIPTION
- // this class implements the basic interface for supporting multiple
- // profiles. This can be treated either as a circular queue or a
- // linear array of profiles.
- //
- // It is assumed that locking will only be required when a profile list
- // is associated with a STUB_Object. Thus when the STUB_Object accepts
- // ownership of an MProfile it also assumes responsibility for controling
- // access (i.e. locking).
+ // Multiple profiles can be treated either as a circular queue or
+ // a linear array of profiles.
//
+ // It is assumed that locking will only be required when a profile
+ // list is associated with a STUB_Object. Thus when the
+ // STUB_Object accepts ownership of an MProfile it also assumes
+ // responsibility for controling access (i.e. locking).
public:
// = Initalization and termination methods.
TAO_MProfile (CORBA::ULong sz);
@@ -55,6 +52,8 @@ public:
// when their references (i.e. pointers) are copied.
int set (CORBA::ULong sz);
+ // @@ Fred, what does this method do?
+
int set (TAO_MProfile *mprofile);
// Inits this to the values of mprofile. NOTE: We use
// mprofile->last_ instead of mprofile->size_ to set this->size_.
@@ -70,14 +69,14 @@ public:
// Assume a circular list of profiles.
TAO_Profile_ptr get_prev (void);
- // Get previous profile, stop at beginning of list and return 0
+ // Get previous profile, stop at beginning of list and return 0.
TAO_Profile_ptr get_current_profile (void);
- // return a pointer to the current profile, will not increment
- // referecne pointer.
+ // Return a pointer to the current profile, will not increment
+ // reference pointer.
TAO_Profile_ptr get_profile (TAO_PHandle handle);
- // Return a pointer to the profile referenced by handle void
+ // Return a pointer to the profile referenced by handle void.
// rem_profile (TAO_PHandle handle); let's wait.
@@ -99,11 +98,18 @@ public:
// this object assumes ownership of this profile!!
void fwded_mprofile (TAO_MProfile *mprofiles);
+ // @@ Fred, can you please change the name of this method to
+ // "forwarded_mprofile()"? In general, it's better to use complete
+ // names.
+
// Set a pointer to the profile which was forwarded. NOTE, the
// forwarding profile *MUST* be set at object creation. And it can
// not be altered once it's set!
TAO_MProfile *fwded_mprofile (void);
+ // @@ Fred, can you please change the name of this method to
+ // "forwarded_mprofile()"? In general, it's better to use complete
+ // names.
// Returns a pointer to the profile which was forwarded.
CORBA::Boolean is_equivalent (TAO_MProfile *first,
@@ -113,25 +119,30 @@ public:
// is_equivalent with at least one profile in second. @@ FRED: The
// lost should be locked for this!
- CORBA::ULong hash (CORBA::ULong max, CORBA::Environment &env);
+ CORBA::ULong hash (CORBA::ULong max,
+ CORBA::Environment &env);
// @@ FRED: The list should be locked for this!
~TAO_MProfile (void);
// Deletes this object and decrements reference count on all
// references profiles!
+
protected:
TAO_Profile_ptr *pfiles (void) const;
- // return the complete list of profiles, this object retains ownership!
+ // return the complete list of profiles, this object retains
+ // ownership!
private:
- TAO_MProfile *fwded_mprofile_;
- // Used for chaning references when the current profile is forwarded.
- // Note, this will only be valid for an MProfile which contains a list of
- // fwd_profiles for some initial or base profile.
- // This is a backward reference to the profile list which received the
- // relocate message. The actual profile what was forwarded will be
- // fwded_mprofile_->get_current_profile ()
+ TAO_MProfile *fwded_mprofile_;
+ // @@ Fred, can you please change all "fwded" to "forwarded"?
+
+ // Used for chaining references when the current profile is
+ // forwarded. Note, this will only be valid for an MProfile which
+ // contains a list of fwd_profiles for some initial or base profile.
+ // This is a backward reference to the profile list which received
+ // the relocate message. The actual profile what was forwarded will
+ // be fwded_mprofile_->get_current_profile ()
TAO_Profile_ptr *pfiles_;
// Actual list of profiles.
@@ -151,4 +162,5 @@ private:
# include "tao/MProfile.i"
#endif /* __ACE_INLINE__ */
+// @@ Fred, please don't use #endif // ..., instead, always use #endif /* ... */
#endif // TAO_MPROFILE_H
diff --git a/TAO/tao/MProfile.i b/TAO/tao/MProfile.i
index 23457167b08..5407d1e3828 100644
--- a/TAO/tao/MProfile.i
+++ b/TAO/tao/MProfile.i
@@ -31,10 +31,8 @@ TAO_MProfile::~TAO_MProfile (void)
{
if (this->pfiles_)
for (TAO_PHandle h = 0; h < last_; h++)
- {
- if (this->pfiles_[h])
- this->pfiles_[h]->_decr_refcnt ();
- }
+ if (this->pfiles_[h])
+ this->pfiles_[h]->_decr_refcnt ();
delete [] pfiles_;
pfiles_ = 0;
@@ -43,8 +41,7 @@ TAO_MProfile::~TAO_MProfile (void)
// cyclic get next. It will simply cycle through the complete list.
-ACE_INLINE
-TAO_Profile *
+ACE_INLINE TAO_Profile *
TAO_MProfile::get_cnext (void)
{
if (last_ == 0)
@@ -53,131 +50,95 @@ TAO_MProfile::get_cnext (void)
if (current_ == last_)
current_ = 0;
- return pfiles_ [current_++];
-
- // was
- // return last_ == 0 ? 0 : ((current_ < last_) ? pfiles_ [current_++] :
- // pfiles_ [(current_ = 1, 0)]);
+ return pfiles_[current_++];
}
// This will return the next element until either null is found or the
// end of list. It then continues to return NULL until rewind.
-ACE_INLINE
-TAO_Profile *
+ACE_INLINE TAO_Profile *
TAO_MProfile::get_next (void)
{
// Nolist or EndOfList
if (last_ == 0 || current_ == last_)
return 0;
-
- return pfiles_ [current_++];
-
- // was
- // return last_ == 0 ? 0 : ((current_ == last_) ? 0 : pfiles_ [current_++]);
+ else
+ return pfiles_[current_++];
}
-ACE_INLINE
-TAO_Profile *
+ACE_INLINE TAO_Profile *
TAO_MProfile::get_cprev (void)
{
if (last_ == 0)
return 0;
-
- if (last_ == 1)
+ else if (last_ == 1)
current_=1;
else if (current_ > 1)
current_--;
else // current_ == 0 or 1, 0 => list never read before and == 1
current_ = last_;
-
- return pfiles_ [current_ - 1];
-
- // was
- // return last_ == 0 ? 0 :
- // (last_ == 1 ? pfiles_ [current_=0] :
- // (current_ > 1 ? pfiles_ [(--current_ - 1)] :
- // pfiles_ [(current_ = last_, last_ - 1)]));
+ else
+ return pfiles_[current_ - 1];
}
-ACE_INLINE
-TAO_Profile *
+ACE_INLINE TAO_Profile *
TAO_MProfile::get_prev (void)
{
if (last_ == 0 || current_ <= 1)
// No List of BeginningOfList
return 0;
-
- if (current_ > 1)
- {
- current_--;
- }
-
- return pfiles_ [current_ - 1];
-
- // was
- // return last_ == 0 ? 0 :
- // (current_ > 1 ? pfiles_ [--current_ - 1] :
- // (TAO_Profile *)(current_ = 0, 0));
+ else if (current_ > 1)
+ current_--;
+ else
+ return pfiles_[current_ - 1];
}
// does not affect the current_ setting!
-ACE_INLINE
-TAO_Profile *
+
+ACE_INLINE TAO_Profile *
TAO_MProfile::get_profile (TAO_PHandle handle)
{
if (handle < last_)
- return pfiles_ [handle];
-
- return 0;
+ return pfiles_[handle];
+ else
+ return 0;
}
-ACE_INLINE
-TAO_Profile *
+ACE_INLINE TAO_Profile *
TAO_MProfile::get_current_profile (void)
{
if (last_ == 0)
return 0;
-
- if (current_ == 0)
+ else if (current_ == 0)
// means list has not been read before.
current_ = 1;
-
- return pfiles_ [current_-1];
-
- // was
- // return current_ == 0 ? pfiles_ [current_] : pfiles_ [current_-1];
+ else
+ return pfiles_[current_ - 1];
}
-ACE_INLINE
-TAO_PHandle
+ACE_INLINE TAO_PHandle
TAO_MProfile::get_current_handle (void)
{
if (current_ > 0)
return current_ - 1;
-
- return 0;
-
- // was
- // return current_ > 0 ? (current_ - 1) : 0;
+ else
+ return 0;
}
-ACE_INLINE
-void
+ACE_INLINE void
TAO_MProfile::rewind (void)
{
current_ = 0;
}
-ACE_INLINE
-int
+ACE_INLINE int
TAO_MProfile::add_profile (TAO_Profile *pfile)
{
// skip by the used slots
if (last_ == size_) // full!
return -1;
- pfiles_ [last_++] = pfile;
+ pfiles_[last_++] = pfile;
if (pfile && pfile->_incr_refcnt () == 0)
ACE_ERROR_RETURN ((LM_ERROR,
@@ -186,56 +147,50 @@ TAO_MProfile::add_profile (TAO_Profile *pfile)
return last_ - 1;
}
-ACE_INLINE
-int
+ACE_INLINE int
TAO_MProfile::give_profile (TAO_Profile *pfile)
{
// skip by the used slots
if (last_ == size_) // full!
return -1;
- pfiles_ [last_++] = pfile;
+ pfiles_[last_++] = pfile;
return last_ - 1;
}
-ACE_INLINE
-void
+ACE_INLINE void
TAO_MProfile::fwded_mprofile (TAO_MProfile *fwded)
{
this->fwded_mprofile_ = fwded;
}
-ACE_INLINE
-TAO_MProfile *
+ACE_INLINE TAO_MProfile *
TAO_MProfile::fwded_mprofile (void)
{
return this->fwded_mprofile_;
}
-ACE_INLINE
-CORBA::ULong
+ACE_INLINE CORBA::ULong
TAO_MProfile::profile_count (void)
{
return this->last_;
}
-ACE_INLINE
-TAO_Profile_ptr *
+ACE_INLINE TAO_Profile_ptr *
TAO_MProfile::pfiles (void) const
{
return this->pfiles_;
}
-ACE_INLINE
-CORBA::Boolean
+ACE_INLINE CORBA::Boolean
TAO_MProfile::is_equivalent (TAO_MProfile *first,
TAO_MProfile *second,
CORBA::Environment &env)
{
- // Two profile lists are equivalent iff at least one of the
- // profiles form the first list is_equivalent to at least one
- // of the profiles from the second list!!
+ // Two profile lists are equivalent iff at least one of the profiles
+ // form the first list is_equivalent to at least one of the profiles
+ // from the second list!!
TAO_Profile_ptr *pfiles1 = first->pfiles ();
TAO_Profile_ptr *pfiles2 = second->pfiles ();
TAO_PHandle first_cnt = first->profile_count ();
@@ -249,8 +204,7 @@ TAO_MProfile::is_equivalent (TAO_MProfile *first,
return 0;
}
-ACE_INLINE
-CORBA::ULong
+ACE_INLINE CORBA::ULong
TAO_MProfile::hash (CORBA::ULong max, CORBA::Environment &env)
{
CORBA::ULong hashval = 0;
@@ -262,6 +216,6 @@ TAO_MProfile::hash (CORBA::ULong max, CORBA::Environment &env)
hashval += pfiles_[h]->hash (max, env);
// The above hash function return an ULong between 0 and max here we
- // simply take the average value and round
+ // simply take the average value and round.
return hashval / last_;
}
diff --git a/TAO/tao/Pluggable.cpp b/TAO/tao/Pluggable.cpp
index 766a2dd06f9..24b01dc43a2 100644
--- a/TAO/tao/Pluggable.cpp
+++ b/TAO/tao/Pluggable.cpp
@@ -18,12 +18,12 @@
#include "tao/Environment.h"
#include "tao/GIOP.h"
-TAO_Connector_Registry::TAO_Connector_Registry()
- : iiop_connector_(0)
+TAO_Connector_Registry::TAO_Connector_Registry (void)
+ : iiop_connector_ (0)
{
}
-TAO_Connector_Registry::~TAO_Connector_Registry()
+TAO_Connector_Registry::~TAO_Connector_Registry (void)
{
}
@@ -32,26 +32,28 @@ TAO_Connector_Registry::get_connector (CORBA::ULong tag)
{
// For now, only IIOP connectors.
if (tag != TAO_IOP_TAG_INTERNET_IOP)
- {
- ACE_DEBUG ((LM_DEBUG, "Invalid connector tag %d\n", tag));
- return 0;
- }
-
- return iiop_connector_;
+ ACE_ERROR_RETURN ((LM_ERROR,,
+ "Invalid connector tag %d\n",
+ tag),
+ 0);
+ else
+ return iiop_connector_;
}
CORBA::Boolean
TAO_Connector_Registry::add_connector (TAO_Connector *connector)
{
-
if (connector->tag() == TAO_IOP_TAG_INTERNET_IOP)
- {
- // do not copy, but save the reference (i.e. pointer)
- this->iiop_connector_ = connector;
- return 1;
- }
- ACE_DEBUG ((LM_DEBUG, "Invalid connector tag %d\n", connector->tag()));
- return 0;
+ {
+ // do not copy, but save the reference (i.e. pointer)
+ this->iiop_connector_ = connector;
+ return 1;
+ }
+ else
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "Invalid connector tag %d\n",
+ connector->tag ()),
+ 0);
}
int
@@ -60,7 +62,8 @@ TAO_Connector_Registry::open(TAO_Resource_Factory *trf, ACE_Reactor *reactor)
// @@ Once again since we only accept 1 iiop connector, this is easy
if (iiop_connector_)
return this->iiop_connector_->open (trf, reactor);
- return 0;
+ else
+ return 0;
}
int
@@ -74,53 +77,54 @@ TAO_Connector_Registry::close_all()
}
int
-TAO_Connector_Registry::preconnect (const char* the_preconnections)
+TAO_Connector_Registry::preconnect (const char *the_preconnections)
{
// It would be good to use auto_ptr<> to guard against premature
// termination and, thus, leaks.
int result=0;
char *preconnections = ACE_OS::strdup (the_preconnections);
- // @@ OK, what we should do is parse the string so that we can gather
- // @@ together addresses of the same protocol together and pass to the
- // @@ appropriate connector. But, for now we ASSUME they are all
- // @@ INET IP:Port!! HACK. fredk
+ // @@ OK, what we should do is parse the string so that we can
+ // gather @@ together addresses of the same protocol together and
+ // pass to the @@ appropriate connector. But, for now we ASSUME
+ // they are all @@ INET IP:Port!! HACK. fredk
if (this->iiop_connector_)
- result = this->iiop_connector_->preconnect(preconnections);
+ result = this->iiop_connector_->preconnect (preconnections);
ACE_OS::free (preconnections);
return result;
-
}
TAO_Profile *
TAO_Connector_Registry::connect (STUB_Object *&obj,
CORBA::Environment &env)
{
- TAO_Profile *profile;
CORBA::ULong req_tag = TAO_IOP_TAG_INTERNET_IOP;
+ TAO_Profile *profile = obj->get_fwd_profile ();
// @@ FRED _ For now still only support ONE profile!
- if (! (profile = obj->get_fwd_profile ()))
+ if (profile == 0)
profile = obj->profile_in_use ();
- // @@ And the profile selection policy is .... ONLY IIOP, and the
- // @@ first one found!
+ // @@ And the profile selection policy is .... ONLY IIOP, and the @@
+ // first one found!
if (profile->tag () != req_tag)
- {
- TAO_THROW_ENV_RETURN (CORBA::INTERNAL (CORBA::COMPLETED_NO), env, 0);
- }
+ TAO_THROW_ENV_RETURN (CORBA::INTERNAL (CORBA::COMPLETED_NO),
+ env,
+ 0);
// obj->set_profile_in_use (profile);
- // here is where we get the appropriate connector object
- // but we are the Connector Registry so call get_connector(tag)
+ // here is where we get the appropriate connector object but we are
+ // the Connector Registry so call get_connector(tag)
- TAO_Connector *connector = this->get_connector(req_tag);
+ TAO_Connector *connector =
+ this->get_connector (req_tag);
- TAO_Transport *transport = connector->connect(profile, env);
+ TAO_Transport *transport =
+ connector->connect (profile, env);
TAO_CHECK_ENV_RETURN (env, 0);
if (transport == 0)
@@ -155,13 +159,13 @@ Version::set_version (CORBA::Octet maj, CORBA::Octet min)
int
Version::operator== (const Version *&src)
{
- return (this->major == src->major && this->minor == src->minor);
+ return this->major == src->major && this->minor == src->minor;
}
int
Version::operator== (const Version &src)
{
- return (this->major == src.major && this->minor == src.minor);
+ return this->major == src.major && this->minor == src.minor;
}
Version &
diff --git a/TAO/tao/Pluggable.h b/TAO/tao/Pluggable.h
index a42befbb0c3..3c04e38a454 100644
--- a/TAO/tao/Pluggable.h
+++ b/TAO/tao/Pluggable.h
@@ -13,7 +13,7 @@
// Interface for the TAO pluggable protocol frameowrk.
//
// = AUTHOR
-// Fred Kuhns
+// Fred Kuhns <fredk@cs.wustl.edu>
//
// ============================================================================
@@ -32,24 +32,34 @@ class TAO_Profile;
class TAO_MProfile;
class TAO_Resource_Factory;
-// Generic definitions for the new Transport class.
-// NOTE, the transport object is created in the Service handler constructor
-// and delted in the service handlers destructor!!
-
class TAO_Export TAO_Transport
{
+ // = TITLE
+ // Generic definitions for the new Transport class.
+ //
+ // = DESCRIPTION
+ // The transport object is created in the Service handler
+ // constructor and deleted in the service handlers destructor!!
+
public:
virtual CORBA::ULong tag (void) = 0;
// The tag, each concrete class will have a specific tag value.
+ // @@ Fred, can you please add comments describing each of the
+ // following methods?
virtual int idle (void) = 0;
virtual void close_conn() = 0;
virtual void resume_conn (ACE_Reactor *reactor) = 0;
+ // @@ Fred, can you please add the ACE_Time_Value *s to the
+ // interfaces of send() and recv() in preparation for the timer
+ // support?
virtual ssize_t send (const ACE_Message_Block *mblk) = 0;
virtual ssize_t send (const u_char *buf, size_t len) = 0;
virtual ssize_t send (const iovec *iov, int iovcnt) = 0;
+ // @@ Fred, can you please call this "recv()" to be consistent with
+ // the "ACE way" of naming?
virtual ssize_t receive (char *buf, size_t len) = 0;
virtual ssize_t receive (iovec *iov, int iovcnt) = 0;
@@ -62,64 +72,89 @@ public:
// virtual int send_response (TAO_OutputCDR &response) = 0;
- virtual ACE_HANDLE handle(void) = 0;
- // this is primarily used for error and debugging messages!
+ virtual ACE_HANDLE handle (void) = 0;
+ // This is primarily used for error and debugging messages!
- virtual ~TAO_Transport(void);
+ virtual ~TAO_Transport (void);
};
-// Generic Profile definitions
class TAO_Export TAO_Profile
{
+ // = TITLE
+ // Generic Profile definitions.
+ // @@ Fred, please add more "meat" here.
+ //
+ // = DESCRIPTION
+ // @@ Fred, please fill in here.
public:
virtual CORBA::ULong tag (void) = 0;
// The tag, each concrete class will have a specific tag value.
virtual ASYS_TCHAR *addr_to_string(void) = 0;
+ // @@ Fred, please fill in here.
+
virtual int parse (TAO_InputCDR& cdr,
CORBA::Boolean& continue_decoding,
CORBA::Environment &env) = 0;
- virtual int parse_string (const char *string, CORBA::Environment &env) = 0;
+ // @@ Fred, please fill in here.
+
+ virtual int parse_string (const char *string,
+ CORBA::Environment &env) = 0;
// Parse the CDR encapsulation in <body>...
virtual CORBA::TypeCode::traverse_status encode (TAO_OutputCDR *&stream,
CORBA::Environment &env) = 0;
+ // @@ Fred, please fill in here.
virtual CORBA::String to_string (CORBA::Environment &env) = 0;
+ // @@ Fred, please fill in here.
- virtual const TAO_opaque& body (void) const = 0;
+ virtual const TAO_opaque &body (void) const = 0;
// The body, an octet sequence that represent the marshaled
- // profile...
+ // profile...
virtual TAO_ObjectKey *_key (CORBA::Environment &env) = 0;
+ // @@ Fred, please fill in here.
+
virtual const TAO_ObjectKey &object_key (void) const = 0;
// Obtain the object key, return 0 if the profile cannot be parsed.
// The memory is owned by this object (not given to the caller).
virtual ACE_Addr &object_addr (const ACE_Addr *addr) = 0;
+ // @@ Fred, please fill in here.
+
virtual ACE_Addr &object_addr (void) = 0;
+ // @@ Fred, please fill in here.
+
+ virtual TAO_Transport *transport (void) = 0;
+ // @@ Fred, please fill in here.
- virtual TAO_Transport *transport(void) = 0;
virtual TAO_Profile *_nil (void) = 0;
+ // @@ Fred, please fill in here.
virtual CORBA::ULong hash (CORBA::ULong max,
CORBA::Environment &env) = 0;
+ // @@ Fred, please fill in here.
virtual CORBA::Boolean is_equivalent (TAO_Profile* other_profile,
CORBA::Environment &env) = 0;
+ // @@ Fred, please fill in here.
virtual void reset_hint (void) = 0;
- // this methoid is used with a connection has been reset requiring the
- // hint to be cleaned up and reset to NULL.
+ // This methoid is used with a connection has been reset requiring
+ // the hint to be cleaned up and reset to NULL.
+ // @@ Fred, please rename this "forward_profiles".
virtual void fwd_profiles (TAO_MProfile *mprofiles) = 0;
- // object will assume ownership for this object!!
+ // Object will assume ownership for this object!!
+ // @@ Fred, please rename this "forward_profiles".
virtual TAO_MProfile *fwd_profiles (void) = 0;
- // this object keeps ownership of this object
+ // This object keeps ownership of this object.
+ // @@ Fred, please rename this "get_forward_profiles".
virtual TAO_MProfile *get_fwd_profiles (void) = 0;
- // copy of MProfile, user must delete.
+ // Copy of MProfile, user must delete.
virtual CORBA::ULong _incr_refcnt (void) = 0;
virtual CORBA::ULong _decr_refcnt (void) = 0;
@@ -130,29 +165,49 @@ protected:
};
-struct Version {
+class Version
+{
+ // = TITLE
+ // @@ Fred, please fill in here.
+ //
+ // = DESCRIPTION
+ // @@ Fred, please fill in here.
+public:
CORBA::Octet major;
+ // @@ Fred, please fill in here.
+
CORBA::Octet minor;
+ // @@ Fred, please fill in here.
Version (const Version &src);
- Version (CORBA::Octet maj = 0, CORBA::Octet min = 0);
+ // @@ Fred, please fill in here.
+ Version (CORBA::Octet maj = 0,
+ CORBA::Octet min = 0);
+ // @@ Fred, please fill in here.
~Version (void);
+ // @@ Fred, please fill in here.
void set_version (CORBA::Octet maj, CORBA::Octet min);
+ // @@ Fred, please fill in here.
Version &operator= (const Version &src);
+ // @@ Fred, please fill in here.
int operator== (const Version &src);
+ // @@ Fred, please fill in here.
int operator== (const Version *&src);
-
+ // @@ Fred, please fill in here.
};
-// End Profile
-
class TAO_Export TAO_Acceptor
{
- // TAOs Abstract Acceptor class used for pluggable protocols.
+ // = TITLE
+ // Abstract Acceptor class used for pluggable protocols.
+ //
+ // = DESCRIPTION
+ // @@ Fred, please fill in here.
public:
virtual TAO_Profile *create_profile (TAO_ObjectKey& object_key) = 0;
+ // @@ Fred, please fill in here.
virtual ACE_Event_Handler* acceptor (void) = 0;
// Return the ACE acceptor...
@@ -161,64 +216,85 @@ public:
// The tag, each concrete class will have a specific tag value.
virtual ~TAO_Acceptor (void);
-
+ // @@ Fred, please fill in here.
};
-// Connector Registry and Generic Connector interface definitions
-
class TAO_Export TAO_Connector
{
+ // = TITLE
+ // Connector Registry and Generic Connector interface definitions.
+ //
+ // = DESCRIPTION
+ // @@ Fred, please fill in here.
public:
- virtual int preconnect(char* preconnections) = 0;
- virtual int open(TAO_Resource_Factory *trf, ACE_Reactor *reactor) = 0;
- virtual int close(void) = 0;
+ virtual int preconnect (char *preconnections) = 0;
+ // @@ Fred, please fill in here.
+ virtual int open (TAO_Resource_Factory *trf,
+ ACE_Reactor *reactor) = 0;
+ // @@ Fred, please fill in here.
+ virtual int close (void) = 0;
+ // @@ Fred, please fill in here.
virtual CORBA::ULong tag (void) = 0;
- // The tag identifying the specific ORB transport layer
- // protocol. For example TAO_IOP_TAG_INTERNET_IOP = 0.
- // The tag is used in the IOR to identify the type of profile
- // included. IOR -> {{tag0, profile0} {tag1, profole1} ...}
- // GIOP.h defines typedef CORBA::ULong TAO_IOP_Profile_ID;
+ // The tag identifying the specific ORB transport layer protocol.
+ // For example TAO_IOP_TAG_INTERNET_IOP = 0. The tag is used in the
+ // IOR to identify the type of profile included. IOR -> {{tag0,
+ // profile0} {tag1, profole1} ...} GIOP.h defines typedef
+ // CORBA::ULong TAO_IOP_Profile_ID;
- virtual TAO_Transport* connect(TAO_Profile* profile,
+ virtual TAO_Transport *connect(TAO_Profile *profile,
CORBA::Environment &env) = 0;
- // In order to support pluggable we need to abstract away the
+ // In order to support pluggable we need to abstract away the
// connect() method so it can be called from the GIOP code
// independant of the actual transport protocol in use.
virtual ~TAO_Connector (void);
- // the destructor
-
+ // the destructor.
};
-// How does user add new Protocols?
-// Registry needs to decide which profiles are added to profile list.
class TAO_Export TAO_Connector_Registry
{
+ // = TITLE
+ // @@ Fred, please fill in here.
+ //
+ // = DESCRIPTION
+ // @@ Fred, please fill in here.
public:
- TAO_Connector_Registry ();
- ~TAO_Connector_Registry ();
-
+ TAO_Connector_Registry (void);
+ // @@ Fred, please fill in here.
+ ~TAO_Connector_Registry (void);
+ // @@ Fred, please fill in here.
+
TAO_Connector *get_connector (CORBA::ULong tag);
+ // @@ Fred, please fill in here.
+
CORBA::Boolean add_connector (TAO_Connector *connector);
// All TAO_Connectors will have a tag() member which will be
// used for registering object, as well as type checking.
- int open(TAO_Resource_Factory *trf, ACE_Reactor *reactor);
- int close_all(void);
+ int open(TAO_Resource_Factory *trf,
+ ACE_Reactor *reactor);
+ // @@ Fred, please fill in here.
+
+ int close_all (void);
+ // @@ Fred, please fill in here.
+
+ int preconnect (const char *the_preconnections);
+ // @@ Fred, please fill in here.
- int preconnect (const char* the_preconnections);
+ TAO_Profile *connect (STUB_Object *&obj,
+ CORBA::Environment &env);
+ // This is where the transport protocol is selected based on some
+ // policy. This member will call the connect member of the
+ // TAO_Connector class which in turn will call the concrete
+ // connector.
- TAO_Profile *connect (STUB_Object *&obj, CORBA::Environment &env);
- // This is where the transport protocol is selected based on
- // some policy. This member will call the connect member of the
- // TAO_Connector class which in turn will call the concrete connector.
private:
TAO_Connector *iiop_connector_;
- // @@ for now this is all we support! This next iteration will be
- // a bit more generic. Something like a key, value pair with key
+ // @@ for now this is all we support! This next iteration will be a
+ // bit more generic. Something like a key, value pair with key
// equil to the IOP_TYPE and value a pointer to the Connector.
};
diff --git a/TAO/tao/try_macros.h b/TAO/tao/try_macros.h
index 7e99d7ff9d9..4df4cd77af4 100644
--- a/TAO/tao/try_macros.h
+++ b/TAO/tao/try_macros.h
@@ -23,7 +23,7 @@
// * NOTICE !!! NOTICE !!! NOTICE !!! NOTICE !!! *
// * *
// * *
-// * The macros in this file is depricated. *
+// * The macros in this file is deprecated. *
// * *
// * Please check out $ACE_ROOT/ace/CORBA_macros.h *
// * for a new set of helper macros that replace *
diff --git a/TAO/tao/varout.cpp b/TAO/tao/varout.cpp
index 33340e2ec6b..30a5e36aac4 100644
--- a/TAO/tao/varout.cpp
+++ b/TAO/tao/varout.cpp
@@ -36,7 +36,8 @@ TAO_Object_Field_T<T>::_downcast (CORBA_Object* base_ptr,
CORBA::release (this->ptr_);
this->ptr_ = 0;
this->ptr_ = T::_narrow (base_ptr, env);
- if (env.exception () != 0) return;
+ if (env.exception () != 0)
+ return;
}
template<class T> CORBA_Object*
diff --git a/TAO/tao/varout.h b/TAO/tao/varout.h
index 19a56f7758c..cb34463a3cb 100644
--- a/TAO/tao/varout.h
+++ b/TAO/tao/varout.h
@@ -13,8 +13,8 @@
// Templates for _var and _out types
//
// = AUTHOR
-//
-// Aniruddha Gokhale
+// Aniruddha Gokhale <gokhale@cs.wustl.edu>
+//
// ============================================================================
#ifndef TAO_VAROUT_H
@@ -31,19 +31,18 @@ class TAO_Object_Field_T : public TAO_Object_Field
//
// = DESCRIPTION
// When an object reference appears in a structure the marshaling
- // and demarhsaling of the structure gets complicated:
- // the interpreter can only marshal CORBA_Object_ptr when it
- // dermarshal it creates on of those objects.
- // The downcasting to the right type must be executed by classes
- // with compile-time knowledge of the object type.
- // The solution addopted in TAO is to create a special manager
- // class for that field,
+ // and demarhsaling of the structure gets complicated: the
+ // interpreter can only marshal CORBA_Object_ptr when it
+ // dermarshal it creates on of those objects. The downcasting to
+ // the right type must be executed by classes with compile-time
+ // knowledge of the object type. The solution addopted in TAO is
+ // to create a special manager class for that field,
public:
TAO_Object_Field_T (void);
// default constructor
- TAO_Object_Field_T (T* object);
- // constructor from a T*, assumes ownership of <object> i.e. it
+ TAO_Object_Field_T (T *object);
+ // constructor from a T *, assumes ownership of <object> i.e. it
// *will* release it.
TAO_Object_Field_T (const TAO_Object_Field_T<T> &);
@@ -52,48 +51,49 @@ public:
virtual ~TAO_Object_Field_T (void);
// destructor
- TAO_Object_Field_T<T> &operator= (T* object);
+ TAO_Object_Field_T<T> &operator= (T *object);
// Assignment from a T*, it assumes ownership of <object>.
TAO_Object_Field_T<T> &operator= (const TAO_Object_Field_T<T> &);
// Assignment operator, in duplicates the underlying objects.
- T* operator-> (void) const;
+ T *operator-> (void) const;
// smart pointer (const)
- operator T* const &() const;
+ operator T *const &() const;
// cast operator
- operator T* &();
+ operator T *&();
// cast operator
// = operations for parameter passing modes
- T* in (void) const;
+ T *in (void) const;
// for in type parameter
- T* &inout (void);
+ T *&inout (void);
// for inout type parameter
- T* &out (void);
+ T *&out (void);
// for out parameter
- T* _retn (void);
+ T *_retn (void);
// for return type
- T* ptr (void) const;
+ T *ptr (void) const;
// TAO extension for access to the underlying pointer.
- virtual void _downcast (CORBA_Object* base_ptr,
+ virtual void _downcast (CORBA_Object *base_ptr,
CORBA_Environment &TAO_IN_ENV = CORBA::default_environment ());
- virtual CORBA_Object* _upcast (void);
+ virtual CORBA_Object *_upcast (void);
virtual void _release (void);
// Implement the TAO_Object_Field methods.
private:
- T* ptr_;
+ T *ptr_;
};
+#if 0
// ****************************************************************
// The following classes are experimental, some of them do *not*
// compile and produce errors in compilers that check templates before
@@ -101,7 +101,7 @@ private:
// several classes generated by IDL compiler, possibly reducing the
// complexity of the compiler.
// ****************************************************************
-#if 0
+
template <class T>
class TAO_Fixed_var
// = TITLE