Google Cloud Spanner C++ Client  1.32.1
A C++ Client Library for Google Cloud Spanner
Public Member Functions | Friends | List of all members
google::cloud::spanner::v1::Bytes Class Reference

A representation of the Spanner BYTES type: variable-length binary data. More...

#include <google/cloud/spanner/bytes.h>

Public Member Functions

 Bytes ()=default
 An empty sequence. More...
 
template<typename Container >
Container get () const
 Conversion to a sequence of octets. More...
 
template<typename InputIt >
 Bytes (InputIt first, InputIt last)
 Construction from a sequence of octets. More...
 
template<typename Container >
 Bytes (Container const &c)
 Construction from a sequence of octets. More...
 

Friends

std::ostream & operator<< (std::ostream &os, Bytes const &bytes)
 Outputs string representation of the Bytes to the provided stream. More...
 
Relational operators
bool operator== (Bytes const &a, Bytes const &b)
 
bool operator!= (Bytes const &a, Bytes const &b)
 

Detailed Description

A representation of the Spanner BYTES type: variable-length binary data.

A Bytes value can be constructed from, and converted to any sequence of octets. Bytes values can be compared for equality.

Definition at line 43 of file bytes.h.

Constructor & Destructor Documentation

◆ Bytes() [1/3]

google::cloud::spanner::v1::Bytes::Bytes ( )
default

An empty sequence.

◆ Bytes() [2/3]

template<typename InputIt >
google::cloud::spanner::v1::Bytes::Bytes ( InputIt  first,
InputIt  last 
)
inline

Construction from a sequence of octets.

Definition at line 51 of file bytes.h.

◆ Bytes() [3/3]

template<typename Container >
google::cloud::spanner::v1::Bytes::Bytes ( Container const &  c)
inlineexplicit

Construction from a sequence of octets.

Definition at line 57 of file bytes.h.

Member Function Documentation

◆ get()

template<typename Container >
Container google::cloud::spanner::v1::Bytes::get ( ) const
inline

Conversion to a sequence of octets.

The Container must support construction from a range specified as a pair of input iterators.

Definition at line 63 of file bytes.h.

Friends And Related Function Documentation

◆ operator!=

bool operator!= ( Bytes const &  a,
Bytes const &  b 
)
friend

Definition at line 73 of file bytes.h.

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
Bytes const &  bytes 
)
friend

Outputs string representation of the Bytes to the provided stream.

Warning
This is intended for debugging and human consumption only, not machine consumption, as the output format may change without notice.

Definition at line 33 of file bytes.cc.

◆ operator==

bool operator== ( Bytes const &  a,
Bytes const &  b 
)
friend

Definition at line 70 of file bytes.h.