MongoDB C++ Driver  mongocxx-3.0.3
Public Member Functions | List of all members
bsoncxx::builder::stream::single_context Class Reference

A stream context which appends a single value. More...

#include <single_context.hpp>

Public Member Functions

 single_context (core *core)
 Create a single_context given a core builder. More...
 
key_context< single_contextoperator<< (open_document_type)
 << operator for opening a new subdocument in the core builder. More...
 
array_context< single_contextoperator<< (open_array_type)
 << operator for opening a new subarray in the core builder. More...
 
template<class T >
void operator<< (T &&t)
 << operator for accepting a real value and appending it to the core builder. More...
 

Detailed Description

A stream context which appends a single value.

This type is useful as the argument to a callable passed to other stream modes. Specifically, any callback that takes a single_context can be used to write a value in value_context or array_context.

Constructor & Destructor Documentation

bsoncxx::builder::stream::single_context::single_context ( core core)
inline

Create a single_context given a core builder.

Parameters
coreThe core builder to orchestrate

Member Function Documentation

key_context<single_context> bsoncxx::builder::stream::single_context::operator<< ( open_document_type  )
inline

<< operator for opening a new subdocument in the core builder.

Parameters
_An open_document_type token
array_context<single_context> bsoncxx::builder::stream::single_context::operator<< ( open_array_type  )
inline

<< operator for opening a new subarray in the core builder.

Parameters
_An open_array_type token
template<class T >
void bsoncxx::builder::stream::single_context::operator<< ( T &&  t)
inline

<< operator for accepting a real value and appending it to the core builder.

Parameters
tThe value to append

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