Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
operations_research::math_opt::EnumProto< P > Struct Template Reference

#include <enums.h>

Public Types

using Cpp = void
 

Static Public Attributes

static constexpr P kMin = {}
 The smallest valid enum value.
 
static constexpr P kMax = {}
 The largest valid enum value.
 
static constexpr ProtoEnumIsValid kIsValid = nullptr
 

Detailed Description

template<typename P>
struct operations_research::math_opt::EnumProto< P >

This template is specialized for each enum in the Proto API. It defines the correspondence with the C++ enum.

Implementation note: don't specialize directly and instead use the MATH_OPT_DEFINE_ENUM macro.

Definition at line 169 of file enums.h.

Member Typedef Documentation

◆ Cpp

template<typename P >
using operations_research::math_opt::EnumProto< P >::Cpp = void

The type of the C++ enum equivalent to the P proto enum.

(Here we use void as a placeholder so that the code compiles.)

Definition at line 173 of file enums.h.

Member Data Documentation

◆ kIsValid

template<typename P >
ProtoEnumIsValid operations_research::math_opt::EnumProto< P >::kIsValid = nullptr
staticconstexpr

Proto function returning the true if the input integer matches a valid value (some values may be missing in range [kMin, kMax]).

Definition at line 183 of file enums.h.

◆ kMax

template<typename P >
P operations_research::math_opt::EnumProto< P >::kMax = {}
staticconstexpr

The largest valid enum value.

Definition at line 179 of file enums.h.

◆ kMin

template<typename P >
P operations_research::math_opt::EnumProto< P >::kMin = {}
staticconstexpr

The smallest valid enum value.

Definition at line 176 of file enums.h.


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