A representation of the Spanner ENUM type: a protobuf enumeration.
A ProtoEnum<E> can be implicitly constructed from, and explicitly converted to an E. Values can be copied, assigned, compared for equality, and streamed.
Example
Given a proto definition enum Color { RED = 0; BLUE = 1; GREEN = 2; }:
auto e = spanner::ProtoEnum<Color>(BLUE);
assert(Color(e) == BLUE);
Constructors
ProtoEnum()
The default value is the first listed in the enum's definition.
ProtoEnum(enum_type)
Implicit construction from the enum type.
Parameter
Name
Description
v
enum_type
Operators
operator enum_type() const
Explicit conversion to the enum type.
Functions
static TypeName()
The fully-qualified name of the enum type, scope delimited by periods.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-22 UTC."],[[["\u003cp\u003eThe webpage provides documentation for the \u003ccode\u003eProtoEnum\u003c/code\u003e class in the Google Cloud Spanner C++ library, detailing its functionality and usage across various versions.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eProtoEnum\u003c/code\u003e objects can be implicitly constructed from, and explicitly converted to, an underlying enum type \u003ccode\u003eE\u003c/code\u003e, with the ability to copy, assign, compare, and stream these values.\u003c/p\u003e\n"],["\u003cp\u003eThe default value of \u003ccode\u003eProtoEnum\u003c/code\u003e is the first listed value in the corresponding enum's definition, and there is an implicit constructor that allows construction from the enum type.\u003c/p\u003e\n"],["\u003cp\u003eThe documentation lists available versions of \u003ccode\u003eProtoEnum\u003c/code\u003e, ranging from the latest release candidate 2.37.0-rc down to version 2.11.0.\u003c/p\u003e\n"],["\u003cp\u003eThe documentation contains a function called \u003ccode\u003eTypeName\u003c/code\u003e which returns the fully qualified name of the enum type as a string.\u003c/p\u003e\n"]]],[],null,[]]