Add getInteger

This commit is contained in:
fbraem
2015-12-12 17:15:55 +01:00
parent cfdf3e4134
commit edc8d2abff
4 changed files with 34 additions and 17 deletions

View File

@@ -153,6 +153,12 @@ public:
/// Returns the element with the given name.
/// An empty element will be returned when the element is not found.
Int64 getInteger(const std::string& name) const;
/// Returns an integer. Useful when MongoDB returns int32, int64
/// or double for a number (count for example). This method will always
/// return an Int64. When the element is not found, a
/// NotFoundException will be thrown.
template<typename T>
bool isType(const std::string& name) const
/// Returns true when the type of the element equals the TypeId of ElementTrait