atlas  0.6
Public Types | Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
atlas::interpreter::Hash_table Class Reference

#include <buffer.h>

Collaboration diagram for atlas::interpreter::Hash_table:
Collaboration graph
[legend]

Public Types

typedef unsigned short id_type
 

Public Member Functions

 Hash_table (size_t init=initial_hash_mod, size_t block_size=String_pool::default_block_size)
 
id_type nr_entries () const
 
const char * name_of (id_type nr) const
 
bool knows (const char *name) const
 
id_type match (const char *s, size_t l)
 
id_type match_literal (const char *s)
 

Static Public Attributes

static const id_type empty
 

Private Member Functions

id_type hash (const char *s, size_t l) const
 
id_type do_match (const char *s, size_t l, bool copy_string)
 
size_t max_fill () const
 

Private Attributes

String_pool pool
 
id_type mod
 
std::vector< id_typehash_tab
 
std::vector< const char * > name_tab
 

Static Private Attributes

static const id_type initial_hash_mod =97
 

Member Typedef Documentation

Constructor & Destructor Documentation

atlas::interpreter::Hash_table::Hash_table ( size_t  init = initial_hash_mod,
size_t  block_size = String_pool::default_block_size 
)

Member Function Documentation

Hash_table::id_type atlas::interpreter::Hash_table::do_match ( const char *  s,
size_t  l,
bool  copy_string 
)
private
Hash_table::id_type atlas::interpreter::Hash_table::hash ( const char *  s,
size_t  l 
) const
private
bool atlas::interpreter::Hash_table::knows ( const char *  name) const
id_type atlas::interpreter::Hash_table::match ( const char *  s,
size_t  l 
)
inline
id_type atlas::interpreter::Hash_table::match_literal ( const char *  s)
inline
size_t atlas::interpreter::Hash_table::max_fill ( ) const
inlineprivate
const char* atlas::interpreter::Hash_table::name_of ( id_type  nr) const
inline
id_type atlas::interpreter::Hash_table::nr_entries ( ) const
inline

Member Data Documentation

const Hash_table::id_type atlas::interpreter::Hash_table::empty
static
Initial value:
=
~static_cast<Hash_table::id_type>(0)
std::vector<id_type> atlas::interpreter::Hash_table::hash_tab
private
const id_type atlas::interpreter::Hash_table::initial_hash_mod =97
staticprivate
id_type atlas::interpreter::Hash_table::mod
private
std::vector<const char* > atlas::interpreter::Hash_table::name_tab
private
String_pool atlas::interpreter::Hash_table::pool
private

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