#include <XrdClAnyObject.hh>
Collaboration diagram for XrdCl::AnyObject:
Public Member Functions | |
AnyObject () | |
Constructor. | |
~AnyObject () | |
Destructor. | |
template<class Type> | |
void | Set (Type object, bool own=true) |
template<class Type> | |
void | Get (Type &object) |
Retrieve the object being held. | |
bool | HasOwnership () const |
Check if we own the object being stored. | |
Private Attributes | |
Holder * | pHolder |
const std::type_info * | pTypeInfo |
bool | pOwn |
Classes | |
class | ConcreteHolder |
class | Holder |
XrdCl::AnyObject::AnyObject | ( | ) | [inline] |
Constructor.
XrdCl::AnyObject::~AnyObject | ( | ) | [inline] |
Destructor.
void XrdCl::AnyObject::Get | ( | Type & | object | ) | [inline] |
Retrieve the object being held.
bool XrdCl::AnyObject::HasOwnership | ( | ) | const [inline] |
Check if we own the object being stored.
void XrdCl::AnyObject::Set | ( | Type | object, | |
bool | own = true | |||
) | [inline] |
Grab an object By default the ownership of the object is taken as well, ie. the object will be deleted when the AnyObject holding it is deleted. To release an object grab a zero pointer, ie. (int *)0
object | object pointer | |
own | take the ownership or not |
Holder* XrdCl::AnyObject::pHolder [private] |
bool XrdCl::AnyObject::pOwn [private] |
const std::type_info* XrdCl::AnyObject::pTypeInfo [private] |