1 #ifndef __JLANG__JABSTRACTPOINTER__
2 #define __JLANG__JABSTRACTPOINTER__
15 namespace JPP {
using namespace JLANG; }
23 template<
class JClass_t>
25 public JEquals< JAbstractPointer<JClass_t> >
52 return this->
get() ==
object.get();
61 virtual JClass_t*
get()
const = 0;
69 virtual void set(JClass_t* p) = 0;
85 return this->
get() != NULL;
96 if (this->
get() != p) {
126 operator JClass_t*()
const
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
Template interface for pointer to object(s).
JClass_t * operator->() const
Smart pointer operator.
virtual void set(JClass_t *p)=0
Set pointer.
JAbstractPointer()
Default constructor.
virtual void reset()=0
Reset pointer.
void reset(JClass_t *p)
Reset pointer.
virtual ~JAbstractPointer()
Virtual destructor.
virtual JClass_t * get() const =0
Get pointer.
bool is_valid() const
Check validity of pointer.
virtual bool equals(const JAbstractPointer &object) const
Equals.
Exception for null pointer operation.
Auxiliary classes and methods for language specific functionality.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Template definition of auxiliary base class for comparison of data structures.