Poco::MongoDB

class ResponseMessage

File Information

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

Description

This class 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();

Creates an empty ResponseMessage.

Destructor

~ResponseMessage virtual

virtual ~ResponseMessage();

Destroys the ResponseMessage.

Member Functions

clear

void clear();

Clears the response.

count inline

std::size_t count() const;

Returns the number of documents in the response.

cursorID inline

Int64 cursorID() const;

Returns the cursor ID.

documents inline

Document::Vector & documents();

Returns a vector containing the received documents.

empty inline

bool empty() const;

Returns true if the response does not contain any documents.

hasDocuments inline

bool hasDocuments() const;

Returns true if there is at least one document in the response.

read

void read(
    std::istream & istr
);

Reads the response from the stream.

Securely control IoT edge devices from anywhere   Connect a Device