Class Poco::MongoDB::BSONWriter
Author: Applied Informatics Software Engineering GmbH and Contributors

# Poco::MongoDB

# class BSONWriter

Library: MongoDB
Package: MongoDB
Header: Poco/MongoDB/BSONWriter.h

## Description

Class for writing BSON using a Poco::BinaryWriter.

## Member Summary

Member Functions: write, writeCString

## Constructors

### BSONWriter

BSONWriter(
const Poco::BinaryWriter & writer
);

Creates the BSONWriter.

## Destructor

### ~BSONWriter

virtual ~BSONWriter();

Destroys the BSONWriter.

## Member Functions

### write

template < typename T > void write(
T & t
);

Writes the value to the writer. The default implementation uses the << operator. Special types can write their own version.

### writeCString

void writeCString(
const std::string & value
);

Writes a cstring to the writer. A cstring is a string terminated a null character.