- Timestamp:
- 04/02/08 14:18:07 (8 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/Carsten_PtrWork2/Source/Base/Base/OSGContainerForwards.h
r1070 r1072 64 64 typedef CLASST const * NAME##ConstPtrArg 65 65 66 #define OSG_INHERIT_NAMED_PTR(BASECLASS, NAME) \ 67 typedef BASECLASS::NAME##Ptr NAME##Ptr; \ 68 typedef BASECLASS::NAME##PtrConst NAME##PtrConst; \ 69 typedef BASECLASS::NAME##ConstPtr NAME##ConstPtr; \ 70 typedef BASECLASS::NAME##ConstPtrConst NAME##ConstPtrConst; \ 71 \ 72 typedef BASECLASS::NAME##PtrArg NAME##PtrArg; \ 73 typedef BASECLASS::NAME##PtrConstArg NAME##PtrConstArg; \ 74 typedef BASECLASS::NAME##ConstPtrArg NAME##ConstPtrArg 75 76 #define OSG_INHERIT_NAMED_PTR_TMPL(BASECLASS, NAME) \ 77 typedef typename BASECLASS::NAME##Ptr NAME##Ptr; \ 78 typedef typename BASECLASS::NAME##PtrConst NAME##PtrConst; \ 79 typedef typename BASECLASS::NAME##ConstPtr NAME##ConstPtr; \ 80 typedef typename BASECLASS::NAME##ConstPtrConst NAME##ConstPtrConst; \ 81 \ 82 typedef typename BASECLASS::NAME##PtrArg NAME##PtrArg; \ 83 typedef typename BASECLASS::NAME##PtrConstArg NAME##PtrConstArg; \ 84 typedef typename BASECLASS::NAME##ConstPtrArg NAME##ConstPtrArg 85 66 86 #define OSG_GEN_NAMED_P(CLASST, NAME) \ 67 87 typedef CLASST * NAME##P; \ … … 185 205 186 206 /*-------------------------------------------------------------------------*/ 187 /* ParentPtrWrapper<ObjectT> */188 /*-------------------------------------------------------------------------*/189 190 template <class ObjectT>191 class ParentPtrWrapper;192 193 template <class ObjectT>194 struct ParentPtrBuilder195 {196 typedef ParentPtrWrapper<ObjectT > Ptr;197 typedef ParentPtrWrapper<ObjectT > const PtrConst;198 typedef ParentPtrWrapper<ObjectT const> ConstPtr;199 typedef ParentPtrWrapper<ObjectT const> const ConstPtrConst;200 };201 202 /*-------------------------------------------------------------------------*/203 207 /* Pointer Types */ 204 208 /*-------------------------------------------------------------------------*/ … … 208 212 typedef InternalRefCountPtrBuilder<FieldContainer>::Ptr 209 213 FieldContainerInternalRefPtr; 210 typedef ParentPtrBuilder <FieldContainer>::Ptr211 FieldContainerParentPtr;212 214 typedef TransitPtrBuilder <FieldContainer>::Ptr 213 215 FieldContainerTransitPtr; … … 217 219 typedef InternalRefCountPtrBuilder<FieldContainerAttachment>::Ptr 218 220 FieldContainerAttachmentInternalRefPtr; 219 typedef ParentPtrBuilder <FieldContainerAttachment>::Ptr220 FieldContainerAttachmentParentPtr;221 221 222 222 typedef RefCountPtrBuilder <AttachmentContainer>::Ptr … … 224 224 typedef InternalRefCountPtrBuilder<AttachmentContainer>::Ptr 225 225 AttachmentContainerInternalRefPtr; 226 typedef ParentPtrBuilder <AttachmentContainer>::Ptr227 AttachmentContainerParentPtr;228 226 229 227 typedef RefCountPtrBuilder <Node>::Ptr NodeRefPtr; 230 228 typedef InternalRefCountPtrBuilder<Node>::Ptr NodeInternalRefPtr; 231 typedef ParentPtrBuilder <Node>::Ptr NodeParentPtr;232 229 233 230 typedef RefCountPtrBuilder <NodeCore>::Ptr NodeCoreRefPtr; 234 231 typedef InternalRefCountPtrBuilder<NodeCore>::Ptr NodeCoreInternalRefPtr; 235 typedef ParentPtrBuilder <NodeCore>::Ptr NodeCoreParentPtr;236 232 237 233 OSG_GEN_CONTAINERPTR(FieldContainer); … … 241 237 OSG_GEN_CONTAINERPTR(NodeCore); 242 238 239 namespace detail 240 { 241 template <class TargetTypeT, class SourceTypeT> 242 TargetTypeT 243 void_cast(SourceTypeT source) 244 { 245 return static_cast<TargetTypeT>(static_cast<void *>(source)); 246 } 247 248 } // namespace detail 249 243 250 template <class CoreT> 244 251 class CoredNodeRefPtr;
