diff options
author | levine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1997-09-24 14:36:08 +0000 |
---|---|---|
committer | levine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1997-09-24 14:36:08 +0000 |
commit | b6245769053a32e00ac22fd4c9330c0d8904707d (patch) | |
tree | 20ef3d849cf87bfade20625b4485d10b880eafc5 /ace/Managed_Object.h | |
parent | e181d4dbafa7d900751f48df6848017099696a78 (diff) | |
download | ATCD-b6245769053a32e00ac22fd4c9330c0d8904707d.tar.gz |
removed ACE_Managed_Object get_object () interface
Diffstat (limited to 'ace/Managed_Object.h')
-rw-r--r-- | ace/Managed_Object.h | 31 |
1 files changed, 7 insertions, 24 deletions
diff --git a/ace/Managed_Object.h b/ace/Managed_Object.h index 56b34c838f7..0eb87390f0c 100644 --- a/ace/Managed_Object.h +++ b/ace/Managed_Object.h @@ -18,6 +18,7 @@ #define ACE_MANAGED_OBJECT_H #include "ace/OS.h" +#include "ace/Object_Manager.h" template <class TYPE> class ACE_Cleanup_Adapter : public ACE_Cleanup @@ -26,9 +27,12 @@ class ACE_Cleanup_Adapter : public ACE_Cleanup // managed by the ACE_Object_Manager. // // = DESCRIPTION - // This template class wraps adapts an object of any type to be - // an ACE_Cleanup object. The object can then be destroyed - // type-safely by the ACE_Object_Manager. + // This template class adapts an object of any type to be an + // ACE_Cleanup object. The object can then be destroyed + // type-safely by the ACE_Object_Manager. This class is + // typically used to replace a cast; but, it's a bit cleaner and + // allows insertion of, say, run-time type identification + // internally if desired. { public: ACE_Cleanup_Adapter (void); @@ -61,18 +65,6 @@ class ACE_Managed_Object // be allocated when first needed. And they are destroyed in // the reverse order of construction. // - // To use the get_object () interface, the caller must provide - // an identifier and an object pointer. The identifer (usually) - // has a value of 0 the first time get_object () is called, in - // which case a new instance of the object is allocated on the - // heap. (See the description of get_object () for return - // values.) - // - // Subsequent calls to get_object (), with that identifier, will - // return the pointer to the identified object. The caller is - // responsible for ensuring type safety by not casting the pointer - // that it holds in calls to get_object (). - // // get_preallocated_object () accesses a "preallocated" object, // i.e., one that is identified by a value in the // ACE_Object_Manager:: Preallocated_Object enum. These @@ -97,15 +89,6 @@ class ACE_Managed_Object // the ACE library. { public: - static int get_object (int &id, TYPE *&object); - // Get the object identified by "id". If "id" is 0, allocates a new - // instance, and sets "id" to the new identifier for that instance. - // Returns 0 on success. On failure, returns -1 and sets errno to: - // ENOENT if the id is non-zero and unknown, - // ENOMEM if insufficient virtual memory to allocate a new instance, or - // ENOSPC if no more table slots are available: see the - // ACE_MAX_MANAGED_OBJECTS config variable. - static TYPE *get_preallocated_object (ACE_Object_Manager::Preallocated_Object id); // Get the preallocated object identified by "id". Returns a |