mirror of
https://github.com/pocoproject/poco.git
synced 2025-11-08 14:56:12 +01:00
VS 71,80,90 projects, style edits
This commit is contained in:
@@ -35,8 +35,8 @@
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
#ifndef _MongoDB_Array_included
|
||||
#define _MongoDB_Array_included
|
||||
#ifndef MongoDB_Array_INCLUDED
|
||||
#define MongoDB_Array_INCLUDED
|
||||
|
||||
#include "Poco/NumberFormatter.h"
|
||||
|
||||
@@ -52,15 +52,12 @@ class MongoDB_API Array : public Document
|
||||
public:
|
||||
typedef SharedPtr<Array> Ptr;
|
||||
|
||||
|
||||
Array();
|
||||
/// Constructor
|
||||
|
||||
|
||||
virtual ~Array();
|
||||
/// Destructor
|
||||
|
||||
|
||||
template<typename T>
|
||||
T get(int pos) const
|
||||
/// Returns the element on the given index and tries to convert
|
||||
@@ -71,7 +68,6 @@ public:
|
||||
return Document::get<T>(Poco::NumberFormatter::format(pos));
|
||||
}
|
||||
|
||||
|
||||
template<typename T>
|
||||
T get(int pos, const T& def) const
|
||||
/// Returns the element on the given index and tries to convert
|
||||
@@ -81,12 +77,10 @@ public:
|
||||
return Document::get<T>(Poco::NumberFormatter::format(pos), def);
|
||||
}
|
||||
|
||||
|
||||
Element::Ptr get(int pos) const;
|
||||
/// Returns the element on the given index.
|
||||
/// An empty element will be returned when the element is not found.
|
||||
|
||||
|
||||
template<typename T>
|
||||
bool isType(int pos)
|
||||
/// Returns true when the type of the element equals the TypeId of ElementTrait
|
||||
@@ -94,7 +88,6 @@ public:
|
||||
return Document::isType<T>(Poco::NumberFormatter::format(pos));
|
||||
}
|
||||
|
||||
|
||||
std::string toString(int indent = 0) const;
|
||||
};
|
||||
|
||||
@@ -110,15 +103,16 @@ struct ElementTraits<Array::Ptr>
|
||||
//TODO:
|
||||
return value.isNull() ? "null" : value->toString(indent);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
template<>
|
||||
inline void BSONReader::read<Array::Ptr>(Array::Ptr& to)
|
||||
{
|
||||
to->read(_reader);
|
||||
}
|
||||
|
||||
|
||||
template<>
|
||||
inline void BSONWriter::write<Array::Ptr>(Array::Ptr& from)
|
||||
{
|
||||
@@ -126,6 +120,7 @@ inline void BSONWriter::write<Array::Ptr>(Array::Ptr& from)
|
||||
}
|
||||
|
||||
|
||||
}} // Namespace Poco::MongoDB
|
||||
} } // namespace Poco::MongoDB
|
||||
|
||||
#endif //_MongoDB_Array_included
|
||||
|
||||
#endif //MongoDB_Array_INCLUDED
|
||||
|
||||
Reference in New Issue
Block a user