BSON C++ API  2.5.1
uma::bson
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
uma::bson::Value Class Referenceabstract

#include <Value.h>

+ Inheritance diagram for uma::bson::Value:

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 ()
 

Detailed Description

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.

Date
Created 2012/09/05 19:55
Author
Rakesh
Version
Id:
Value.h 185 2012-12-21 15:39:00Z spt

Member Enumeration Documentation

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

Constructor & Destructor Documentation

virtual uma::bson::Value::~Value ( )
inlinevirtual

Virtual DTOR for sub-classes.

uma::bson::Value::Value ( )
inlineprotected

Member Function Documentation

virtual Type uma::bson::Value::getType ( ) const
pure virtual
const std::string& uma::bson::Value::getTypeName ( ) const
inline

Returns a standard textual value for this type.

Returns
A text value representing for the document type. Useful for logging/debugging
static const std::string& uma::bson::Value::getTypeName ( const Type  type)
static

Return a descriptive text about the specified type.

Parameters
typeThe type to describe
Returns
The textual description of the type.

The documentation for this class was generated from the following file: