Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Class Members | File Members

smartptr.h File Reference

#include <ptlib.h>
#include <ptlib/object.h>

Go to the source code of this file.

Defines

#define PSMART_POINTER_INFO(cls, par, type)


Define Documentation

#define PSMART_POINTER_INFO cls,
par,
type   ) 
 

Value:

PCLASSINFO(cls, par) \
  public: \
    type * operator->() const \
      { return (type *)PAssertNULL(object); } \
    type & operator*() const \
      { return *(type *)PAssertNULL(object); } \
    operator type*() const \
      { return (type *)object; }
This macro is used to declare a smart pointer class members. The class #cls# is the smart pointer, descended from the #par# class, to the #type# class.

The macro declares in the class the following functions: {verbatim} PCLASSINFO(cls, par); Standard class info.

type * operator->() const; Access to the members of the smart object in the smart pointer.

type & operator*() const; Access to the value of the smart object in the smart pointer. {verbatim}


Generated on Mon Feb 21 20:43:10 2005 for PWLib by  doxygen 1.4.1