QtBase  v6.3.1
Classes | Macros | Typedefs | Variables
hb-null.hh File Reference
#include "hb.hh"
#include "hb-meta.hh"
Include dependency graph for hb-null.hh:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _hb_null_size< T, typename >
 
struct  _hb_null_size< T, hb_void_t< decltype(T::min_size)> >
 
struct  _hb_static_size< T, typename >
 
struct  _hb_static_size< T, hb_void_t< decltype(T::min_size)> >
 
struct  _hb_min_size< T, typename >
 
struct  _hb_min_size< T, hb_void_t< decltype(T::min_size)> >
 
struct  Null< Type >
 
struct  NullHelper< QType >
 
struct  CrapHelper< QType >
 
struct  CrapOrNullHelper< Type >
 
struct  CrapOrNullHelper< const Type >
 
struct  hb_nonnull_ptr_t< P >
 

Macros

#define HB_NULL_POOL_SIZE   384
 
#define hb_null_size(T)   hb_null_size<T>::value
 
#define hb_static_size(T)   hb_static_size<T>::value
 
#define hb_min_size(T)   hb_min_size<T>::value
 
#define Null(Type)   NullHelper<Type>::get_null ()
 
#define DECLARE_NULL_NAMESPACE_BYTES(Namespace, Type)
 
#define DEFINE_NULL_NAMESPACE_BYTES(Namespace, Type)    const unsigned char _hb_Null_##Namespace##_##Type[Namespace::Type::null_size]
 
#define DECLARE_NULL_INSTANCE(Type)
 
#define DEFINE_NULL_INSTANCE(Type)    const Type _hb_Null_##Type
 
#define Crap(Type)   CrapHelper<Type>::get_crap ()
 
#define CrapOrNull(Type)   CrapOrNullHelper<Type>::get ()
 

Typedefs

template<typename T >
using hb_null_size = _hb_null_size< T, void >
 
template<typename T >
using hb_static_size = _hb_static_size< T, void >
 
template<typename T >
using hb_min_size = _hb_min_size< T, void >
 

Variables

HB_INTERNAL uint64_t const _hb_NullPool [(HB_NULL_POOL_SIZE+sizeof(uint64_t) - 1)/sizeof(uint64_t)]
 
HB_INTERNAL uint64_t _hb_CrapPool [(HB_NULL_POOL_SIZE+sizeof(uint64_t) - 1)/sizeof(uint64_t)]
 

Macro Definition Documentation

◆ Crap

#define Crap (   Type)    CrapHelper<Type>::get_crap ()

Definition at line 159 of file hb-null.hh.

◆ CrapOrNull

#define CrapOrNull (   Type)    CrapOrNullHelper<Type>::get ()

Definition at line 169 of file hb-null.hh.

◆ DECLARE_NULL_INSTANCE

#define DECLARE_NULL_INSTANCE (   Type)
Value:
extern HB_INTERNAL const Type _hb_Null_##Type; \
template <> \
struct Null<Type> { \
static Type const & get_null () { \
return _hb_Null_##Type; \
} \
}; \
static_assert (true, "") /* Require semicolon after. */
#define HB_INTERNAL
Definition: hb.hh:274
QDBusVariant Type
Definition: hb-null.hh:93
Definition: moc.h:48

Definition at line 124 of file hb-null.hh.

◆ DECLARE_NULL_NAMESPACE_BYTES

#define DECLARE_NULL_NAMESPACE_BYTES (   Namespace,
  Type 
)
Value:
} /* Close namespace. */ \
extern HB_INTERNAL const unsigned char _hb_Null_##Namespace##_##Type[Namespace::Type::null_size]; \
template <> \
static Namespace::Type const & get_null () { \
return *reinterpret_cast<const Namespace::Type *> (_hb_Null_##Namespace##_##Type); \
} \
}; \
namespace Namespace { \
static_assert (true, "") /* Require semicolon after. */
#define _(S, M)

Definition at line 109 of file hb-null.hh.

◆ DEFINE_NULL_INSTANCE

#define DEFINE_NULL_INSTANCE (   Type)     const Type _hb_Null_##Type

Definition at line 133 of file hb-null.hh.

◆ DEFINE_NULL_NAMESPACE_BYTES

#define DEFINE_NULL_NAMESPACE_BYTES (   Namespace,
  Type 
)     const unsigned char _hb_Null_##Namespace##_##Type[Namespace::Type::null_size]

Definition at line 120 of file hb-null.hh.

◆ hb_min_size

#define hb_min_size (   T)    hb_min_size<T>::value

Definition at line 81 of file hb-null.hh.

◆ HB_NULL_POOL_SIZE

#define HB_NULL_POOL_SIZE   384

Definition at line 40 of file hb-null.hh.

◆ hb_null_size

#define hb_null_size (   T)    hb_null_size<T>::value

Definition at line 60 of file hb-null.hh.

◆ hb_static_size

#define hb_static_size (   T)    hb_static_size<T>::value

Definition at line 73 of file hb-null.hh.

◆ Null

#define Null (   Type)    NullHelper<Type>::get_null ()

Definition at line 106 of file hb-null.hh.

Typedef Documentation

◆ hb_min_size

template<typename T >
using hb_min_size = _hb_min_size<T, void>

Definition at line 80 of file hb-null.hh.

◆ hb_null_size

template<typename T >
using hb_null_size = _hb_null_size<T, void>

Definition at line 59 of file hb-null.hh.

◆ hb_static_size

template<typename T >
using hb_static_size = _hb_static_size<T, void>

Definition at line 72 of file hb-null.hh.

Variable Documentation

◆ _hb_CrapPool

HB_INTERNAL uint64_t _hb_CrapPool[(HB_NULL_POOL_SIZE+sizeof(uint64_t) - 1)/sizeof(uint64_t)]
extern

Definition at line 44 of file hb-static.cc.

◆ _hb_NullPool

HB_INTERNAL uint64_t const _hb_NullPool[(HB_NULL_POOL_SIZE+sizeof(uint64_t) - 1)/sizeof(uint64_t)]
extern

Definition at line 43 of file hb-static.cc.