zookeeper-cpp
ZooKeeper Client for C++
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Groups
zk::multi_result Class Referencefinal

The result of a successful client::commit operation. More...

#include <zk/multi.hpp>

Classes

class  part
 A part of a result. The behavior depends on the type of op provided to the original transaction. More...
 

Public Types

using iterator = std::vector< part >::iterator
 
using const_iterator = std::vector< part >::const_iterator
 
using size_type = std::vector< part >::size_type
 

Public Member Functions

 multi_result (std::vector< part > parts) noexcept
 
size_type size () const
 The number of results in this transaction bundle. More...
 
void reserve (size_type capacity)
 Increase the reserved memory block so it can store at least capacity results without reallocating. More...
 
template<typename... TArgs>
void emplace_back (TArgs &&...args)
 Construct a result emplace on the end of the list using args. More...
 
partoperator[] (size_type idx)
 
const partoperator[] (size_type idx) const
 
const partat (size_type idx) const
 
partat (size_type idx)
 
iterator begin ()
 
const_iterator begin () const
 
const_iterator cbegin () const
 
iterator end ()
 
const_iterator end () const
 
const_iterator cend () const
 
void push_back (part &&x)
 
void push_back (const part &x)
 

Detailed Description

The result of a successful client::commit operation.

Definition at line 242 of file multi.hpp.

Member Function Documentation

const part& zk::multi_result::at ( size_type  idx) const
inline

Get the result at the given idx.

Exceptions
std::out_of_rangeif idx is larger than size.

Definition at line 312 of file multi.hpp.

iterator zk::multi_result::begin ( )
inline

Get an iterator to the beginning of the result list.

Definition at line 318 of file multi.hpp.

template<typename... TArgs>
void zk::multi_result::emplace_back ( TArgs &&...  args)
inline

Construct a result emplace on the end of the list using args.

See also
push_back

Definition at line 337 of file multi.hpp.

iterator zk::multi_result::end ( )
inline

Get an iterator to the end of the result list.

Definition at line 325 of file multi.hpp.

part& zk::multi_result::operator[] ( size_type  idx)
inline

Get the result at the given idx.

Exceptions
std::out_of_rangeif idx is larger than size.

Definition at line 304 of file multi.hpp.

void zk::multi_result::push_back ( part &&  x)
inline

Add the operation x to the end of this list.

Definition at line 344 of file multi.hpp.

void zk::multi_result::reserve ( size_type  capacity)
inline

Increase the reserved memory block so it can store at least capacity results without reallocating.

Definition at line 331 of file multi.hpp.

size_type zk::multi_result::size ( ) const
inline

The number of results in this transaction bundle.

Definition at line 298 of file multi.hpp.


The documentation for this class was generated from the following files: