#include <memory>
#include <zypp-core/base/Easy.h>
Go to the source code of this file.
◆ LIBZYPP_NG_EXPORT
      
        
          | #define LIBZYPP_NG_EXPORT | 
      
 
 
◆ LIBZYPP_NG_NO_EXPORT
      
        
          | #define LIBZYPP_NG_NO_EXPORT | 
      
 
 
◆ ZYPP_DECLARE_PRIVATE
      
        
          | #define ZYPP_DECLARE_PRIVATE | ( |  | Class | ) |  | 
      
 
Value:    Class##Private* d_func();\
    const Class##Private* d_func() const; \
    friend class Class##Private;
Definition at line 87 of file zyppglobal.h.
 
 
◆ ZYPP_IMPL_PRIVATE
      
        
          | #define ZYPP_IMPL_PRIVATE | ( |  | Class | ) |  | 
      
 
Value:    Class##Private* Class::d_func() \
    const Class##Private* Class::d_func() const \
T * zyppGetPtrHelper(T *ptr)
Definition at line 92 of file zyppglobal.h.
 
 
◆ ZYPP_DECLARE_PUBLIC
      
        
          | #define ZYPP_DECLARE_PUBLIC | ( |  | Class | ) |  | 
      
 
Value:    public:                                            \
    inline Class* z_func() { return static_cast<Class *>(z_ptr); } \
    inline const Class* z_func() const { return static_cast<const Class *>(z_ptr); } \
    friend class Class; \
    private:
Definition at line 98 of file zyppglobal.h.
 
 
◆ Z_D
◆ Z_Z
◆ ZYPP_FWD_DECL_REFS
      
        
          | #define ZYPP_FWD_DECL_REFS | ( |  | T | ) |  | 
      
 
Value:  using T##Ref = Ref<T>; \
  using T##WeakRef = WeakRef<T>
Helper macro to declare Ref types 
Definition at line 119 of file zyppglobal.h.
 
 
◆ ZYPP_FWD_DECL_TYPE_WITH_REFS
      
        
          | #define ZYPP_FWD_DECL_TYPE_WITH_REFS | ( |  | T | ) |  | 
      
 
Value:  class T; \
  ZYPP_FWD_DECL_REFS(T)
Definition at line 126 of file zyppglobal.h.
 
 
◆ ZYPP_FWD_DECL_TEMPL_TYPE_WITH_REFS_ARG1
      
        
          | #define ZYPP_FWD_DECL_TEMPL_TYPE_WITH_REFS_ARG1 | ( |  | T, | 
        
          |  |  |  | TArg1 ) | 
      
 
Value:  template< typename TArg1> \
  class T; \
  template< typename TArg1> \
  using T##Ref = Ref<T<TArg1>>; \
  template< typename TArg1> \
  using T##WeakRef = WeakRef<T<TArg1>>
Definition at line 130 of file zyppglobal.h.
 
 
◆ ZYPP_ADD_PRIVATE_CONSTR_HELPER
      
        
          | #define ZYPP_ADD_PRIVATE_CONSTR_HELPER | ( |  | ) |  | 
      
 
Value:  struct private_constr_t {  private_constr_t () noexcept = default; }
Defines a dummy struct that can be used to make a public constructor unusable outside the class. 
- See also
- ZYPP_ADD_CREATE_FUNC. 
Definition at line 154 of file zyppglobal.h.
 
 
◆ ZYPP_PRIVATE_CONSTR_ARG
      
        
          | #define ZYPP_PRIVATE_CONSTR_ARG     private_constr_t | 
      
 
Use this to add the private constr argument to a constructor 
Definition at line 160 of file zyppglobal.h.
 
 
◆ ZYPP_PRIVATE_CONSTR_ARG_VAL
      
        
          | #define ZYPP_PRIVATE_CONSTR_ARG_VAL     private_constr_t{} | 
      
 
Use this to pass the private constr arg to a constructor 
Definition at line 166 of file zyppglobal.h.
 
 
◆ ZYPP_ADD_CREATE_FUNC
      
        
          | #define ZYPP_ADD_CREATE_FUNC | ( |  | Class | ) |  | 
      
 
Value:  private: \
    ZYPP_ADD_PRIVATE_CONSTR_HELPER(); \
  public: \
    template < typename ...Args > \
    inline static auto create ( Args &&... args ) { \
      return std::make_shared< Class >( private_constr_t{}, std::forward<Args>(args)... ); \
    } \
  private:
Helper macro to add the default Class::create() static function commonly used in libzypp.
 
class MyClass
{
 
 
 public:
   
   
 
   
   
}
 
 
}
 
 
}
#define ZYPP_IMPL_PRIVATE_CONSTR_ARGS(Class,...)
#define ZYPP_DECL_PRIVATE_CONSTR_ARGS(Class,...)
#define ZYPP_DECL_PRIVATE_CONSTR(Class)
#define ZYPP_ADD_CREATE_FUNC(Class)
#define ZYPP_IMPL_PRIVATE_CONSTR(Class)
#define ZYPP_FWD_DECL_TYPE_WITH_REFS(T)
  - Note
- requires the ref types for the class to be already defined \TODO Add this to already existing objects 
Definition at line 205 of file zyppglobal.h.
 
 
◆ ZYPP_DECL_PRIVATE_CONSTR
      
        
          | #define ZYPP_DECL_PRIVATE_CONSTR | ( |  | Class | ) |  | 
      
 
Value:Class( private_constr_t )
Definition at line 221 of file zyppglobal.h.
 
 
◆ ZYPP_IMPL_PRIVATE_CONSTR
      
        
          | #define ZYPP_IMPL_PRIVATE_CONSTR | ( |  | Class | ) |  | 
      
 
Value:Class::Class( private_constr_t )
Definition at line 222 of file zyppglobal.h.
 
 
◆ ZYPP_DECL_PRIVATE_CONSTR_ARGS
      
        
          | #define ZYPP_DECL_PRIVATE_CONSTR_ARGS | ( |  | Class, | 
        
          |  |  |  | ... ) | 
      
 
Value:Class( private_constr_t, __VA_ARGS__ )
Definition at line 223 of file zyppglobal.h.
 
 
◆ ZYPP_IMPL_PRIVATE_CONSTR_ARGS
      
        
          | #define ZYPP_IMPL_PRIVATE_CONSTR_ARGS | ( |  | Class, | 
        
          |  |  |  | ... ) | 
      
 
Value:Class::Class( private_constr_t, __VA_ARGS__ )
Definition at line 224 of file zyppglobal.h.
 
 
◆ ZYPP_NODISCARD
      
        
          | #define ZYPP_NODISCARD   [[nodiscard]] | 
      
 
 
◆ zyppGetPtrHelper() [1/3]
template<typename T> 
  
  | 
        
          | T * zyppGetPtrHelper | ( | T * | ptr | ) |  |  | inline | 
 
 
◆ zyppGetPtrHelper() [2/3]
template<typename Ptr> 
  
  | 
        
          | auto zyppGetPtrHelper | ( | const Ptr & | ptr | ) | -> decltype(ptr.operator->()) |  | inline | 
 
 
◆ zyppGetPtrHelper() [3/3]
template<typename Ptr> 
  
  | 
        
          | auto zyppGetPtrHelper | ( | Ptr & | ptr | ) | -> decltype(ptr.operator->()) |  | inline |