Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
|
#include <int_type.h>
Classes | |
struct | Hasher |
Public Types | |
typedef _ValueType | ValueType |
typedef IntType< IntTypeName, ValueType > | ThisType |
Public Member Functions | |
constexpr | IntType () |
Default c'tor initializing value_ to 0. | |
constexpr | IntType (ValueType value) |
C'tor explicitly initializing from a ValueType. | |
constexpr ValueType | value () const |
template<typename ValType > | |
constexpr ValType | value () const |
ThisType & | operator++ () |
– UNARY OPERATORS -----------------------------------------------------— | |
const ThisType | operator++ (int v) |
ThisType & | operator-- () |
const ThisType | operator-- (int v) |
constexpr bool | operator! () const |
constexpr const ThisType | operator+ () const |
constexpr const ThisType | operator- () const |
constexpr const ThisType | operator~ () const |
INT_TYPE_ASSIGNMENT_OP (+=) | |
INT_TYPE_ASSIGNMENT_OP (-=) | |
INT_TYPE_ASSIGNMENT_OP * | INT_TYPE_ASSIGNMENT_OP (/=);INT_TYPE_ASSIGNMENT_OP(<<= |
INT_TYPE_ASSIGNMENT_OP (> >=) | |
INT_TYPE_ASSIGNMENT_OP (%=) | |
ThisType & | operator= (ValueType arg_value) |
Static Public Member Functions | |
static constexpr absl::string_view | TypeName () |
Holds a integral value (of type ValueType) and behaves as a ValueType by exposing assignment, unary, comparison, and arithmetic operators.
The template parameter IntTypeName defines the name for the int type and must be unique within a binary (the convenient DEFINE_INT_TYPE macro at the end of the file generates a unique IntTypeName). The parameter ValueType defines the integer type value (see supported list above).
This class is NOT thread-safe.
Definition at line 184 of file int_type.h.
IntType<IntTypeName, ValueType> gtl::IntType< IntTypeName, _ValueType >::ThisType |
Definition at line 187 of file int_type.h.
_ValueType gtl::IntType< IntTypeName, _ValueType >::ValueType |
Definition at line 186 of file int_type.h.
|
inlineconstexpr |
Default c'tor initializing value_ to 0.
Definition at line 203 of file int_type.h.
|
inlineexplicitconstexpr |
C'tor explicitly initializing from a ValueType.
Definition at line 205 of file int_type.h.
gtl::IntType< IntTypeName, _ValueType >::INT_TYPE_ASSIGNMENT_OP | ( | % | ) |
gtl::IntType< IntTypeName, _ValueType >::INT_TYPE_ASSIGNMENT_OP | ( | + | ) |
gtl::IntType< IntTypeName, _ValueType >::INT_TYPE_ASSIGNMENT_OP | ( | - | ) |
INT_TYPE_ASSIGNMENT_OP * gtl::IntType< IntTypeName, _ValueType >::INT_TYPE_ASSIGNMENT_OP | ( | / | ) |
gtl::IntType< IntTypeName, _ValueType >::INT_TYPE_ASSIGNMENT_OP | ( | >= | ) |
|
inlineconstexpr |
Definition at line 242 of file int_type.h.
|
inlineconstexpr |
Definition at line 243 of file int_type.h.
|
inline |
– UNARY OPERATORS -----------------------------------------------------—
Definition at line 223 of file int_type.h.
|
inline |
Definition at line 227 of file int_type.h.
|
inlineconstexpr |
Definition at line 244 of file int_type.h.
|
inline |
Definition at line 232 of file int_type.h.
|
inline |
Definition at line 236 of file int_type.h.
|
inline |
Definition at line 268 of file int_type.h.
|
inlineconstexpr |
Definition at line 245 of file int_type.h.
|
inlinestaticconstexpr |
Definition at line 189 of file int_type.h.
|
inlineconstexpr |
IntType uses the default copy constructor, destructor and assign operator. The defaults are sufficient and omitting them allows the compiler to add the move constructor/assignment. – ACCESSORS -----------------------------------------------------------— The class provides a value() accessor returning the stored ValueType value_ as well as a templatized accessor that is just a syntactic sugar for static_cast<T>(var.value());
Definition at line 215 of file int_type.h.
|
inlineconstexpr |
Definition at line 218 of file int_type.h.