libzypp 17.32.5
PtrTypes.h
Go to the documentation of this file.
1/*---------------------------------------------------------------------\
2| ____ _ __ __ ___ |
3| |__ / \ / / . \ . \ |
4| / / \ V /| _/ _/ |
5| / /__ | | | | | | |
6| /_____||_| |_| |_| |
7| |
8\---------------------------------------------------------------------*/
13#ifndef ZYPP_BASE_PTRTYPES_H
14#define ZYPP_BASE_PTRTYPES_H
15
16#include <iosfwd>
17#include <string>
18
19#include <boost/scoped_ptr.hpp>
20#include <boost/shared_ptr.hpp>
21#include <boost/weak_ptr.hpp>
22#include <boost/intrusive_ptr.hpp>
23
25namespace zypp
26{
27
28 namespace str
29 {
30 // printing void* (prevents us from including <ostream>)
31 std::string form( const char * format, ... ) __attribute__ ((format (printf, 1, 2)));
32 }
33
50
83 {
84 void operator()( const void *const ) const
85 {}
86 };
87
89 using boost::scoped_ptr;
90
92 using boost::shared_ptr;
93
95 using boost::weak_ptr;
96
98 using boost::intrusive_ptr;
99
100 template<typename T, typename... Args>
101 inline intrusive_ptr<T>
103 return intrusive_ptr<T>( new T( std::forward<Args>(__args)...) );
104 }
105
107 using boost::static_pointer_cast;
109 using boost::const_pointer_cast;
111 using boost::dynamic_pointer_cast;
112
114} // namespace zypp
117namespace std
118{
119
120 // namespace sub {
121 // class Foo;
122 // typedef zypp::intrusive_ptr<Foo> Foo_Ptr; // see DEFINE_PTR_TYPE(NAME) macro below
123 // }
124
125 // Defined in namespace std g++ finds the output operator (König-Lookup),
126 // even if we typedef the pointer in a different namespace than ::zypp.
127 // Otherwise we had to define an output operator always in the same namespace
128 // as the typedef (else g++ will just print the pointer value).
129
131 template<class D>
132 inline std::ostream & operator<<( std::ostream & str, const zypp::shared_ptr<D> & obj )
133 {
134 if ( obj )
135 return str << *obj;
136 return str << std::string("NULL");
137 }
139 template<>
140 inline std::ostream & operator<<( std::ostream & str, const zypp::shared_ptr<void> & obj )
141 {
142 if ( obj )
143 return str << zypp::str::form( "%p", (void*)obj.get() );
144 return str << std::string("NULL");
145 }
146
148 template<class D>
149 inline std::ostream & dumpOn( std::ostream & str, const zypp::shared_ptr<D> & obj )
150 {
151 if ( obj )
152 return dumpOn( str, *obj );
153 return str << std::string("NULL");
154 }
156 template<>
157 inline std::ostream & dumpOn( std::ostream & str, const zypp::shared_ptr<void> & obj )
158 { return str << obj; }
159
161 template<class D>
162 inline std::ostream & operator<<( std::ostream & str, const zypp::intrusive_ptr<D> & obj )
163 {
164 if ( obj )
165 return str << *obj;
166 return str << std::string("NULL");
167 }
169 template<class D>
170 inline std::ostream & dumpOn( std::ostream & str, const zypp::intrusive_ptr<D> & obj )
171 {
172 if ( obj )
173 return dumpOn( str, *obj );
174 return str << std::string("NULL");
175 }
177} // namespace std
180namespace zypp
181{
182
184 //
185 // RW_pointer traits
186 //
188
193 namespace rw_pointer {
194
195 template<class D>
196 struct Shared
197 {
201 bool unique( const constPtrType & ptr_r )
202 { return !ptr_r || ptr_r.unique(); }
203 bool unique( const PtrType & ptr_r )
204 { return !ptr_r || ptr_r.unique(); }
206 long use_count( const constPtrType & ptr_r ) const
207 { return ptr_r.use_count(); }
208 long use_count( const PtrType & ptr_r ) const
209 { return ptr_r.use_count(); }
210 };
211
212 template<class D>
214 {
218 bool unique( const constPtrType & ptr_r )
219 { return !ptr_r || (ptr_r->refCount() <= 1); }
220 bool unique( const PtrType & ptr_r )
221 { return !ptr_r || (ptr_r->refCount() <= 1); }
223 long use_count( const constPtrType & ptr_r ) const
224 { return ptr_r ? ptr_r->refCount() : 0; }
225 long use_count( const PtrType & ptr_r ) const
226 { return ptr_r ? ptr_r->refCount() : 0; }
227 };
228
229 template<class D>
230 struct Scoped
231 {
235 bool unique( const constPtrType & ptr_r )
236 { return true; }
237 bool unique( const PtrType & ptr_r )
238 { return true; }
240 long use_count( const constPtrType & ptr_r ) const
241 { return ptr_r ? 1 : 0; }
242 long use_count( const PtrType & ptr_r ) const
243 { return ptr_r ? 1 : 0; }
244 };
245
246 }
248
250 //
251 // CLASS NAME : RW_pointer
252 //
290 template<class D, class DTraits = rw_pointer::Shared<D> >
292 {
293 using PtrType = typename DTraits::PtrType;
294 using constPtrType = typename DTraits::constPtrType;
295
297 {}
298
299 RW_pointer(const RW_pointer &) = default;
300 RW_pointer(RW_pointer &&) = default;
301 RW_pointer &operator=(const RW_pointer &) = default;
303 RW_pointer(std::nullptr_t) {}
304
305 explicit
306 RW_pointer( typename PtrType::element_type * dptr )
307 : _dptr( dptr )
308 {}
309
310 explicit
312 : _dptr( dptr )
313 {}
314
315 RW_pointer & operator=( std::nullptr_t )
316 { reset(); return *this; }
317
318 void reset()
319 { PtrType().swap( _dptr ); }
320
321 void reset( typename PtrType::element_type * dptr )
322 { PtrType( dptr ).swap( _dptr ); }
323
324 void swap( RW_pointer & rhs ) noexcept
325 { _dptr.swap( rhs._dptr ); }
326
327 void swap( PtrType & rhs ) noexcept
328 { _dptr.swap( rhs ); }
329
330 explicit operator bool() const
331 { return _dptr.get() != nullptr; }
332
333 const D & operator*() const
334 { return *_dptr; };
335
336 const D * operator->() const
337 { return _dptr.operator->(); }
338
339 const D * get() const
340 { return _dptr.get(); }
341
343 { return *_dptr; }
344
346 { return _dptr.operator->(); }
347
348 D * get()
349 { return _dptr.get(); }
350
351 public:
352 bool unique() const
353 { return DTraits().unique( _dptr ); }
354
355 long use_count() const
356 { return DTraits().use_count( _dptr ); }
357
359 { return _dptr; }
360
362 { return _dptr; }
363
365 { return _dptr; }
366
367 private:
369 };
371
377 template<class D, class DPtr>
378 inline std::ostream & operator<<( std::ostream & str, const RW_pointer<D, DPtr> & obj )
379 {
380 if ( obj.get() )
381 return str << *obj.get();
382 return str << std::string("NULL");
383 }
384
386 template<class D, class DPtr>
387 inline bool operator==( const RW_pointer<D, DPtr> & lhs, const RW_pointer<D, DPtr> & rhs )
388 { return( lhs.get() == rhs.get() ); }
390 template<class D, class DPtr>
391 inline bool operator==( const RW_pointer<D, DPtr> & lhs, const typename DPtr::PtrType & rhs )
392 { return( lhs.get() == rhs.get() ); }
394 template<class D, class DPtr>
395 inline bool operator==( const typename DPtr::PtrType & lhs, const RW_pointer<D, DPtr> & rhs )
396 { return( lhs.get() == rhs.get() ); }
398 template<class D, class DPtr>
399 inline bool operator==( const RW_pointer<D, DPtr> & lhs, const typename DPtr::constPtrType & rhs )
400 { return( lhs.get() == rhs.get() ); }
402 template<class D, class DPtr>
403 inline bool operator==( const typename DPtr::constPtrType & lhs, const RW_pointer<D, DPtr> & rhs )
404 { return( lhs.get() == rhs.get() ); }
406 template<class D, class DPtr>
407 inline bool operator==( const RW_pointer<D, DPtr> & lhs, std::nullptr_t )
408 { return( lhs.get() == nullptr ); }
410 template<class D, class DPtr>
411 inline bool operator==( std::nullptr_t, const RW_pointer<D, DPtr> & rhs )
412 { return( nullptr == rhs.get() ); }
413
414
416 template<class D, class DPtr>
417 inline bool operator!=( const RW_pointer<D, DPtr> & lhs, const RW_pointer<D, DPtr> & rhs )
418 { return ! ( lhs == rhs ); }
420 template<class D, class DPtr>
421 inline bool operator!=( const RW_pointer<D, DPtr> & lhs, const typename DPtr::PtrType & rhs )
422 { return ! ( lhs == rhs ); }
424 template<class D, class DPtr>
425 inline bool operator!=( const typename DPtr::PtrType & lhs, const RW_pointer<D, DPtr> & rhs )
426 { return ! ( lhs == rhs ); }
428 template<class D, class DPtr>
429 inline bool operator!=( const RW_pointer<D, DPtr> & lhs, const typename DPtr::constPtrType & rhs )
430 { return ! ( lhs == rhs ); }
432 template<class D, class DPtr>
433 inline bool operator!=( const typename DPtr::constPtrType & lhs, const RW_pointer<D, DPtr> & rhs )
434 { return ! ( lhs == rhs ); }
436 template<class D, class DPtr>
437 inline bool operator!=( const RW_pointer<D, DPtr> & lhs, std::nullptr_t )
438 { return( lhs.get() != nullptr ); }
440 template<class D, class DPtr>
441 inline bool operator!=( std::nullptr_t, const RW_pointer<D, DPtr> & rhs )
442 { return( nullptr != rhs.get() ); }
443
445
451 template<class D>
452 inline D * rwcowClone( const D * rhs )
453 { return rhs->clone(); }
454
456 //
457 // CLASS NAME : RWCOW_pointer
458 //
466 template<class D, class DTraits = rw_pointer::Shared<D> >
468 {
469 using PtrType = typename DTraits::PtrType;
470 using constPtrType = typename DTraits::constPtrType;
471
473
474 RWCOW_pointer(std::nullptr_t) {}
475
476 RWCOW_pointer(const RWCOW_pointer &) = default;
477
479
480 explicit
481 RWCOW_pointer( typename PtrType::element_type * dptr )
482 : _dptr( dptr )
483 {}
484
485 explicit
487 : _dptr( dptr )
488 {}
489
490 RWCOW_pointer & operator=( std::nullptr_t )
491 { reset(); return *this; }
492
494
496
497 void reset()
498 { PtrType().swap( _dptr ); }
499
500 void reset( typename PtrType::element_type * dptr )
501 { PtrType( dptr ).swap( _dptr ); }
502
503 void swap( RWCOW_pointer & rhs ) noexcept
504 { _dptr.swap( rhs._dptr ); }
505
506 void swap( PtrType & rhs ) noexcept
507 { _dptr.swap( rhs ); }
508
509 explicit operator bool() const
510 { return _dptr.get() != nullptr; }
511
512 const D & operator*() const
513 { return *_dptr; };
514
515 const D * operator->() const
516 { return _dptr.operator->(); }
517
518 const D * get() const
519 { return _dptr.get(); }
520
522 { assertUnshared(); return *_dptr; }
523
525 { assertUnshared(); return _dptr.operator->(); }
526
527 D * get()
528 { assertUnshared(); return _dptr.get(); }
529
530 public:
531 bool unique() const
532 { return DTraits().unique( _dptr ); }
533
534 long use_count() const
535 { return DTraits().use_count( _dptr ); }
536
538 { return _dptr; }
539
541 { assertUnshared(); return _dptr; }
542
544 { return _dptr; }
545
546 private:
547
549 {
550 if ( !unique() )
551 PtrType( rwcowClone( _dptr.get() ) ).swap( _dptr );
552 }
553
554 private:
556 };
558
564 template<class D, class DPtr>
565 inline std::ostream & operator<<( std::ostream & str, const RWCOW_pointer<D, DPtr> & obj )
566 {
567 if ( obj.get() )
568 return str << *obj.get();
569 return str << std::string("NULL");
570 }
571
573 template<class D, class DPtr>
574 inline bool operator==( const RWCOW_pointer<D, DPtr> & lhs, const RWCOW_pointer<D, DPtr> & rhs )
575 { return( lhs.get() == rhs.get() ); }
577 template<class D, class DPtr>
578 inline bool operator==( const RWCOW_pointer<D, DPtr> & lhs, const typename DPtr::PtrType & rhs )
579 { return( lhs.get() == rhs.get() ); }
581 template<class D, class DPtr>
582 inline bool operator==( const typename DPtr::PtrType & lhs, const RWCOW_pointer<D, DPtr> & rhs )
583 { return( lhs.get() == rhs.get() ); }
585 template<class D, class DPtr>
586 inline bool operator==( const RWCOW_pointer<D, DPtr> & lhs, const typename DPtr::constPtrType & rhs )
587 { return( lhs.get() == rhs.get() ); }
589 template<class D, class DPtr>
590 inline bool operator==( const typename DPtr::constPtrType & lhs, const RWCOW_pointer<D, DPtr> & rhs )
591 { return( lhs.get() == rhs.get() ); }
593 template<class D, class DPtr>
594 inline bool operator==( const RWCOW_pointer<D, DPtr> & lhs, std::nullptr_t )
595 { return( lhs.get() == nullptr ); }
597 template<class D, class DPtr>
598 inline bool operator==( std::nullptr_t, const RWCOW_pointer<D, DPtr> & rhs )
599 { return( nullptr == rhs.get() ); }
600
602 template<class D, class DPtr>
603 inline bool operator!=( const RWCOW_pointer<D, DPtr> & lhs, const RWCOW_pointer<D, DPtr> & rhs )
604 { return ! ( lhs == rhs ); }
606 template<class D, class DPtr>
607 inline bool operator!=( const RWCOW_pointer<D, DPtr> & lhs, const typename DPtr::PtrType & rhs )
608 { return ! ( lhs == rhs ); }
610 template<class D, class DPtr>
611 inline bool operator!=( const typename DPtr::PtrType & lhs, const RWCOW_pointer<D, DPtr> & rhs )
612 { return ! ( lhs == rhs ); }
614 template<class D, class DPtr>
615 inline bool operator!=( const RWCOW_pointer<D, DPtr> & lhs, const typename DPtr::constPtrType & rhs )
616 { return ! ( lhs == rhs ); }
618 template<class D, class DPtr>
619 inline bool operator!=( const typename DPtr::constPtrType & lhs, const RWCOW_pointer<D, DPtr> & rhs )
620 { return ! ( lhs == rhs ); }
622 template<class D, class DPtr>
623 inline bool operator!=( const RWCOW_pointer<D, DPtr> & lhs, std::nullptr_t )
624 { return( lhs.get() != nullptr ); }
626 template<class D, class DPtr>
627 inline bool operator!=( std::nullptr_t, const RWCOW_pointer<D, DPtr> & rhs )
628 { return( nullptr != rhs.get() ); }
629
631
634} // namespace zypp
636
638#define DEFINE_PTR_TYPE(NAME) \
639class NAME; \
640extern void intrusive_ptr_add_ref( const NAME * ); \
641extern void intrusive_ptr_release( const NAME * ); \
642typedef zypp::intrusive_ptr<NAME> NAME##_Ptr; \
643typedef zypp::intrusive_ptr<const NAME> NAME##_constPtr;
644
646#endif // ZYPP_BASE_PTRTYPES_H
std::ostream & operator<<(std::ostream &str, const zypp::sat::detail::CDataiterator *obj)
Reference counted access to a Tp object calling a custom Dispose function when the last AutoDispose h...
Definition AutoDispose.h:95
void swap(AutoDispose &rhs) noexcept
Exchange the contents of two AutoDispose objects.
bool unique() const
Returns true if this is the only AutoDispose instance managing the current data object.
Definition Arch.h:364
String related utilities and Regular expression matching.
std::string form(const char *format,...) __attribute__((format(printf
Printf style construction of std::string.
Definition String.cc:37
Easy-to use interface to the ZYPP dependency resolver.
std::ostream & dumpOn(std::ostream &str, const Capability &obj)
intrusive_ptr< T > make_intrusive(Args &&... __args)
Definition PtrTypes.h:102
shared_ptr custom deleter doing nothing.
Definition PtrTypes.h:83
void operator()(const void *const) const
Definition PtrTypes.h:84
RW_pointer supporting 'copy on write' functionality.
Definition PtrTypes.h:468
bool operator==(const RWCOW_pointer< D, DPtr > &lhs, const RWCOW_pointer< D, DPtr > &rhs)
Definition PtrTypes.h:574
bool operator!=(const RWCOW_pointer< D, DPtr > &lhs, const typename DPtr::PtrType &rhs)
Definition PtrTypes.h:607
void swap(PtrType &rhs) noexcept
Definition PtrTypes.h:506
bool operator!=(const RWCOW_pointer< D, DPtr > &lhs, const RWCOW_pointer< D, DPtr > &rhs)
Definition PtrTypes.h:603
RWCOW_pointer & operator=(std::nullptr_t)
Definition PtrTypes.h:490
bool operator!=(const RWCOW_pointer< D, DPtr > &lhs, std::nullptr_t)
Definition PtrTypes.h:623
bool operator==(const RWCOW_pointer< D, DPtr > &lhs, const typename DPtr::PtrType &rhs)
Definition PtrTypes.h:578
bool operator==(std::nullptr_t, const RWCOW_pointer< D, DPtr > &rhs)
Definition PtrTypes.h:598
bool operator==(const RWCOW_pointer< D, DPtr > &lhs, std::nullptr_t)
Definition PtrTypes.h:594
const D & operator*() const
Definition PtrTypes.h:512
constPtrType cgetPtr()
Definition PtrTypes.h:543
RWCOW_pointer & operator=(const RWCOW_pointer &)=default
RWCOW_pointer(RWCOW_pointer &&)=default
bool operator!=(const RWCOW_pointer< D, DPtr > &lhs, const typename DPtr::constPtrType &rhs)
Definition PtrTypes.h:615
const D * operator->() const
Definition PtrTypes.h:515
bool operator!=(std::nullptr_t, const RWCOW_pointer< D, DPtr > &rhs)
Definition PtrTypes.h:627
RWCOW_pointer(const RWCOW_pointer &)=default
const D * get() const
Definition PtrTypes.h:518
bool operator!=(const typename DPtr::PtrType &lhs, const RWCOW_pointer< D, DPtr > &rhs)
Definition PtrTypes.h:611
bool operator!=(const typename DPtr::constPtrType &lhs, const RWCOW_pointer< D, DPtr > &rhs)
Definition PtrTypes.h:619
RWCOW_pointer & operator=(RWCOW_pointer &&)=default
RWCOW_pointer(std::nullptr_t)
Definition PtrTypes.h:474
constPtrType getPtr() const
Definition PtrTypes.h:537
bool operator==(const RWCOW_pointer< D, DPtr > &lhs, const typename DPtr::constPtrType &rhs)
Definition PtrTypes.h:586
RWCOW_pointer(PtrType dptr)
Definition PtrTypes.h:486
long use_count() const
Definition PtrTypes.h:534
bool operator==(const typename DPtr::PtrType &lhs, const RWCOW_pointer< D, DPtr > &rhs)
Definition PtrTypes.h:582
bool unique() const
Definition PtrTypes.h:531
bool operator==(const typename DPtr::constPtrType &lhs, const RWCOW_pointer< D, DPtr > &rhs)
Definition PtrTypes.h:590
RWCOW_pointer(typename PtrType::element_type *dptr)
Definition PtrTypes.h:481
void swap(RWCOW_pointer &rhs) noexcept
Definition PtrTypes.h:503
typename DTraits::PtrType PtrType
Definition PtrTypes.h:469
std::ostream & operator<<(std::ostream &str, const RWCOW_pointer< D, DPtr > &obj)
Stream output.
Definition PtrTypes.h:565
D * rwcowClone(const D *rhs)
Clone the underlying object.
Definition PtrTypes.h:452
void reset(typename PtrType::element_type *dptr)
Definition PtrTypes.h:500
typename DTraits::constPtrType constPtrType
Definition PtrTypes.h:470
Wrapper for const correct access via Smart pointer types.
Definition PtrTypes.h:292
typename DTraits::constPtrType constPtrType
Definition PtrTypes.h:294
bool operator!=(const RW_pointer< D, DPtr > &lhs, std::nullptr_t)
Definition PtrTypes.h:437
bool operator!=(const RW_pointer< D, DPtr > &lhs, const typename DPtr::PtrType &rhs)
Definition PtrTypes.h:421
RW_pointer(std::nullptr_t)
Definition PtrTypes.h:303
bool operator==(const RW_pointer< D, DPtr > &lhs, std::nullptr_t)
Definition PtrTypes.h:407
RW_pointer(RW_pointer &&)=default
void swap(PtrType &rhs) noexcept
Definition PtrTypes.h:327
RW_pointer(typename PtrType::element_type *dptr)
Definition PtrTypes.h:306
std::ostream & operator<<(std::ostream &str, const RW_pointer< D, DPtr > &obj)
Stream output.
Definition PtrTypes.h:378
bool operator==(const RW_pointer< D, DPtr > &lhs, const typename DPtr::PtrType &rhs)
Definition PtrTypes.h:391
constPtrType cgetPtr()
Definition PtrTypes.h:364
long use_count() const
Definition PtrTypes.h:355
bool operator!=(const typename DPtr::PtrType &lhs, const RW_pointer< D, DPtr > &rhs)
Definition PtrTypes.h:425
bool operator!=(const typename DPtr::constPtrType &lhs, const RW_pointer< D, DPtr > &rhs)
Definition PtrTypes.h:433
const D * operator->() const
Definition PtrTypes.h:336
void reset(typename PtrType::element_type *dptr)
Definition PtrTypes.h:321
bool operator!=(const RW_pointer< D, DPtr > &lhs, const typename DPtr::constPtrType &rhs)
Definition PtrTypes.h:429
RW_pointer(PtrType dptr)
Definition PtrTypes.h:311
RW_pointer & operator=(const RW_pointer &)=default
constPtrType getPtr() const
Definition PtrTypes.h:358
bool operator==(const RW_pointer< D, DPtr > &lhs, const typename DPtr::constPtrType &rhs)
Definition PtrTypes.h:399
bool operator==(std::nullptr_t, const RW_pointer< D, DPtr > &rhs)
Definition PtrTypes.h:411
bool operator!=(std::nullptr_t, const RW_pointer< D, DPtr > &rhs)
Definition PtrTypes.h:441
const D & operator*() const
Definition PtrTypes.h:333
void swap(RW_pointer &rhs) noexcept
Definition PtrTypes.h:324
const D * get() const
Definition PtrTypes.h:339
bool unique() const
Definition PtrTypes.h:352
typename DTraits::PtrType PtrType
Definition PtrTypes.h:293
RW_pointer(const RW_pointer &)=default
bool operator==(const typename DPtr::PtrType &lhs, const RW_pointer< D, DPtr > &rhs)
Definition PtrTypes.h:395
PtrType getPtr()
Definition PtrTypes.h:361
bool operator==(const typename DPtr::constPtrType &lhs, const RW_pointer< D, DPtr > &rhs)
Definition PtrTypes.h:403
RW_pointer & operator=(std::nullptr_t)
Definition PtrTypes.h:315
bool operator!=(const RW_pointer< D, DPtr > &lhs, const RW_pointer< D, DPtr > &rhs)
Definition PtrTypes.h:417
RW_pointer & operator=(RW_pointer &&)=default
bool operator==(const RW_pointer< D, DPtr > &lhs, const RW_pointer< D, DPtr > &rhs)
Definition PtrTypes.h:387
long use_count(const PtrType &ptr_r) const
Definition PtrTypes.h:225
long use_count(const constPtrType &ptr_r) const
Return number of references.
Definition PtrTypes.h:223
bool unique(const PtrType &ptr_r)
Definition PtrTypes.h:220
bool unique(const constPtrType &ptr_r)
Check whether pointer is not shared.
Definition PtrTypes.h:218
long use_count(const PtrType &ptr_r) const
Definition PtrTypes.h:242
bool unique(const constPtrType &ptr_r)
Check whether pointer is not shared.
Definition PtrTypes.h:235
bool unique(const PtrType &ptr_r)
Definition PtrTypes.h:237
long use_count(const constPtrType &ptr_r) const
Return number of references.
Definition PtrTypes.h:240
long use_count(const PtrType &ptr_r) const
Definition PtrTypes.h:208
long use_count(const constPtrType &ptr_r) const
Return number of references.
Definition PtrTypes.h:206
bool unique(const constPtrType &ptr_r)
Check whether pointer is not shared.
Definition PtrTypes.h:201
bool unique(const PtrType &ptr_r)
Definition PtrTypes.h:203