RTBKit  0.9
Open-source framework to create real-time ad bidding systems.
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes
Datacratic::Id Struct Reference

#include <id.h>

List of all members.

Public Types

enum  Type {
  NONE = 0, NULLID = 1, UUID = 2, GOOG128 = 3,
  BIGDEC = 4, BASE64_96 = 5, STR = 192, COMPOUND2 = 193,
  UNKNOWN = 255
}

Public Member Functions

 Id (const std::string &value, Type type=UNKNOWN)
 Id (uint64_t value)
 Id (const Id &underlying1, const Id &underlying2)
 Id (Id &&other)
 Id (const Id &other)
Idoperator= (Id &&other)
Idoperator= (const Id &other)
void parse (const std::string &value, Type type=UNKNOWN)
std::string toString () const
uint64_t toInt () const
bool notNull () const
 JML_IMPLEMENT_OPERATOR_BOOL (notNull())
bool operator== (const Id &other) const
bool operator!= (const Id &other) const
bool operator< (const Id &other) const
uint64_t hash () const
bool complexEqual (const Id &other) const
bool complexLess (const Id &other) const
uint64_t complexHash () const
void complexDestroy ()
void complexFinishCopy ()
const IdcompoundId1 () const
 Return the first half of a COMPOUND2 Id.
const IdcompoundId2 () const
 Return the second half of a COMPUOND2 Id.
void serialize (ML::DB::Store_Writer &store) const
void reconstitute (ML::DB::Store_Reader &store)
Json::Value toJson () const

Static Public Member Functions

static Id fromJson (const Json::Value &val)

Public Attributes

uint8_t type
uint8_t unused [3]
union {
   struct {
      uint64_t   val1
      uint64_t   val2
   } 
   struct {
      uint32_t   v1h
      uint32_t   v1l
      uint32_t   v2h
      uint32_t   v2l
   } 
   __uint128_t   val
   struct {
      uint64_t   f1:32
      uint64_t   f2:16
      uint64_t   f3:16
      uint64_t   f4:16
      uint64_t   f5:48
   } 
   struct {
      uint64_t   len:56
      uint64_t   ownstr:8
      const char *   str
   } 
   struct {
      Id *   cmp1
      Id *   cmp2
   } 
}; 

Detailed Description

Generic class to rapidly deal with IDs such as UUIDs, etc.

Definition at line 46 of file id.h.


Member Enumeration Documentation

Enumerator:
GOOG128 

uuid string eg 0828398c-5965-11e0-84c8-0026b937c8e1

BIGDEC 

google CAESEAYra3NIxLT9C8twKrzqaA

BASE64_96 

7394206091425759590

STR 

16 character base64 string

COMPOUND2 

any string

compound of two underlying IDs

Definition at line 48 of file id.h.


The documentation for this struct was generated from the following files:
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator