00001 #ifndef _STR_StrChunkPtr_H_ // -*-c++-*-
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifdef __GNUG__
00022 # pragma interface
00023 #endif
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048 #include <cassert>
00049 #include <LCore/Protocol.h>
00050 #include <LCore/RefCountPtrT.h>
00051 #ifndef _STR_STR_ClassIdent_H_
00052 # include <StrMod/STR_ClassIdent.h>
00053 #endif
00054 #ifndef _STR_StrChunk_H_
00055 # include <StrMod/StrChunk.h>
00056 #endif
00057
00058 #define _STR_StrChunkPtr_H_
00059
00060 namespace strmod {
00061 namespace strmod {
00062
00063 class StrChunk;
00064
00065
00066
00067
00068
00069 class StrChunkPtr : public lcore::RefCountPtrT<StrChunk>
00070 {
00071 public:
00072
00073 typedef lcore::RefCountPtrT<StrChunk> super1;
00074 static const STR_ClassIdent identifier;
00075
00076
00077
00078
00079
00080
00081 inline StrChunkPtr(const StrChunkPtr &b);
00082 inline StrChunkPtr(const super1 &b);
00083 inline StrChunkPtr(StrChunk *stptr = 0);
00084
00085
00086
00087 inline virtual int AreYouA(const lcore::ClassIdent &cid) const;
00088
00089
00090
00091
00092
00093
00094 inline const StrChunkPtr &operator =(const StrChunkPtr &b);
00095 inline const StrChunkPtr &operator =(const super1 &b);
00096 inline const StrChunkPtr &operator =(StrChunk *b);
00097
00098
00099 protected:
00100 virtual const lcore::ClassIdent *i_GetIdent() const { return(&identifier); }
00101 };
00102
00103
00104
00105 inline StrChunkPtr::StrChunkPtr(const StrChunkPtr &b) : super1(b)
00106 {
00107 }
00108
00109 inline StrChunkPtr::StrChunkPtr(const super1 &b) : super1(b)
00110 {
00111 }
00112
00113 inline StrChunkPtr::StrChunkPtr(StrChunk *stptr) : super1(stptr)
00114 {
00115 }
00116
00117 inline int StrChunkPtr::AreYouA(const lcore::ClassIdent &cid) const
00118 {
00119 return((identifier == cid) || Protocol::AreYouA(cid));
00120 }
00121
00122 inline const StrChunkPtr &StrChunkPtr::operator =(const StrChunkPtr &b)
00123 {
00124 super1::operator =(b);
00125 return(*this);
00126 }
00127
00128 inline const StrChunkPtr &StrChunkPtr::operator =(const super1 &b)
00129 {
00130 super1::operator =(b);
00131 return(*this);
00132 }
00133
00134 inline const StrChunkPtr &StrChunkPtr::operator =(StrChunk *b)
00135 {
00136 super1::operator =(b);
00137 return(*this);
00138 }
00139
00140 }
00141 }
00142
00143 #endif