libzypp  17.37.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 <zypp/Globals.h>
20 #include <boost/scoped_ptr.hpp>
21 #include <boost/shared_ptr.hpp>
22 #include <boost/weak_ptr.hpp>
23 #include <boost/intrusive_ptr.hpp>
24 
26 namespace zypp
27 {
28 
29  namespace str
30  {
31  // printing void* (prevents us from including <ostream>)
32  std::string form( const char * format, ... ) __attribute__ ((format (printf, 1, 2)));
33  }
34 
51 
83  struct NullDeleter
84  {
85  void operator()( const void *const ) const
86  {}
87  };
88 
90  using boost::scoped_ptr;
91 
93  using boost::shared_ptr;
94 
96  using boost::weak_ptr;
97 
99  using boost::intrusive_ptr;
100 
101  template<typename T, typename... Args>
102  inline intrusive_ptr<T>
103  make_intrusive( Args&&... __args ) {
104  return intrusive_ptr<T>( new T( std::forward<Args>(__args)...) );
105  }
106 
108  using boost::static_pointer_cast;
110  using boost::const_pointer_cast;
112  using boost::dynamic_pointer_cast;
113 
115 } // namespace zypp
118 namespace std
119 {
120 
121  // namespace sub {
122  // class Foo;
123  // typedef zypp::intrusive_ptr<Foo> Foo_Ptr; // see DEFINE_PTR_TYPE(NAME) macro below
124  // }
125 
126  // Defined in namespace std g++ finds the output operator (König-Lookup),
127  // even if we typedef the pointer in a different namespace than ::zypp.
128  // Otherwise we had to define an output operator always in the same namespace
129  // as the typedef (else g++ will just print the pointer value).
130 
132  template<class D>
133  inline std::ostream & operator<<( std::ostream & str, const zypp::shared_ptr<D> & obj )
134  {
135  if ( obj )
136  return str << *obj;
137  return str << std::string("NULL");
138  }
140  template<>
141  inline std::ostream & operator<<( std::ostream & str, const zypp::shared_ptr<void> & obj )
142  {
143  if ( obj )
144  return str << zypp::str::form( "%p", static_cast<void*>(obj.get()) );
145  return str << std::string("NULL");
146  }
147 
149  template<class D>
150  inline std::ostream & dumpOn( std::ostream & str, const zypp::shared_ptr<D> & obj )
151  {
152  if ( obj )
153  return dumpOn( str, *obj );
154  return str << std::string("NULL");
155  }
157  template<>
158  inline std::ostream & dumpOn( std::ostream & str, const zypp::shared_ptr<void> & obj )
159  { return str << obj; }
160 
162  template<class D>
163  inline std::ostream & operator<<( std::ostream & str, const zypp::intrusive_ptr<D> & obj )
164  {
165  if ( obj )
166  return str << *obj;
167  return str << std::string("NULL");
168  }
170  template<class D>
171  inline std::ostream & dumpOn( std::ostream & str, const zypp::intrusive_ptr<D> & obj )
172  {
173  if ( obj )
174  return dumpOn( str, *obj );
175  return str << std::string("NULL");
176  }
178 } // namespace std
181 namespace zypp
182 {
183 
185  //
186  // RW_pointer traits
187  //
189 
194  namespace rw_pointer {
195 
196  template<class D>
197  struct Shared
198  {
199  using PtrType = shared_ptr<D>;
200  using constPtrType = shared_ptr<const D>;
202  bool unique( const constPtrType & ptr_r )
203  { return !ptr_r || ptr_r.unique(); }
204  bool unique( const PtrType & ptr_r )
205  { return !ptr_r || ptr_r.unique(); }
207  long use_count( const constPtrType & ptr_r ) const
208  { return ptr_r.use_count(); }
209  long use_count( const PtrType & ptr_r ) const
210  { return ptr_r.use_count(); }
211  };
212 
213  template<class D>
214  struct Intrusive
215  {
216  using PtrType = intrusive_ptr<D>;
217  using constPtrType = intrusive_ptr<const D>;
219  bool unique( const constPtrType & ptr_r )
220  { return !ptr_r || (ptr_r->refCount() <= 1); }
221  bool unique( const PtrType & ptr_r )
222  { return !ptr_r || (ptr_r->refCount() <= 1); }
224  long use_count( const constPtrType & ptr_r ) const
225  { return ptr_r ? ptr_r->refCount() : 0; }
226  long use_count( const PtrType & ptr_r ) const
227  { return ptr_r ? ptr_r->refCount() : 0; }
228  };
229 
230  template<class D>
231  struct Scoped
232  {
233  using PtrType = scoped_ptr<D>;
234  using constPtrType = scoped_ptr<const D>;
236  bool unique( const constPtrType & ptr_r )
237  { return true; }
238  bool unique( const PtrType & ptr_r )
239  { return true; }
241  long use_count( const constPtrType & ptr_r ) const
242  { return ptr_r ? 1 : 0; }
243  long use_count( const PtrType & ptr_r ) const
244  { return ptr_r ? 1 : 0; }
245  };
246 
247  }
249 
251  //
252  // CLASS NAME : RW_pointer
253  //
291  template<class D, class DTraits = rw_pointer::Shared<D> >
292  struct RW_pointer
293  {
294  using PtrType = typename DTraits::PtrType;
295  using constPtrType = typename DTraits::constPtrType;
296 
298  {}
299 
300  RW_pointer(const RW_pointer &) = default;
301  RW_pointer(RW_pointer &&) = default;
302  RW_pointer &operator=(const RW_pointer &) = default;
303  RW_pointer &operator=(RW_pointer &&) = default;
304  RW_pointer(std::nullptr_t) {}
305 
306  explicit
307  RW_pointer( typename PtrType::element_type * dptr )
308  : _dptr( dptr )
309  {}
310 
311  explicit
313  : _dptr( dptr )
314  {}
315 
316  RW_pointer & operator=( std::nullptr_t )
317  { reset(); return *this; }
318 
319  void reset()
320  { PtrType().swap( _dptr ); }
321 
322  void reset( typename PtrType::element_type * dptr )
323  { PtrType( dptr ).swap( _dptr ); }
324 
325  void swap( RW_pointer & rhs ) noexcept
326  { _dptr.swap( rhs._dptr ); }
327 
328  void swap( PtrType & rhs ) noexcept
329  { _dptr.swap( rhs ); }
330 
331  explicit operator bool() const
332  { return _dptr.get() != nullptr; }
333 
334  const D & operator*() const
335  { return *_dptr; };
336 
337  const D * operator->() const
338  { return _dptr.operator->(); }
339 
340  const D * get() const
341  { return _dptr.get(); }
342 
343  D & operator*()
344  { return *_dptr; }
345 
347  { return _dptr.operator->(); }
348 
349  D * get()
350  { return _dptr.get(); }
351 
352  public:
353  bool unique() const
354  { return DTraits().unique( _dptr ); }
355 
356  long use_count() const
357  { return DTraits().use_count( _dptr ); }
358 
360  { return _dptr; }
361 
363  { return _dptr; }
364 
366  { return _dptr; }
367 
368  private:
370  };
372 
378  template<class D, class DPtr>
379  inline std::ostream & operator<<( std::ostream & str, const RW_pointer<D, DPtr> & obj )
380  {
381  if ( obj.get() )
382  return str << *obj.get();
383  return str << std::string("NULL");
384  }
385 
387  template<class D, class DPtr>
388  inline bool operator==( const RW_pointer<D, DPtr> & lhs, const RW_pointer<D, DPtr> & rhs )
389  { return( lhs.get() == rhs.get() ); }
391  template<class D, class DPtr>
392  inline bool operator==( const RW_pointer<D, DPtr> & lhs, const typename DPtr::PtrType & rhs )
393  { return( lhs.get() == rhs.get() ); }
395  template<class D, class DPtr>
396  inline bool operator==( const typename DPtr::PtrType & lhs, const RW_pointer<D, DPtr> & rhs )
397  { return( lhs.get() == rhs.get() ); }
399  template<class D, class DPtr>
400  inline bool operator==( const RW_pointer<D, DPtr> & lhs, const typename DPtr::constPtrType & rhs )
401  { return( lhs.get() == rhs.get() ); }
403  template<class D, class DPtr>
404  inline bool operator==( const typename DPtr::constPtrType & lhs, const RW_pointer<D, DPtr> & rhs )
405  { return( lhs.get() == rhs.get() ); }
407  template<class D, class DPtr>
408  inline bool operator==( const RW_pointer<D, DPtr> & lhs, std::nullptr_t )
409  { return( lhs.get() == nullptr ); }
411  template<class D, class DPtr>
412  inline bool operator==( std::nullptr_t, const RW_pointer<D, DPtr> & rhs )
413  { return( nullptr == rhs.get() ); }
414 
415 
417  template<class D, class DPtr>
418  inline bool operator!=( const RW_pointer<D, DPtr> & lhs, const RW_pointer<D, DPtr> & rhs )
419  { return ! ( lhs == rhs ); }
421  template<class D, class DPtr>
422  inline bool operator!=( const RW_pointer<D, DPtr> & lhs, const typename DPtr::PtrType & rhs )
423  { return ! ( lhs == rhs ); }
425  template<class D, class DPtr>
426  inline bool operator!=( const typename DPtr::PtrType & lhs, const RW_pointer<D, DPtr> & rhs )
427  { return ! ( lhs == rhs ); }
429  template<class D, class DPtr>
430  inline bool operator!=( const RW_pointer<D, DPtr> & lhs, const typename DPtr::constPtrType & rhs )
431  { return ! ( lhs == rhs ); }
433  template<class D, class DPtr>
434  inline bool operator!=( const typename DPtr::constPtrType & lhs, const RW_pointer<D, DPtr> & rhs )
435  { return ! ( lhs == rhs ); }
437  template<class D, class DPtr>
438  inline bool operator!=( const RW_pointer<D, DPtr> & lhs, std::nullptr_t )
439  { return( lhs.get() != nullptr ); }
441  template<class D, class DPtr>
442  inline bool operator!=( std::nullptr_t, const RW_pointer<D, DPtr> & rhs )
443  { return( nullptr != rhs.get() ); }
444 
446 
452  template<class D>
453  inline D * rwcowClone( const D * rhs )
454  { return rhs->clone(); }
455 
457  //
458  // CLASS NAME : RWCOW_pointer
459  //
467  template<class D, class DTraits = rw_pointer::Shared<D> >
469  {
470  using PtrType = typename DTraits::PtrType;
471  using constPtrType = typename DTraits::constPtrType;
472 
474 
475  RWCOW_pointer(std::nullptr_t) {}
476 
477  RWCOW_pointer(const RWCOW_pointer &) = default;
478 
479  RWCOW_pointer(RWCOW_pointer &&) = default;
480 
481  explicit
482  RWCOW_pointer( typename PtrType::element_type * dptr )
483  : _dptr( dptr )
484  {}
485 
486  explicit
488  : _dptr( dptr )
489  {}
490 
491  RWCOW_pointer & operator=( std::nullptr_t )
492  { reset(); return *this; }
493 
494  RWCOW_pointer &operator=(const RWCOW_pointer &) = default;
495 
496  RWCOW_pointer &operator=(RWCOW_pointer &&) = default;
497 
498  void reset()
499  { PtrType().swap( _dptr ); }
500 
501  void reset( typename PtrType::element_type * dptr )
502  { PtrType( dptr ).swap( _dptr ); }
503 
504  void swap( RWCOW_pointer & rhs ) noexcept
505  { _dptr.swap( rhs._dptr ); }
506 
507  void swap( PtrType & rhs ) noexcept
508  { _dptr.swap( rhs ); }
509 
510  explicit operator bool() const
511  { return _dptr.get() != nullptr; }
512 
513  const D & operator*() const
514  { return *_dptr; };
515 
516  const D * operator->() const
517  { return _dptr.operator->(); }
518 
519  const D * get() const
520  { return _dptr.get(); }
521 
522  D & operator*()
523  { assertUnshared(); return *_dptr; }
524 
526  { assertUnshared(); return _dptr.operator->(); }
527 
528  D * get()
529  { assertUnshared(); return _dptr.get(); }
530 
531  public:
532  bool unique() const
533  { return DTraits().unique( _dptr ); }
534 
535  long use_count() const
536  { return DTraits().use_count( _dptr ); }
537 
539  { return _dptr; }
540 
542  { assertUnshared(); return _dptr; }
543 
545  { return _dptr; }
546 
547  private:
548 
550  {
551  if ( !unique() )
552  PtrType( rwcowClone( _dptr.get() ) ).swap( _dptr );
553  }
554 
555  private:
557  };
559 
565  template<class D, class DPtr>
566  inline std::ostream & operator<<( std::ostream & str, const RWCOW_pointer<D, DPtr> & obj )
567  {
568  if ( obj.get() )
569  return str << *obj.get();
570  return str << std::string("NULL");
571  }
572 
574  template<class D, class DPtr>
575  inline bool operator==( const RWCOW_pointer<D, DPtr> & lhs, const RWCOW_pointer<D, DPtr> & rhs )
576  { return( lhs.get() == rhs.get() ); }
578  template<class D, class DPtr>
579  inline bool operator==( const RWCOW_pointer<D, DPtr> & lhs, const typename DPtr::PtrType & rhs )
580  { return( lhs.get() == rhs.get() ); }
582  template<class D, class DPtr>
583  inline bool operator==( const typename DPtr::PtrType & lhs, const RWCOW_pointer<D, DPtr> & rhs )
584  { return( lhs.get() == rhs.get() ); }
586  template<class D, class DPtr>
587  inline bool operator==( const RWCOW_pointer<D, DPtr> & lhs, const typename DPtr::constPtrType & rhs )
588  { return( lhs.get() == rhs.get() ); }
590  template<class D, class DPtr>
591  inline bool operator==( const typename DPtr::constPtrType & lhs, const RWCOW_pointer<D, DPtr> & rhs )
592  { return( lhs.get() == rhs.get() ); }
594  template<class D, class DPtr>
595  inline bool operator==( const RWCOW_pointer<D, DPtr> & lhs, std::nullptr_t )
596  { return( lhs.get() == nullptr ); }
598  template<class D, class DPtr>
599  inline bool operator==( std::nullptr_t, const RWCOW_pointer<D, DPtr> & rhs )
600  { return( nullptr == rhs.get() ); }
601 
603  template<class D, class DPtr>
604  inline bool operator!=( const RWCOW_pointer<D, DPtr> & lhs, const RWCOW_pointer<D, DPtr> & rhs )
605  { return ! ( lhs == rhs ); }
607  template<class D, class DPtr>
608  inline bool operator!=( const RWCOW_pointer<D, DPtr> & lhs, const typename DPtr::PtrType & rhs )
609  { return ! ( lhs == rhs ); }
611  template<class D, class DPtr>
612  inline bool operator!=( const typename DPtr::PtrType & lhs, const RWCOW_pointer<D, DPtr> & rhs )
613  { return ! ( lhs == rhs ); }
615  template<class D, class DPtr>
616  inline bool operator!=( const RWCOW_pointer<D, DPtr> & lhs, const typename DPtr::constPtrType & rhs )
617  { return ! ( lhs == rhs ); }
619  template<class D, class DPtr>
620  inline bool operator!=( const typename DPtr::constPtrType & lhs, const RWCOW_pointer<D, DPtr> & rhs )
621  { return ! ( lhs == rhs ); }
623  template<class D, class DPtr>
624  inline bool operator!=( const RWCOW_pointer<D, DPtr> & lhs, std::nullptr_t )
625  { return( lhs.get() != nullptr ); }
627  template<class D, class DPtr>
628  inline bool operator!=( std::nullptr_t, const RWCOW_pointer<D, DPtr> & rhs )
629  { return( nullptr != rhs.get() ); }
630 
632 
634 } // namespace zypp
637 
639 #define DEFINE_PTR_TYPE(NAME) \
640 class NAME; \
641 extern void intrusive_ptr_add_ref( const NAME * ) ZYPP_API; \
642 extern void intrusive_ptr_release( const NAME * ) ZYPP_API; \
643 typedef zypp::intrusive_ptr<NAME> NAME##_Ptr; \
644 typedef zypp::intrusive_ptr<const NAME> NAME##_constPtr;
645 
647 #endif // ZYPP_BASE_PTRTYPES_H
void swap(RWCOW_pointer &rhs) noexcept
Definition: PtrTypes.h:504
void swap(PtrType &rhs) noexcept
Definition: PtrTypes.h:328
long use_count(const constPtrType &ptr_r) const
Return number of references.
Definition: PtrTypes.h:207
void assertUnshared()
Definition: PtrTypes.h:549
RWCOW_pointer(PtrType dptr)
Definition: PtrTypes.h:487
bool operator!=(const RWCOW_pointer< D, DPtr > &lhs, std::nullptr_t)
Definition: PtrTypes.h:624
bool unique() const
Definition: PtrTypes.h:532
RWCOW_pointer & operator=(std::nullptr_t)
Definition: PtrTypes.h:491
bool operator==(const typename DPtr::PtrType &lhs, const RW_pointer< D, DPtr > &rhs)
Definition: PtrTypes.h:396
PtrType getPtr()
Definition: PtrTypes.h:362
void swap(RW_pointer &rhs) noexcept
Definition: PtrTypes.h:325
bool operator!=(const RW_pointer< D, DPtr > &lhs, const typename DPtr::constPtrType &rhs)
Definition: PtrTypes.h:430
shared_ptr< zypp::PurgeKernels::Impl > PtrType
Definition: PtrTypes.h:199
constPtrType getPtr() const
Definition: PtrTypes.h:359
bool operator!=(const typename DPtr::PtrType &lhs, const RWCOW_pointer< D, DPtr > &rhs)
Definition: PtrTypes.h:612
scoped_ptr< const zypp::ZConfig::Impl > constPtrType
Definition: PtrTypes.h:234
String related utilities and Regular expression matching.
Impl * clone() const
clone for RWCOW_pointer
RW_pointer & operator=(const RW_pointer &)=default
PtrType getPtr()
Definition: PtrTypes.h:541
Definition: Arch.h:363
bool operator==(const RWCOW_pointer< D, DPtr > &lhs, const typename DPtr::constPtrType &rhs)
Definition: PtrTypes.h:587
bool operator==(std::nullptr_t, const RWCOW_pointer< D, DPtr > &rhs)
Definition: PtrTypes.h:599
bool operator!=(const RW_pointer< D, DPtr > &lhs, const typename DPtr::PtrType &rhs)
Definition: PtrTypes.h:422
void reset(typename PtrType::element_type *dptr)
Definition: PtrTypes.h:501
long use_count() const
Definition: PtrTypes.h:356
long use_count(const constPtrType &ptr_r) const
Return number of references.
Definition: PtrTypes.h:241
PtrType _dptr
Definition: PtrTypes.h:369
bool unique(const PtrType &ptr_r)
Definition: PtrTypes.h:238
std::string form(const char *format,...) __attribute__((format(printf
Printf style construction of std::string.
Definition: String.cc:39
bool operator==(const RW_pointer< D, DPtr > &lhs, std::nullptr_t)
Definition: PtrTypes.h:408
bool operator!=(const typename DPtr::PtrType &lhs, const RW_pointer< D, DPtr > &rhs)
Definition: PtrTypes.h:426
const D * operator->() const
Definition: PtrTypes.h:516
RW_pointer(PtrType dptr)
Definition: PtrTypes.h:312
bool operator!=(const RW_pointer< D, DPtr > &lhs, std::nullptr_t)
Definition: PtrTypes.h:438
bool operator==(const typename DPtr::constPtrType &lhs, const RWCOW_pointer< D, DPtr > &rhs)
Definition: PtrTypes.h:591
bool unique(const constPtrType &ptr_r)
Check whether pointer is not shared.
Definition: PtrTypes.h:202
const D * get() const
Definition: PtrTypes.h:340
bool unique(const PtrType &ptr_r)
Definition: PtrTypes.h:204
intrusive_ptr< const zypp::target::TargetImpl > constPtrType
Definition: PtrTypes.h:217
RWCOW_pointer(typename PtrType::element_type *dptr)
Definition: PtrTypes.h:482
typename rw_pointer::Shared< zypp::keyring::VerifyFileContext::Impl > ::PtrType PtrType
Definition: PtrTypes.h:470
bool operator==(const RWCOW_pointer< D, DPtr > &lhs, const typename DPtr::PtrType &rhs)
Definition: PtrTypes.h:579
bool operator!=(std::nullptr_t, const RW_pointer< D, DPtr > &rhs)
Definition: PtrTypes.h:442
bool operator!=(const RW_pointer< D, DPtr > &lhs, const RW_pointer< D, DPtr > &rhs)
Definition: PtrTypes.h:418
long use_count(const PtrType &ptr_r) const
Definition: PtrTypes.h:243
RW_pointer(std::nullptr_t)
Definition: PtrTypes.h:304
intrusive_ptr< zypp::target::TargetImpl > PtrType
Definition: PtrTypes.h:216
constPtrType cgetPtr()
Definition: PtrTypes.h:365
bool operator==(const RW_pointer< D, DPtr > &lhs, const RW_pointer< D, DPtr > &rhs)
Definition: PtrTypes.h:388
bool operator!=(const RWCOW_pointer< D, DPtr > &lhs, const RWCOW_pointer< D, DPtr > &rhs)
Definition: PtrTypes.h:604
const D & operator*() const
Definition: PtrTypes.h:334
D * rwcowClone(const D *rhs)
Definition: PtrTypes.h:453
std::ostream & dumpOn(std::ostream &str, const Capability &obj)
Definition: Capability.cc:580
long use_count() const
Definition: PtrTypes.h:535
bool operator==(const RW_pointer< D, DPtr > &lhs, const typename DPtr::constPtrType &rhs)
Definition: PtrTypes.h:400
long use_count(const constPtrType &ptr_r) const
Return number of references.
Definition: PtrTypes.h:224
bool operator!=(const RWCOW_pointer< D, DPtr > &lhs, const typename DPtr::constPtrType &rhs)
Definition: PtrTypes.h:616
long use_count(const PtrType &ptr_r) const
Definition: PtrTypes.h:209
D * operator->()
Definition: PtrTypes.h:346
constPtrType cgetPtr()
Definition: PtrTypes.h:544
bool unique(const constPtrType &ptr_r)
Check whether pointer is not shared.
Definition: PtrTypes.h:236
RW_pointer(typename PtrType::element_type *dptr)
Definition: PtrTypes.h:307
typename rw_pointer::Shared< zypp::PurgeKernels::Impl > ::constPtrType constPtrType
Definition: PtrTypes.h:295
void reset(typename PtrType::element_type *dptr)
Definition: PtrTypes.h:322
shared_ptr custom deleter doing nothing.
Definition: PtrTypes.h:83
const D & operator*() const
Definition: PtrTypes.h:513
struct zypp::media::MediaBlock __attribute__
const D * operator->() const
Definition: PtrTypes.h:337
intrusive_ptr< T > make_intrusive(Args &&... __args)
Definition: PtrTypes.h:103
bool operator==(const typename DPtr::constPtrType &lhs, const RW_pointer< D, DPtr > &rhs)
Definition: PtrTypes.h:404
bool operator==(const RWCOW_pointer< D, DPtr > &lhs, const RWCOW_pointer< D, DPtr > &rhs)
Definition: PtrTypes.h:575
typename rw_pointer::Shared< zypp::PurgeKernels::Impl > ::PtrType PtrType
Definition: PtrTypes.h:294
bool unique() const
Definition: PtrTypes.h:353
Wrapper for const correct access via Smart pointer types.
Definition: PtrTypes.h:292
bool unique(const constPtrType &ptr_r)
Check whether pointer is not shared.
Definition: PtrTypes.h:219
RWCOW_pointer(std::nullptr_t)
Definition: PtrTypes.h:475
const D * get() const
Definition: PtrTypes.h:519
bool operator==(const RWCOW_pointer< D, DPtr > &lhs, std::nullptr_t)
Definition: PtrTypes.h:595
void swap(PtrType &rhs) noexcept
Definition: PtrTypes.h:507
bool operator!=(const typename DPtr::constPtrType &lhs, const RWCOW_pointer< D, DPtr > &rhs)
Definition: PtrTypes.h:620
shared_ptr< const zypp::PurgeKernels::Impl > constPtrType
Definition: PtrTypes.h:200
bool unique(const PtrType &ptr_r)
Definition: PtrTypes.h:221
long use_count(const PtrType &ptr_r) const
Definition: PtrTypes.h:226
Easy-to use interface to the ZYPP dependency resolver.
Definition: Application.cc:19
scoped_ptr< zypp::ZConfig::Impl > PtrType
Definition: PtrTypes.h:233
typename rw_pointer::Shared< zypp::keyring::VerifyFileContext::Impl > ::constPtrType constPtrType
Definition: PtrTypes.h:471
bool operator==(const RW_pointer< D, DPtr > &lhs, const typename DPtr::PtrType &rhs)
Definition: PtrTypes.h:392
void operator()(const void *const) const
Definition: PtrTypes.h:85
constPtrType getPtr() const
Definition: PtrTypes.h:538
bool operator!=(std::nullptr_t, const RWCOW_pointer< D, DPtr > &rhs)
Definition: PtrTypes.h:628
bool operator!=(const typename DPtr::constPtrType &lhs, const RW_pointer< D, DPtr > &rhs)
Definition: PtrTypes.h:434
bool operator!=(const RWCOW_pointer< D, DPtr > &lhs, const typename DPtr::PtrType &rhs)
Definition: PtrTypes.h:608
RW_pointer supporting &#39;copy on write&#39; functionality.
Definition: PtrTypes.h:468
RW_pointer & operator=(std::nullptr_t)
Definition: PtrTypes.h:316
bool operator==(const typename DPtr::PtrType &lhs, const RWCOW_pointer< D, DPtr > &rhs)
Definition: PtrTypes.h:583
bool operator==(std::nullptr_t, const RW_pointer< D, DPtr > &rhs)
Definition: PtrTypes.h:412