Go to the documentation of this file. 1 #ifndef __JLANG__JSHAREDPOINTER__
2 #define __JLANG__JSHAREDPOINTER__
14 namespace JPP {
using namespace JLANG; }
27 template<
class JClass_t,
template<
class>
class JMemory_t =
JNew>
68 template<
class JDerived_t>
97 return static_cast<const JSharedPointer&>(*
this);
108 return static_cast<JSharedPointer&>(*
this);
119 if (this->
get() !=
object.
get()) {
157 template<
class JDerived_t>
202 virtual void set(JClass_t* p)
virtual void set(JClass_t *p)
Set pointer.
virtual JClass_t * get() const
Get pointer.
void set(const JSharedPointer &object)
Set pointer.
Memory management class for create/release policy based on new/delete.
~JSharedPointer()
Destructor.
JSharedPointer & operator=(JDerived_t *p)
Assignment operator.
void attach(const JSharedCounter &object)
Attach this counter to given shared counter object.
const JSharedPointer & getSharedPointer() const
Get shared pointer.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Template implementation of class that holds pointer to object(s).
virtual void reset()
Reset pointer.
Template interface for pointer to object(s).
void initialise()
Initialise counter.
JStorage< JClass_t, JMemory_t > storage_type
void setSharedPointer(const JSharedPointer &object)
Set shared pointer.
JPointer< JClass_t > pointer_type
JSharedPointer(const JSharedPointer &object)
Copy constructor.
virtual void reset()
Reset pointer.
virtual void set(JClass_t *p)
Set pointer.
JSharedPointer & getSharedPointer()
Get shared pointer.
JSharedPointer(JDerived_t *p)
Assignment constructor.
JSharedPointer & operator=(const JSharedPointer &object)
Assignment operator.
Auxiliary classes and methods for language specific functionality.
virtual void reset()
Reset pointer.
JSharedPointer()
Default constructor.
The template JSharedPointer class can be used to share a pointer to an object.
bool is_valid() const
Check validity of pointer.