LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
util::quantities::concepts::details::WithCategory< Cat > Struct Template Reference

An object belonging to a category Cat. More...

#include "intervals.h"

Inheritance diagram for util::quantities::concepts::details::WithCategory< Cat >:
util::quantities::concepts::Interval< Q, Cat > util::quantities::concepts::Point< Q, Cat, IV >

Public Types

using category_t = Cat
 The category of this object. More...
 
using traits_t = category_traits< category_t >
 Traits of this category. More...
 

Static Public Member Functions

static constexpr category_t category ()
 Returns an instance of the category of this object. More...
 
static constexpr bool hasCategoryName ()
 Returns whether this category has a name. More...
 
static std::string categoryName ()
 Returns the name of the category of this object. More...
 
template<typename OC >
static constexpr bool same_category_as ()
 Returns whether the type OC belongs to category_t. More...
 
template<typename OC >
static constexpr bool same_category_as (OC const &)
 Returns whether the type OC belongs to category_t. More...
 
template<typename OC >
static constexpr bool category_compatible_with ()
 Returns whether OC has a category compatible with this one. More...
 
template<typename OC >
static constexpr bool category_compatible_with (OC const &)
 Returns whether OC has a category compatible with this one. More...
 

Detailed Description

template<typename Cat>
struct util::quantities::concepts::details::WithCategory< Cat >

An object belonging to a category Cat.

Definition at line 40 of file intervals.h.

Member Typedef Documentation

template<typename Cat >
using util::quantities::concepts::details::WithCategory< Cat >::category_t = Cat

The category of this object.

Definition at line 1152 of file intervals.h.

Traits of this category.

Definition at line 1155 of file intervals.h.

Member Function Documentation

template<typename Cat >
constexpr auto util::quantities::concepts::details::WithCategory< Cat >::category ( )
static

Returns an instance of the category of this object.

Definition at line 1190 of file intervals.h.

1191  {
1192  return {};
1193  }
template<typename Cat >
template<typename OC >
constexpr bool util::quantities::concepts::details::WithCategory< Cat >::category_compatible_with ( )
static

Returns whether OC has a category compatible with this one.

Definition at line 1213 of file intervals.h.

1214  {
1215  return traits_t::template compatible_with<category_of<OC>>();
1216  }
template<typename Cat >
template<typename OC >
constexpr bool util::quantities::concepts::details::WithCategory< Cat >::category_compatible_with ( OC const &  )
static

Returns whether OC has a category compatible with this one.

Definition at line 1220 of file intervals.h.

1221  {
1222  return category_compatible_with<OC>();
1223  }
template<typename Cat >
std::string util::quantities::concepts::details::WithCategory< Cat >::categoryName ( )
static

Returns the name of the category of this object.

Definition at line 1234 of file intervals.h.

1235  {
1236  return Cat::name();
1237  }
template<typename Cat >
constexpr bool util::quantities::concepts::details::WithCategory< Cat >::hasCategoryName ( )
static

Returns whether this category has a name.

Definition at line 1227 of file intervals.h.

1228  {
1230  }
static constexpr bool has_name
Whether the category supports name() call.
Definition: intervals.h:1126
template<typename Cat >
template<typename OC >
constexpr bool util::quantities::concepts::details::WithCategory< Cat >::same_category_as ( )
static

Returns whether the type OC belongs to category_t.

Definition at line 1198 of file intervals.h.

1199  {
1200  return details::has_category_v<OC> && std::is_same_v<typename OC::category_t, category_t>;
1201  } // WithCategory<>::same_category_as()
template<typename Cat >
template<typename OC >
constexpr bool util::quantities::concepts::details::WithCategory< Cat >::same_category_as ( OC const &  )
static

Returns whether the type OC belongs to category_t.

Definition at line 1205 of file intervals.h.

1206  {
1207  return same_category_as<OC>();
1208  }

The documentation for this struct was generated from the following file: