BSON C++ API
2.5.1
uma::bson
|
#include <Value.h>
Public Types | |
enum | Type { Eoo = 0, Double = 1, String = 2, Object = 3, Array = 4, BinData = 5, Undefined = 6, OID = 7, Boolean = 8, Date = 9, Null = 10, RegEx = 11, DbRef = 12, Code = 13, Symbol = 14, CodeWScope = 15, Integer = 16, Timestamp = 17, Long = 18 } |
Public Member Functions | |
virtual | ~Value () |
Virtual DTOR for sub-classes. | |
virtual Type | getType () const =0 |
Return the type for this instance as listed in the BSON specifications. | |
virtual int32_t | getSize () const =0 |
Return the size of the data as per BSON specifications. | |
const std::string & | getTypeName () const |
Returns a standard textual value for this type. | |
Static Public Member Functions | |
static const std::string & | getTypeName (const Type type) |
Return a descriptive text about the specified type. | |
Protected Member Functions | |
Value () | |
The abstract base class that represents a BSON data type. Concrete implementations are used to represent the 18 types of data specified in the BSON specifications.
BSON element/field types.
Enumerator | |
---|---|
Eoo |
End of document/element. |
Double |
Floating point. |
String |
UTF-8 string. |
Object |
Embedded document. |
Array |
Embedded array. |
BinData |
Binary data. |
Undefined |
Undefined — Deprecated. |
OID |
MongoDB ObjectId. |
Boolean |
Boolean false: 0, true: 1. |
Date |
UTC datetime - milliseconds since UNIX epoch time. |
Null |
Null value. |
RegEx |
Regular expression. |
DbRef |
DBPointer — Deprecated. |
Code |
JavaScript code. |
Symbol |
Symbol — Deprecated. |
CodeWScope |
JavaScript code w/ scope. |
Integer |
32-bit Integer |
Timestamp |
Timestamp - increment: 4bytes, time: 4bytes. |
Long |
64-bit integer |
|
inlinevirtual |
Virtual DTOR for sub-classes.
|
inlineprotected |
|
pure virtual |
Return the size of the data as per BSON specifications.
Implemented in uma::bson::Document, uma::bson::Array, uma::bson::Object, uma::bson::BinaryData, uma::bson::Timestamp, uma::bson::RegularExpression, uma::bson::DatabaseReference, uma::bson::ObjectId, uma::bson::CodeWithScope, uma::bson::Date, uma::bson::Text, uma::bson::Boolean, uma::bson::Double, uma::bson::Integer, uma::bson::Long, uma::bson::EOO, uma::bson::Undefined, and uma::bson::Null.
|
pure virtual |
Return the type for this instance as listed in the BSON specifications.
Implemented in uma::bson::Array, uma::bson::Object, uma::bson::BinaryData, uma::bson::Timestamp, uma::bson::RegularExpression, uma::bson::DatabaseReference, uma::bson::ObjectId, uma::bson::CodeWithScope, uma::bson::Date, uma::bson::Boolean, uma::bson::Double, uma::bson::Integer, uma::bson::Long, uma::bson::Code, uma::bson::Symbol, uma::bson::String, uma::bson::EOO, uma::bson::Undefined, and uma::bson::Null.
|
inline |
Returns a standard textual value for this type.
|
static |
Return a descriptive text about the specified type.
type | The type to describe |