# Poco::MongoDB

# class ResponseMessage

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

## Description

Class that represents a response (OP_REPLY) from MongoDB

## Inheritance

Direct Base Classes: Message

All Base Classes: Message

## Member Summary

Member Functions: clear, count, cursorID, documents, empty, hasDocuments, read

Inherited Functions: header, messageLength

## Constructors

### ResponseMessage

ResponseMessage();

Constructor

## Destructor

### ~ResponseMessage

virtual ~ResponseMessage();

Destructor

## Member Functions

### clear

void clear();

Clears the response

### count

size_t count() const;

Returns the number of documents in the response

### cursorID

Int64 cursorID() const;

Returns the cursor id

### documents

Document::Vector & documents();

Returns the retrieved documents

### empty

bool empty() const;

Returns true when the response doesn't contain any documents

### hasDocuments

bool hasDocuments() const;

Returns true when there is at least one document

### read

void read(
std::istream & istr
);

Reads the response from the stream