KiCad PCB EDA Suite
Loading...
Searching...
No Matches
ALLEGRO::COND_FIELD< Pred, T > Struct Template Reference

Version-conditional field. More...

#include <allegro_pcb_structs.h>

Public Types

using value_type = T
 

Public Member Functions

Tvalue ()
 
const Tvalue () const
 
bool has_value () const
 
const Tvalue_or (const T &aDefault) const
 
Toperator* ()
 
const Toperator* () const
 
Toperator-> ()
 
const Toperator-> () const
 
COND_FIELDoperator= (const T &aValue)
 
COND_FIELDoperator= (T &&aValue)
 

Static Public Member Functions

static constexpr bool exists (FMT_VER aVer)
 

Private Attributes

std::optional< Tm_Value
 

Detailed Description

template<FMT_VER_PREDICATE auto Pred, typename T>
struct ALLEGRO::COND_FIELD< Pred, T >

Version-conditional field.

Wraps std::optional<T> with a compile-time predicate that determines whether the field exists for a given FMT_VER.

Definition at line 171 of file allegro_pcb_structs.h.

Member Typedef Documentation

◆ value_type

template<FMT_VER_PREDICATE auto Pred, typename T>
using ALLEGRO::COND_FIELD< Pred, T >::value_type = T

Definition at line 173 of file allegro_pcb_structs.h.

Member Function Documentation

◆ exists()

template<FMT_VER_PREDICATE auto Pred, typename T>
static constexpr bool ALLEGRO::COND_FIELD< Pred, T >::exists ( FMT_VER aVer)
inlinestaticconstexpr

Definition at line 175 of file allegro_pcb_structs.h.

◆ has_value()

template<FMT_VER_PREDICATE auto Pred, typename T>
bool ALLEGRO::COND_FIELD< Pred, T >::has_value ( ) const
inline

◆ operator*() [1/2]

template<FMT_VER_PREDICATE auto Pred, typename T>
T & ALLEGRO::COND_FIELD< Pred, T >::operator* ( )
inline

Definition at line 184 of file allegro_pcb_structs.h.

◆ operator*() [2/2]

template<FMT_VER_PREDICATE auto Pred, typename T>
const T & ALLEGRO::COND_FIELD< Pred, T >::operator* ( ) const
inline

Definition at line 185 of file allegro_pcb_structs.h.

◆ operator->() [1/2]

template<FMT_VER_PREDICATE auto Pred, typename T>
T * ALLEGRO::COND_FIELD< Pred, T >::operator-> ( )
inline

Definition at line 187 of file allegro_pcb_structs.h.

◆ operator->() [2/2]

template<FMT_VER_PREDICATE auto Pred, typename T>
const T * ALLEGRO::COND_FIELD< Pred, T >::operator-> ( ) const
inline

Definition at line 188 of file allegro_pcb_structs.h.

◆ operator=() [1/2]

template<FMT_VER_PREDICATE auto Pred, typename T>
COND_FIELD & ALLEGRO::COND_FIELD< Pred, T >::operator= ( const T & aValue)
inline

Definition at line 191 of file allegro_pcb_structs.h.

◆ operator=() [2/2]

template<FMT_VER_PREDICATE auto Pred, typename T>
COND_FIELD & ALLEGRO::COND_FIELD< Pred, T >::operator= ( T && aValue)
inline

Definition at line 197 of file allegro_pcb_structs.h.

◆ value() [1/2]

template<FMT_VER_PREDICATE auto Pred, typename T>
T & ALLEGRO::COND_FIELD< Pred, T >::value ( )
inline

◆ value() [2/2]

template<FMT_VER_PREDICATE auto Pred, typename T>
const T & ALLEGRO::COND_FIELD< Pred, T >::value ( ) const
inline

Definition at line 179 of file allegro_pcb_structs.h.

◆ value_or()

template<FMT_VER_PREDICATE auto Pred, typename T>
const T & ALLEGRO::COND_FIELD< Pred, T >::value_or ( const T & aDefault) const
inline

Definition at line 182 of file allegro_pcb_structs.h.

Member Data Documentation

◆ m_Value

template<FMT_VER_PREDICATE auto Pred, typename T>
std::optional<T> ALLEGRO::COND_FIELD< Pred, T >::m_Value
private

Definition at line 204 of file allegro_pcb_structs.h.


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