00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef NODEPOINTERTO_H
00016 #define NODEPOINTERTO_H
00017
00018 #include "pandabase.h"
00019 #include "nodePointerToBase.h"
00020
00021
00022
00023
00024
00025
00026
00027
00028 template <class T>
00029 class NodePointerTo : public NodePointerToBase<T> {
00030 public:
00031
00032
00033 #ifndef CPPPARSER
00034 typedef TYPENAME NodePointerToBase<T>::To To;
00035 INLINE NodePointerTo(To *ptr = (To *)NULL);
00036 INLINE NodePointerTo(const NodePointerTo<T> ©);
00037 INLINE ~NodePointerTo();
00038
00039 INLINE To &operator *() const;
00040 INLINE To *operator -> () const;
00041
00042
00043 INLINE operator T *() const;
00044
00045 INLINE To *p() const;
00046
00047 INLINE NodePointerTo<T> &operator = (To *ptr);
00048 INLINE NodePointerTo<T> &operator = (const NodePointerTo<T> ©);
00049 #endif // CPPPARSER
00050 };
00051
00052
00053
00054
00055
00056
00057
00058 template <class T>
00059 class NodeConstPointerTo : public NodePointerToBase<T> {
00060 public:
00061
00062
00063 #ifndef CPPPARSER
00064 typedef TYPENAME NodePointerToBase<T>::To To;
00065 INLINE NodeConstPointerTo(const To *ptr = (const To *)NULL);
00066 INLINE NodeConstPointerTo(const NodePointerTo<T> ©);
00067 INLINE NodeConstPointerTo(const NodeConstPointerTo<T> ©);
00068 INLINE ~NodeConstPointerTo();
00069
00070 INLINE const To &operator *() const;
00071 INLINE const To *operator -> () const;
00072 INLINE operator const T *() const;
00073
00074 INLINE const To *p() const;
00075
00076 INLINE NodeConstPointerTo<T> &operator = (const To *ptr);
00077 INLINE NodeConstPointerTo<T> &operator = (const NodePointerTo<T> ©);
00078 INLINE NodeConstPointerTo<T> &operator = (const NodeConstPointerTo<T> ©);
00079 #endif // CPPPARSER
00080 };
00081
00082 #define NPT(type) NodePointerTo< type >
00083 #define NCPT(type) NodeConstPointerTo< type >
00084
00085 #include "nodePointerTo.I"
00086
00087 #endif