# Poco::MongoDB

# class BSONReader

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

## Description

Class for reading BSON using a Poco::BinaryReader

## Member Summary

Member Functions: read, readCString

## Constructors

### BSONReader

BSONReader(
const Poco::BinaryReader & reader
);

Creates the BSONReader using the given BinaryWriter.

## Destructor

### ~BSONReader

virtual ~BSONReader();

Destroys the BSONReader.

## Member Functions

### read

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

Reads the value from the reader. The default implementation uses the >> operator to the given argument. Special types can write their own version.

### readCString

std::string readCString();

Reads a cstring from the reader. A cstring is a string terminated with a 0x00.