hobbes
a language, embedded compiler, and runtime for efficient dynamic expression evaluation, data storage and analysis
Classes | Namespaces | Functions | Variables
ptr.H File Reference
#include <hobbes/util/hash.H>
#include <memory>
#include <vector>
#include <unordered_map>
#include <map>
#include <iostream>
#include <atomic>
#include <mutex>
Include dependency graph for ptr.H:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  hobbes::unique_refc_map< T, Args >
 

Namespaces

 hobbes
 

Functions

template<size_t i, typename ... UniqueRefcMaps>
std::enable_if< i==sizeof...(UniqueRefcMaps), size_t >::type hobbes::compactAll (std::tuple< UniqueRefcMaps... > &)
 
size_t hobbes::compact ()
 
template<typename T >
hobbes::align (T x, T m)
 
template<typename T , typename S >
const T * hobbes::is (const S *s)
 
template<typename T , typename S >
T * hobbes::isM (S *s)
 
template<typename T , typename S >
T * hobbes::is (const std::shared_ptr< S > &s)
 

Variables

template<size_t i, typename ... UniqueRefcMaps>
std::enable_if< i< sizeof...(UniqueRefcMaps), size_t >::type compactAll(std::tuple< UniqueRefcMaps... > &ms) { return std::get< i >ms).compact()+compactAll< i+1, UniqueRefcMaps... >ms);}template< size_t i, typename T, typename ... Ts > struct TypeIndex { static const size_t value=i;};template< size_t i, typename T, typename ... Ts > struct TypeIndex< i, T, T, Ts... > { static const size_t value=i;};template< size_t i, typename T, typename U, typename ... Ts > struct TypeIndex< i, T, U, Ts... > { static const size_t value=TypeIndex< i+1, T, Ts... >::value;};template< typename ... UniqueRefcMaps > class unique_refc_maps { private:typedef std::tuple< UniqueRefcMaps... > RefcMaps;RefcMaps refcMaps;public:template< typename T > typename std::tuple_element< TypeIndex< 0, T, UniqueRefcMaps... >::value, RefcMaps >::type &at() { return std::get< TypeIndex< 0, T, UniqueRefcMaps... >::value >this-> hobbes::refcMaps