mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-30 13:47:10 +01:00
Cleaning up code, add docs, add getMore sample ...
This commit is contained in:
@@ -41,6 +41,8 @@
|
||||
#include "Poco/MongoDB/Binary.h"
|
||||
#include "Poco/MongoDB/ObjectId.h"
|
||||
#include "Poco/MongoDB/Array.h"
|
||||
#include "Poco/MongoDB/RegularExpression.h"
|
||||
#include "Poco/MongoDB/JavaScriptCode.h"
|
||||
|
||||
namespace Poco
|
||||
{
|
||||
@@ -56,6 +58,21 @@ Document::~Document()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
Element::Ptr Document::get(const std::string& name)
|
||||
{
|
||||
Element::Ptr element;
|
||||
|
||||
ElementSet::iterator it = std::find_if(_elements.begin(), _elements.end(), ElementFindByName(name));
|
||||
if ( it != _elements.end() )
|
||||
{
|
||||
return *it;
|
||||
}
|
||||
|
||||
return element;
|
||||
}
|
||||
|
||||
|
||||
void Document::read(BinaryReader& reader)
|
||||
{
|
||||
int size;
|
||||
@@ -130,7 +147,7 @@ void Document::read(BinaryReader& reader)
|
||||
}
|
||||
|
||||
|
||||
std::string Document::toString() const
|
||||
std::string Document::toString(int indent) const
|
||||
{
|
||||
std::ostringstream oss;
|
||||
oss << "{" << std::endl;
|
||||
|
||||
Reference in New Issue
Block a user