hobbes
a language, embedded compiler, and runtime for efficient dynamic expression evaluation, data storage and analysis
Classes | Typedefs | Enumerations | Functions
hobbes::storage Namespace Reference

Classes

struct  cannot_memcpy
 
struct  cannot_memcpy< T, typename store< T >::can_memcpy >
 
struct  fixedArrIterWrite
 
struct  fixedArrMemcpyWrite
 
struct  fixedArrTyDesc
 
struct  hstore_payload_types
 
struct  hstore_payload_types< T, Ts... >
 
struct  pqueue_config
 
struct  QueueConnection
 
class  reader
 
struct  recursion
 
struct  recursive
 
class  rpipe
 
struct  serialize_values
 
struct  serialize_values< T, Ts... >
 
struct  ShQueueData
 
struct  ShQueueHeader
 
struct  statement
 
struct  StorageGroup
 
struct  StorageStatement
 
struct  store
 
struct  store< const char * >
 
struct  store< recursion >
 
struct  store< recursive< T > >
 
struct  store< std::pair< U, V > >
 
struct  store< std::string >
 
struct  store< std::tuple< Ts... > >
 
struct  store< std::vector< T >, typename cannot_memcpy< T >::type >
 
struct  store< std::vector< T >, typename store< T >::can_memcpy >
 
struct  store< T, typename T::is_hstore_alias >
 
struct  store< T, typename T::is_hstore_enum >
 
struct  store< T, typename T::is_hstore_struct >
 
struct  store< T, typename T::is_hstore_variant >
 
struct  store< T, typename T::is_packed_hstore_struct >
 
struct  store< T[N], typename cannot_memcpy< T >::type >
 
struct  store< T[N], typename store< T >::can_memcpy >
 
struct  store< unit >
 
struct  store_tuple_types
 
struct  store_tuple_types< T, Ts... >
 
struct  storeTuple
 
struct  storeTuple< e, e, Ts... >
 
struct  strpack
 
class  Transaction
 
struct  unit
 
class  wpipe
 
class  writer
 

Typedefs

typedef std::vector< uint8_t > bytes
 
typedef std::pair< uint64_t, uint64_t > ProcThread
 
typedef void(* tydescfn) (bytes *, std::string *)
 
typedef std::vector< statementstatements
 

Enumerations

enum  PipeQOS { Reliable = 0, Unreliable }
 
enum  CommitMethod { AutoCommit = 0, ManualCommit }
 

Functions

static long sys_futex (volatile uint32_t *p, int op, int v, struct timespec *timeout, void *p2, int v2)
 
static void waitForUpdate (volatile uint32_t *p, int eqV)
 
static void wakeN (volatile uint32_t *p, int c)
 
template<typename T >
align (T x, T m)
 
static void uxchg (volatile uint32_t *px, uint32_t nx)
 
void mqwrite (int fd, const uint8_t *x, size_t len)
 
int mqconnect (const std::string &fileName)
 
int mqlisten (const std::string &fileName)
 
std::string tempDir ()
 
int connectGroupHost (const std::string &groupName)
 
int makeGroupHost (const std::string &groupName)
 
ProcThread thisProcThread ()
 
std::string sharedMemName (const std::string &groupName, const ProcThread &pt)
 
std::string sharedMemName (const std::string &groupName)
 
void registerSHMAlloc (int *mqserver, const std::string &groupName)
 
QueueConnection consumeQueue (const std::string &shmname)
 
QueueConnection consumeGroup (const std::string &gname, const ProcThread &pt)
 
template<typename T >
void w (const T &x, bytes *out)
 
void ws (const char *x, bytes *out)
 
void ws (const std::string &x, bytes *out)
 
void ws (const bytes &x, bytes *out)
 
void encode_primty (const char *tn, bytes *out)
 
 _HSTORE_DEFINE_PRIMTYS (bool, "bool")
 
 _HSTORE_DEFINE_PRIMTYS (uint8_t, "byte")
 
 _HSTORE_DEFINE_PRIMTYS (char, "char")
 
 _HSTORE_DEFINE_PRIMTYS (int16_t, "short")
 
 _HSTORE_DEFINE_PRIMTYS (uint16_t, "short")
 
 _HSTORE_DEFINE_PRIMTYS (int32_t, "int")
 
 _HSTORE_DEFINE_PRIMTYS (uint32_t, "int")
 
 _HSTORE_DEFINE_PRIMTYS (int64_t, "long")
 
 _HSTORE_DEFINE_PRIMTYS (uint64_t, "long")
 
 _HSTORE_DEFINE_PRIMTYS (float, "float")
 
 _HSTORE_DEFINE_PRIMTYS (double, "double")
 
template<typename ... Ts>
hstore_payload_types< Ts... > makePayloadTypes (const Ts &...)
 
template<typename TyList >
void makeTyDescF (bytes *e, std::string *d)
 
template<size_t N>
constexpr char at (size_t i, const char(&s)[N])
 
template<size_t N>
constexpr size_t at8S (size_t i, size_t k, const char(&s)[N])
 
template<size_t N>
constexpr size_t at8 (size_t i, const char(&s)[N])
 
template<uint32_t * X>
uint32_t forceRegistration ()
 
template<typename GName , typename ... Ts>
bool write (StorageGroup< GName, AutoCommit > *g, uint32_t id, const Ts &... xs)
 
template<typename GName , typename ... Ts>
bool write (StorageGroup< GName, ManualCommit > *g, uint32_t id, const Ts &... xs)
 
template<size_t N>
static constexpr size_t readInt (const char(&fmt)[N], size_t i, size_t e, size_t n)
 
static constexpr size_t maxV (size_t x, size_t y)
 
template<size_t N>
static constexpr size_t maxVarRefS (const char(&fmt)[N], size_t i, size_t s, size_t vri, size_t maxvr)
 
template<size_t N>
static constexpr size_t maxVarRef (const char(&fmt)[N])
 
size_t rs (const reader::MetaData &md, size_t o, size_t n, uint8_t *b)
 
template<typename T >
size_t r (const reader::MetaData &md, size_t o, T *t)
 
size_t rs (const reader::MetaData &md, size_t o, std::string *s)
 
size_t rs (const reader::MetaData &md, size_t o, bytes *s)
 
void runReadProcess (const QueueConnection &qc, const std::function< std::function< void(Transaction &)>(PipeQOS, CommitMethod, const statements &)> &initF)
 

Typedef Documentation

◆ bytes

typedef std::vector<uint8_t> hobbes::storage::bytes

◆ ProcThread

typedef std::pair<uint64_t, uint64_t> hobbes::storage::ProcThread

◆ statements

typedef std::vector<statement> hobbes::storage::statements

◆ tydescfn

typedef void(* hobbes::storage::tydescfn) (bytes *, std::string *)

Enumeration Type Documentation

◆ CommitMethod

Enumerator
AutoCommit 
ManualCommit 

◆ PipeQOS

Enumerator
Reliable 
Unreliable 

Function Documentation

◆ _HSTORE_DEFINE_PRIMTYS() [1/11]

hobbes::storage::_HSTORE_DEFINE_PRIMTYS ( bool  ,
"bool"   
)

◆ _HSTORE_DEFINE_PRIMTYS() [2/11]

hobbes::storage::_HSTORE_DEFINE_PRIMTYS ( uint8_t  ,
"byte"   
)

◆ _HSTORE_DEFINE_PRIMTYS() [3/11]

hobbes::storage::_HSTORE_DEFINE_PRIMTYS ( char  ,
"char"   
)

◆ _HSTORE_DEFINE_PRIMTYS() [4/11]

hobbes::storage::_HSTORE_DEFINE_PRIMTYS ( int16_t  ,
"short"   
)

◆ _HSTORE_DEFINE_PRIMTYS() [5/11]

hobbes::storage::_HSTORE_DEFINE_PRIMTYS ( uint16_t  ,
"short"   
)

◆ _HSTORE_DEFINE_PRIMTYS() [6/11]

hobbes::storage::_HSTORE_DEFINE_PRIMTYS ( int32_t  ,
"int"   
)

◆ _HSTORE_DEFINE_PRIMTYS() [7/11]

hobbes::storage::_HSTORE_DEFINE_PRIMTYS ( uint32_t  ,
"int"   
)

◆ _HSTORE_DEFINE_PRIMTYS() [8/11]

hobbes::storage::_HSTORE_DEFINE_PRIMTYS ( int64_t  ,
"long"   
)

◆ _HSTORE_DEFINE_PRIMTYS() [9/11]

hobbes::storage::_HSTORE_DEFINE_PRIMTYS ( uint64_t  ,
"long"   
)

◆ _HSTORE_DEFINE_PRIMTYS() [10/11]

hobbes::storage::_HSTORE_DEFINE_PRIMTYS ( float  ,
"float"   
)

◆ _HSTORE_DEFINE_PRIMTYS() [11/11]

hobbes::storage::_HSTORE_DEFINE_PRIMTYS ( double  ,
"double"   
)

◆ align()

template<typename T >
T hobbes::storage::align ( x,
m 
)

◆ at()

template<size_t N>
constexpr char hobbes::storage::at ( size_t  i,
const char(&)  s[N] 
)

◆ at8()

template<size_t N>
constexpr size_t hobbes::storage::at8 ( size_t  i,
const char(&)  s[N] 
)

◆ at8S()

template<size_t N>
constexpr size_t hobbes::storage::at8S ( size_t  i,
size_t  k,
const char(&)  s[N] 
)

◆ connectGroupHost()

int hobbes::storage::connectGroupHost ( const std::string &  groupName)
inline

◆ consumeGroup()

QueueConnection hobbes::storage::consumeGroup ( const std::string &  gname,
const ProcThread pt 
)
inline

◆ consumeQueue()

QueueConnection hobbes::storage::consumeQueue ( const std::string &  shmname)
inline

◆ encode_primty()

void hobbes::storage::encode_primty ( const char *  tn,
bytes out 
)
inline

◆ forceRegistration()

template<uint32_t * X>
uint32_t hobbes::storage::forceRegistration ( )

◆ makeGroupHost()

int hobbes::storage::makeGroupHost ( const std::string &  groupName)
inline

◆ makePayloadTypes()

template<typename ... Ts>
hstore_payload_types<Ts...> hobbes::storage::makePayloadTypes ( const Ts &  ...)

◆ makeTyDescF()

template<typename TyList >
void hobbes::storage::makeTyDescF ( bytes e,
std::string *  d 
)

◆ maxV()

static constexpr size_t hobbes::storage::maxV ( size_t  x,
size_t  y 
)
static

◆ maxVarRef()

template<size_t N>
static constexpr size_t hobbes::storage::maxVarRef ( const char(&)  fmt[N])
static

◆ maxVarRefS()

template<size_t N>
static constexpr size_t hobbes::storage::maxVarRefS ( const char(&)  fmt[N],
size_t  i,
size_t  s,
size_t  vri,
size_t  maxvr 
)
static

◆ mqconnect()

int hobbes::storage::mqconnect ( const std::string &  fileName)
inline

◆ mqlisten()

int hobbes::storage::mqlisten ( const std::string &  fileName)
inline

◆ mqwrite()

void hobbes::storage::mqwrite ( int  fd,
const uint8_t *  x,
size_t  len 
)
inline

◆ r()

template<typename T >
size_t hobbes::storage::r ( const reader::MetaData md,
size_t  o,
T *  t 
)

◆ readInt()

template<size_t N>
static constexpr size_t hobbes::storage::readInt ( const char(&)  fmt[N],
size_t  i,
size_t  e,
size_t  n 
)
static

◆ registerSHMAlloc()

void hobbes::storage::registerSHMAlloc ( int *  mqserver,
const std::string &  groupName 
)
inline

◆ rs() [1/3]

size_t hobbes::storage::rs ( const reader::MetaData md,
size_t  o,
size_t  n,
uint8_t *  b 
)
inline

◆ rs() [2/3]

size_t hobbes::storage::rs ( const reader::MetaData md,
size_t  o,
std::string *  s 
)
inline

◆ rs() [3/3]

size_t hobbes::storage::rs ( const reader::MetaData md,
size_t  o,
bytes s 
)
inline

◆ runReadProcess()

void hobbes::storage::runReadProcess ( const QueueConnection qc,
const std::function< std::function< void(Transaction &)>(PipeQOS, CommitMethod, const statements &)> &  initF 
)
inline

◆ sharedMemName() [1/2]

std::string hobbes::storage::sharedMemName ( const std::string &  groupName,
const ProcThread pt 
)
inline

◆ sharedMemName() [2/2]

std::string hobbes::storage::sharedMemName ( const std::string &  groupName)
inline

◆ sys_futex()

static long hobbes::storage::sys_futex ( volatile uint32_t *  p,
int  op,
int  v,
struct timespec *  timeout,
void *  p2,
int  v2 
)
inlinestatic

◆ tempDir()

std::string hobbes::storage::tempDir ( )
inline

◆ thisProcThread()

ProcThread hobbes::storage::thisProcThread ( )
inline

◆ uxchg()

static void hobbes::storage::uxchg ( volatile uint32_t *  px,
uint32_t  nx 
)
inlinestatic

◆ w()

template<typename T >
void hobbes::storage::w ( const T &  x,
bytes out 
)

◆ waitForUpdate()

static void hobbes::storage::waitForUpdate ( volatile uint32_t *  p,
int  eqV 
)
inlinestatic

◆ wakeN()

static void hobbes::storage::wakeN ( volatile uint32_t *  p,
int  c 
)
inlinestatic

◆ write() [1/2]

template<typename GName , typename ... Ts>
bool hobbes::storage::write ( StorageGroup< GName, AutoCommit > *  g,
uint32_t  id,
const Ts &...  xs 
)
inline

◆ write() [2/2]

template<typename GName , typename ... Ts>
bool hobbes::storage::write ( StorageGroup< GName, ManualCommit > *  g,
uint32_t  id,
const Ts &...  xs 
)
inline

◆ ws() [1/3]

void hobbes::storage::ws ( const char *  x,
bytes out 
)
inline

◆ ws() [2/3]

void hobbes::storage::ws ( const std::string &  x,
bytes out 
)
inline

◆ ws() [3/3]

void hobbes::storage::ws ( const bytes x,
bytes out 
)
inline