hobbes
a language, embedded compiler, and runtime for efficient dynamic expression evaluation, data storage and analysis
Public Types | Public Member Functions | Protected Attributes | Private Types | Private Attributes | List of all members
hobbes::reader Class Reference

#include <file.H>

Inheritance diagram for hobbes::reader:
Inheritance graph
Collaboration diagram for hobbes::reader:
Collaboration graph

Public Types

typedef std::pair< uint8_t, short > PageEntry
 
typedef array< PageEntryPageEntries
 

Public Member Functions

 reader (imagefile *)
 
 reader (const std::string &)
 
virtual ~reader ()
 
const std::string & file () const
 
size_t size () const
 
MonoTypeSubst signature () const
 
template<typename T >
frefty< T >::ptr lookup (const std::string &vn) const
 
template<typename T >
fileref< typename frefty< T >::type > offsetOf (const T *x) const
 
template<typename T >
frefty< T >::ptr load (const fileref< T > &x)
 
template<typename T >
void unmap (T *x)
 
template<typename T >
void unmap (array< T > *xs)
 
unsigned int pushOffset (uint64_t offset, const MonoTypePtr &ty)
 
void * unsafeLoadStoredOffset (unsigned int o) const
 
void storedOffsetDetails (unsigned int o, uint64_t *offset, size_t *sz) const
 
void showFileSummary (std::ostream &) const
 
void showEnvironment (std::ostream &) const
 
void showMappings (std::ostream &, size_t) const
 
void showPageTable (std::ostream &, size_t) const
 
void show (std::ostream &) const
 
void * unsafeLookup (const std::string &, const MonoTypePtr &) const
 
uint64_t unsafeLookupOffset (const std::string &, const MonoTypePtr &) const
 
uint64_t unsafeOffsetOf (const MonoTypePtr &, void *) const
 
uint64_t unsafeOffsetOfVal (bool, void *) const
 
void * unsafeLoad (const MonoTypePtr &, uint64_t) const
 
void * unsafeLoad (uint64_t, size_t) const
 
void * unsafeLoadArray (uint64_t) const
 
void unsafeUnload (void *, size_t)
 
void unsafeUnloadArray (void *)
 
uint64_t unsafeArrayCapacity (uint64_t) const
 
int unsafeGetFD () const
 
PageEntriespageEntries () const
 

Protected Attributes

imagefilefdata
 

Private Types

typedef std::vector< uint64_t > StoredOffsets
 
typedef std::vector< size_t > StoredOffsetSizes
 

Private Attributes

StoredOffsets storedOffsets
 
StoredOffsetSizes storedOffSizes
 

Member Typedef Documentation

◆ PageEntries

◆ PageEntry

typedef std::pair<uint8_t, short> hobbes::reader::PageEntry

◆ StoredOffsets

typedef std::vector<uint64_t> hobbes::reader::StoredOffsets
private

◆ StoredOffsetSizes

typedef std::vector<size_t> hobbes::reader::StoredOffsetSizes
private

Constructor & Destructor Documentation

◆ reader() [1/2]

hobbes::reader::reader ( imagefile f)

◆ reader() [2/2]

hobbes::reader::reader ( const std::string &  path)

◆ ~reader()

hobbes::reader::~reader ( )
virtual

Member Function Documentation

◆ file()

const std::string & hobbes::reader::file ( ) const

◆ load()

template<typename T >
frefty<T>::ptr hobbes::reader::load ( const fileref< T > &  x)
inline

◆ lookup()

template<typename T >
frefty<T>::ptr hobbes::reader::lookup ( const std::string &  vn) const
inline

◆ offsetOf()

template<typename T >
fileref< typename frefty<T>::type > hobbes::reader::offsetOf ( const T *  x) const
inline

◆ pageEntries()

reader::PageEntries * hobbes::reader::pageEntries ( ) const

◆ pushOffset()

unsigned int hobbes::reader::pushOffset ( uint64_t  offset,
const MonoTypePtr ty 
)
inline

◆ show()

void hobbes::reader::show ( std::ostream &  out) const

◆ showEnvironment()

void hobbes::reader::showEnvironment ( std::ostream &  out) const

◆ showFileSummary()

void hobbes::reader::showFileSummary ( std::ostream &  out) const

◆ showMappings()

void hobbes::reader::showMappings ( std::ostream &  out,
size_t  pageRows 
) const

◆ showPageTable()

void hobbes::reader::showPageTable ( std::ostream &  out,
size_t  maxRows 
) const

◆ signature()

MonoTypeSubst hobbes::reader::signature ( ) const

◆ size()

size_t hobbes::reader::size ( ) const

◆ storedOffsetDetails()

void hobbes::reader::storedOffsetDetails ( unsigned int  o,
uint64_t *  offset,
size_t *  sz 
) const
inline

◆ unmap() [1/2]

template<typename T >
void hobbes::reader::unmap ( T *  x)
inline

◆ unmap() [2/2]

template<typename T >
void hobbes::reader::unmap ( array< T > *  xs)
inline

◆ unsafeArrayCapacity()

uint64_t hobbes::reader::unsafeArrayCapacity ( uint64_t  pos) const

◆ unsafeGetFD()

int hobbes::reader::unsafeGetFD ( ) const

◆ unsafeLoad() [1/2]

void * hobbes::reader::unsafeLoad ( const MonoTypePtr ty,
uint64_t  pos 
) const

◆ unsafeLoad() [2/2]

void * hobbes::reader::unsafeLoad ( uint64_t  pos,
size_t  datasz 
) const

◆ unsafeLoadArray()

void * hobbes::reader::unsafeLoadArray ( uint64_t  pos) const

◆ unsafeLoadStoredOffset()

void* hobbes::reader::unsafeLoadStoredOffset ( unsigned int  o) const
inline

◆ unsafeLookup()

void * hobbes::reader::unsafeLookup ( const std::string &  vn,
const MonoTypePtr ty 
) const

◆ unsafeLookupOffset()

uint64_t hobbes::reader::unsafeLookupOffset ( const std::string &  vn,
const MonoTypePtr ty 
) const

◆ unsafeOffsetOf()

uint64_t hobbes::reader::unsafeOffsetOf ( const MonoTypePtr ty,
void *  p 
) const

◆ unsafeOffsetOfVal()

uint64_t hobbes::reader::unsafeOffsetOfVal ( bool  isArr,
void *  p 
) const

◆ unsafeUnload()

void hobbes::reader::unsafeUnload ( void *  p,
size_t  sz 
)

◆ unsafeUnloadArray()

void hobbes::reader::unsafeUnloadArray ( void *  p)

Member Data Documentation

◆ fdata

imagefile* hobbes::reader::fdata
protected

◆ storedOffsets

StoredOffsets hobbes::reader::storedOffsets
private

◆ storedOffSizes

StoredOffsetSizes hobbes::reader::storedOffSizes
private

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