# ObjectId.hpp
This File On Github
Ask A Question
API: latest
module: oatpp-mongo
#include "oatpp-mongo/bson/type/ObjectId.hpp"
# ObjectId
BSON ObjectId implementation.
namespace oatpp { namespace mongo { namespace bson { namespace type {
class ObjectId : public oatpp::base::Countable {}
}}}}
# Fields
Type | Name | Summary |
---|---|---|
v_buff_size | DATA_SIZE | Size of ObjectId data. |
# Methods
Return Type | Name | Summary |
---|---|---|
[none] | ObjectId | Multiple implementations:
|
const p_char8 | getData | Get raw data of ObjectId. |
v_buff_size | getSize | Get size of ObjectId data. |
v_uint32 | getTimestamp | Get ObjectId timestamp. |
oatpp::String | toString | To hex string. |
# ObjectId::DATA_SIZE
Size of ObjectId data.
static constexpr v_buff_size DATA_SIZE = 12
# ObjectId::ObjectId
- Constructor. Creates new ObjectId.
ObjectId()
- Constructor. Creates ObjectId from byte array.
- @param m_data
ObjectId(v_char8 m_data[DATA_SIZE])
# ObjectId::getData
Get raw data of ObjectId.
- @return
const p_char8 getData() const
# ObjectId::getSize
Get size of ObjectId data.
- @return - ObjectId::DATA_SIZE.
v_buff_size getSize() const
# ObjectId::getTimestamp
Get ObjectId timestamp.
- @return
v_uint32 getTimestamp() const
# ObjectId::toString
To hex string.
- @return
oatpp::String toString() const