| 140 | | |
|---|
| 141 | | OSG_GEN_BUNDLEP(FieldBundle); |
|---|
| | 140 | /*-------------------------------------------------------------------------*/ |
|---|
| | 141 | /* RefCountPolicies */ |
|---|
| | 142 | /*-------------------------------------------------------------------------*/ |
|---|
| | 143 | |
|---|
| | 144 | template <class RootObjectT> |
|---|
| | 145 | struct InternalRefCountPolicy; |
|---|
| | 146 | |
|---|
| | 147 | template <class RootObjectT> |
|---|
| | 148 | struct RefCountPolicy; |
|---|
| | 149 | |
|---|
| | 150 | template <class RootObjectT> |
|---|
| | 151 | struct MTRefCountPolicy; |
|---|
| | 152 | |
|---|
| | 153 | template <class RootObjectT> |
|---|
| | 154 | struct WeakRefCountPolicy; |
|---|
| | 155 | |
|---|
| | 156 | /*-------------------------------------------------------------------------*/ |
|---|
| | 157 | /* ReferenceCountPointer<ObjectT, */ |
|---|
| | 158 | /* RefCountPolicy, */ |
|---|
| | 159 | /* RootObjectT > */ |
|---|
| | 160 | /*-------------------------------------------------------------------------*/ |
|---|
| | 161 | |
|---|
| | 162 | template <class ObjectT, |
|---|
| | 163 | class RefCountPolicyT, |
|---|
| | 164 | class RootObjectT > |
|---|
| | 165 | class ReferenceCountPointer; |
|---|
| | 166 | |
|---|
| | 167 | template <class ObjectT, class RootObjectT = FieldContainer> |
|---|
| | 168 | struct InternalRefCountPtrBuilder |
|---|
| | 169 | { |
|---|
| | 170 | typedef ReferenceCountPointer< |
|---|
| | 171 | ObjectT, |
|---|
| | 172 | InternalRefCountPolicy<RootObjectT>, |
|---|
| | 173 | RootObjectT > Ptr; |
|---|
| | 174 | typedef ReferenceCountPointer< |
|---|
| | 175 | ObjectT, |
|---|
| | 176 | InternalRefCountPolicy<RootObjectT>, |
|---|
| | 177 | RootObjectT > const PtrConst; |
|---|
| | 178 | typedef ReferenceCountPointer< |
|---|
| | 179 | ObjectT const, |
|---|
| | 180 | InternalRefCountPolicy<RootObjectT>, |
|---|
| | 181 | RootObjectT > ConstPtr; |
|---|
| | 182 | typedef ReferenceCountPointer< |
|---|
| | 183 | ObjectT const, |
|---|
| | 184 | InternalRefCountPolicy<RootObjectT>, |
|---|
| | 185 | RootObjectT > const ConstPtrConst; |
|---|
| | 186 | }; |
|---|
| | 187 | |
|---|
| | 188 | template <class ObjectT, class RootObjectT = FieldContainer> |
|---|
| | 189 | struct RefCountPtrBuilder |
|---|
| | 190 | { |
|---|
| | 191 | typedef ReferenceCountPointer< |
|---|
| | 192 | ObjectT, |
|---|
| | 193 | RefCountPolicy<RootObjectT>, |
|---|
| | 194 | RootObjectT > Ptr; |
|---|
| | 195 | typedef ReferenceCountPointer< |
|---|
| | 196 | ObjectT, |
|---|
| | 197 | RefCountPolicy<RootObjectT>, |
|---|
| | 198 | RootObjectT > const PtrConst; |
|---|
| | 199 | typedef ReferenceCountPointer< |
|---|
| | 200 | ObjectT const, |
|---|
| | 201 | RefCountPolicy<RootObjectT>, |
|---|
| | 202 | RootObjectT > ConstPtr; |
|---|
| | 203 | typedef ReferenceCountPointer< |
|---|
| | 204 | ObjectT const, |
|---|
| | 205 | RefCountPolicy<RootObjectT>, |
|---|
| | 206 | RootObjectT > const ConstPtrConst; |
|---|
| | 207 | }; |
|---|
| | 208 | |
|---|
| | 209 | template <class ObjectT, class RootObjectT = FieldContainer> |
|---|
| | 210 | struct MTRefCountPtrBuilder |
|---|
| | 211 | { |
|---|
| | 212 | typedef ReferenceCountPointer< |
|---|
| | 213 | ObjectT, |
|---|
| | 214 | MTRefCountPolicy<RootObjectT>, |
|---|
| | 215 | RootObjectT > Ptr; |
|---|
| | 216 | typedef ReferenceCountPointer< |
|---|
| | 217 | ObjectT, |
|---|
| | 218 | MTRefCountPolicy<RootObjectT>, |
|---|
| | 219 | RootObjectT > const PtrConst; |
|---|
| | 220 | typedef ReferenceCountPointer< |
|---|
| | 221 | ObjectT const, |
|---|
| | 222 | MTRefCountPolicy<RootObjectT>, |
|---|
| | 223 | RootObjectT > ConstPtr; |
|---|
| | 224 | typedef ReferenceCountPointer< |
|---|
| | 225 | ObjectT const, |
|---|
| | 226 | MTRefCountPolicy<RootObjectT>, |
|---|
| | 227 | RootObjectT > const ConstPtrConst; |
|---|
| | 228 | }; |
|---|
| | 229 | |
|---|
| | 230 | template <class ObjectT, class RootObjectT = FieldContainer> |
|---|
| | 231 | struct WeakRefCountPtrBuilder |
|---|
| | 232 | { |
|---|
| | 233 | typedef ReferenceCountPointer< |
|---|
| | 234 | ObjectT, |
|---|
| | 235 | WeakRefCountPolicy<RootObjectT>, |
|---|
| | 236 | RootObjectT > Ptr; |
|---|
| | 237 | typedef ReferenceCountPointer< |
|---|
| | 238 | ObjectT, |
|---|
| | 239 | WeakRefCountPolicy<RootObjectT>, |
|---|
| | 240 | RootObjectT > const PtrConst; |
|---|
| | 241 | typedef ReferenceCountPointer< |
|---|
| | 242 | ObjectT const, |
|---|
| | 243 | WeakRefCountPolicy<RootObjectT>, |
|---|
| | 244 | RootObjectT > ConstPtr; |
|---|
| | 245 | typedef ReferenceCountPointer< |
|---|
| | 246 | ObjectT const, |
|---|
| | 247 | WeakRefCountPolicy<RootObjectT>, |
|---|
| | 248 | RootObjectT > const ConstPtrConst; |
|---|
| | 249 | }; |
|---|
| | 250 | |
|---|
| | 251 | /*-------------------------------------------------------------------------*/ |
|---|
| | 252 | /* ParentPointer<ObjectT, RootObjectT> */ |
|---|
| | 253 | /*-------------------------------------------------------------------------*/ |
|---|
| | 254 | |
|---|
| | 255 | template <class ObjectT, class RootObjectT> |
|---|
| | 256 | class ParentPointer; |
|---|
| | 257 | |
|---|
| | 258 | template <class ObjectT, class RootObjectT = FieldContainer> |
|---|
| | 259 | struct ParentPtrBuilder |
|---|
| | 260 | { |
|---|
| | 261 | typedef ParentPointer<ObjectT, |
|---|
| | 262 | RootObjectT > Ptr; |
|---|
| | 263 | typedef ParentPointer<ObjectT, |
|---|
| | 264 | RootObjectT > const PtrConst; |
|---|
| | 265 | typedef ParentPointer<ObjectT const, |
|---|
| | 266 | RootObjectT > ConstPtr; |
|---|
| | 267 | typedef ParentPointer<ObjectT const, |
|---|
| | 268 | RootObjectT > const ConstPtrConst; |
|---|
| | 269 | }; |
|---|
| | 270 | |
|---|
| | 271 | /*-------------------------------------------------------------------------*/ |
|---|
| | 272 | /* Pointer Types */ |
|---|
| | 273 | /*-------------------------------------------------------------------------*/ |
|---|
| | 274 | |
|---|
| | 275 | typedef InternalRefCountPtrBuilder<FieldBundle, FieldBundle>::Ptr |
|---|
| | 276 | FieldBundleInternalRefPtr; |
|---|
| | 277 | typedef ParentPtrBuilder <FieldBundle, FieldBundle>::Ptr |
|---|
| | 278 | FieldBundleParentPtr; |
|---|
| | 279 | |
|---|
| | 280 | typedef InternalRefCountPtrBuilder<FieldContainer>::Ptr |
|---|
| | 281 | FieldContainerInternalRefPtr; |
|---|
| | 282 | typedef ParentPtrBuilder <FieldContainer>::Ptr |
|---|
| | 283 | FieldContainerParentPtr; |
|---|
| | 284 | |
|---|
| | 285 | typedef InternalRefCountPtrBuilder<FieldContainerAttachment>::Ptr |
|---|
| | 286 | FieldContainerAttachmentInternalRefPtr; |
|---|
| | 287 | typedef ParentPtrBuilder <FieldContainerAttachment>::Ptr |
|---|
| | 288 | FieldContainerAttachmentParentPtr; |
|---|
| | 289 | |
|---|
| | 290 | typedef InternalRefCountPtrBuilder<AttachmentContainer>::Ptr |
|---|
| | 291 | AttachmentContainerInternalRefPtr; |
|---|
| | 292 | typedef ParentPtrBuilder <AttachmentContainer>::Ptr |
|---|
| | 293 | AttachmentContainerParentPtr; |
|---|
| | 294 | |
|---|
| | 295 | typedef InternalRefCountPtrBuilder<Node>::Ptr |
|---|
| | 296 | NodeInternalRefPtr; |
|---|
| | 297 | typedef ParentPtrBuilder <Node>::Ptr |
|---|
| | 298 | NodeParentPtr; |
|---|
| | 299 | |
|---|
| | 300 | typedef InternalRefCountPtrBuilder<NodeCore>::Ptr |
|---|
| | 301 | NodeCoreInternalRefPtr; |
|---|
| | 302 | typedef ParentPtrBuilder <NodeCore>::Ptr |
|---|
| | 303 | NodeCoreParentPtr; |
|---|
| | 304 | |
|---|
| | 305 | OSG_GEN_CONTAINERPTR(FieldBundle); |
|---|