![]() |
Google OR-Tools v9.12
a fast and portable software suite for combinatorial optimization
|
Namespaces | |
namespace | internal |
Classes | |
class | EnumeratedProtoEnumView |
class | ProtoEnumIterator |
Generic Proto enum iterator. More... | |
Functions | |
template<typename E> | |
bool | operator== (const ProtoEnumIterator< E > &a, const ProtoEnumIterator< E > &b) |
template<typename E> | |
bool | operator!= (const ProtoEnumIterator< E > &a, const ProtoEnumIterator< E > &b) |
template<typename E> | |
EnumeratedProtoEnumView< E > | EnumerateEnumValues () |
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Provides utility functions that help with handling Protocol Buffer enums.
Examples:
A function to easily iterate over all defined values of an enum known at compile-time:
for (Proto::Enum e : EnumerateEnumValues<Proto::Enum>()) { ... }
EnumeratedProtoEnumView< E > google::protobuf::contrib::utils::EnumerateEnumValues | ( | ) |
Returns an EnumeratedProtoEnumView that can be iterated over: for (Proto::Enum e : EnumerateEnumValues<Proto::Enum>()) { ... }
Definition at line 126 of file proto_enum_utils.h.
bool google::protobuf::contrib::utils::operator!= | ( | const ProtoEnumIterator< E > & | a, |
const ProtoEnumIterator< E > & | b ) |
Definition at line 106 of file proto_enum_utils.h.
bool google::protobuf::contrib::utils::operator== | ( | const ProtoEnumIterator< E > & | a, |
const ProtoEnumIterator< E > & | b ) |
Definition at line 101 of file proto_enum_utils.h.