diff options
Diffstat (limited to 'TAO/tao/MProfile.h')
-rw-r--r-- | TAO/tao/MProfile.h | 44 |
1 files changed, 11 insertions, 33 deletions
diff --git a/TAO/tao/MProfile.h b/TAO/tao/MProfile.h index 13de8fa3330..2248e27cc04 100644 --- a/TAO/tao/MProfile.h +++ b/TAO/tao/MProfile.h @@ -21,11 +21,8 @@ #define TAO_MPROFILE_H #include "tao/corbafwd.h" -#include "tao/Pluggable.h" -// @@ Fred, this definitions are of very little use, can you make them -// local to the Profile class so we don't pollute the global -// namespace +class TAO_Profile; typedef TAO_Profile *TAO_Profile_ptr; typedef CORBA::ULong TAO_PHandle; @@ -47,33 +44,20 @@ public: // = Initalization and termination methods. TAO_MProfile (CORBA::ULong sz); - TAO_MProfile (const TAO_MProfile &mprofiles); + TAO_MProfile (TAO_MProfile *mprofiles); // **NOTE: IF mprofiles->last_ > 0, THEN this->size_ will be set to // mprofiles->last_. Otherwise this->size_ - mprofiles->size_. // Furthermore, current_ is set back to 0! i.e. rewound. // The reference count on any profiles in mprofiles is increment // when their references (i.e. pointers) are copied. - TAO_MProfile& operator= (const TAO_MProfile& mprofiles); - // Assigment operator. - - ~TAO_MProfile (void); - // Destructor: decrements reference count on all references - // profiles! - int set (CORBA::ULong sz); - // Inits MProfile to hold sz TAO_Profiles. - // NOT THREAD SAFE + // @@ Fred, what does this method do? - int set (const TAO_MProfile &mprofile); + 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_. // This is so we can use set () to trim a profile list!! - // NOT THREAD SAFE - - int grow (CORBA::ULong sz); - // increate the number of profiles this object can hold. - // NOT THREAD SAFE TAO_Profile_ptr get_cnext (void); // Treat as a circular list. @@ -100,11 +84,7 @@ public: // Returns the index for the current profile. CORBA::ULong profile_count (void) const; - // Returns the number of profiles stored in the list (last_+1). - - CORBA::ULong size (void) const; - // return the maximum number of profiles that can be stored in this - // container, (size_+1) + // Returns the number of profiles stored in the list (last_). const TAO_Profile* get_profile (CORBA::ULong index) const; // Return the profile at position <index>. @@ -137,20 +117,17 @@ public: CORBA::ULong hash (CORBA::ULong max, CORBA::Environment &env); - // use all registered profiles. The hash() method is called on each - // profile and the results are averaged together. // @@ 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! - -private: - void cleanup (void); - // Helper method to implement the destructor - private: TAO_MProfile *forward_from_; @@ -178,4 +155,5 @@ private: # include "tao/MProfile.i" #endif /* __ACE_INLINE__ */ -#endif /* TAO_MPROFILE_H */ +// @@ Fred, please don't use #endif // ..., instead, always use #endif /* ... */ +#endif // TAO_MPROFILE_H |