![]() |
Google OR-Tools v9.14
a fast and portable software suite for combinatorial optimization
|
A helper to manipulate the list of attributes. More...
#include <derived_data.h>
Public Types | |
template<int i> | |
using | TypeDescriptor = std::tuple_element_t<i, AllAttrTypeDescriptors> |
Returns the descriptor of the i-th attribute type in the list. | |
template<int i> | |
using | Type = typename TypeDescriptor<i>::AttrType |
Returns the i-th attribute type in the list. |
Static Public Member Functions | |
template<typename AttrT> | |
static constexpr int | GetIndex () |
template<typename Fn> | |
static void | ForEachAttr (Fn &&fn) |
Static Public Attributes | |
static constexpr int | kNumAttrTypes |
The number of available attribute types. |
A helper to manipulate the list of attributes.
Definition at line 33 of file derived_data.h.
using operations_research::math_opt::AllAttrs::Type = typename TypeDescriptor<i>::AttrType |
Returns the i-th attribute type in the list.
Definition at line 44 of file derived_data.h.
using operations_research::math_opt::AllAttrs::TypeDescriptor = std::tuple_element_t<i, AllAttrTypeDescriptors> |
Returns the descriptor of the i-th attribute type in the list.
Definition at line 40 of file derived_data.h.
|
inlinestatic |
Applies fn on each value for each attribute type. fn must have a overload set of operator(AttrType) that accepts a AttrType for each attribute type.
Definition at line 63 of file derived_data.h.
|
inlinestaticconstexpr |
Returns the index of attribute type AttrT. Fails to compile if AttrT is not an attribute.
This weird construct is to show AttrT explicitly instead of letting the user fish it out of the stack trace when the static_assert fails.
Definition at line 49 of file derived_data.h.
|
staticconstexpr |
The number of available attribute types.
Definition at line 35 of file derived_data.h.