SST/macro
Classes | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes | Static Private Attributes | Friends | List of all members
sstmac::sw::key Class Reference

A base type and default (empty) implementation of a handle to block and unblock processes. More...

#include <key.h>

Collaboration diagram for sstmac::sw::key:
Collaboration graph

Classes

class  category
 

Public Types

typedef std::set< thread_data_tblocking_t
 Global identifier for all keys of a given type. More...
 

Public Member Functions

virtual std::string to_string () const
 
std::string name () const
 
int event_typeid () const
 
virtual ~key ()
 
void * operator new (size_t size)
 
void operator delete (void *ptr)
 
void block_thread (thread_data_t t)
 
bool still_blocked ()
 
bool timed_out () const
 
void set_timed_out ()
 
void clear ()
 

Static Public Member Functions

static keyconstruct ()
 
static keyconstruct (const category &name)
 
static std::string name (int keyname_id)
 
static int allocate_category_id (const std::string &name)
 
static int event_typeid (const std::string &event_name)
 
static int num_categories ()
 
static void delete_statics ()
 

Static Public Attributes

static category general
 

Private Member Functions

 key ()
 
 key (const category &name)
 

Private Attributes

thread_data_t blocked_thread_
 
bool timed_out_
 
int keyname_id_
 

Static Private Attributes

static spkt_unordered_map< std::string, int > * category_name_to_id_
 
static spkt_unordered_map< int, std::string > * category_id_to_name_
 
static uint64_t key_storage_size_
 

Friends

class operating_system
 

Detailed Description

A base type and default (empty) implementation of a handle to block and unblock processes.

Definition at line 30 of file key.h.

Member Typedef Documentation

Global identifier for all keys of a given type.

This should be a STATIC object that gets passed into every key when selecting type.

Definition at line 38 of file key.h.

Constructor & Destructor Documentation

virtual sstmac::sw::key::~key ( )
virtual

Referenced by event_typeid().

sstmac::sw::key::key ( )
private
sstmac::sw::key::key ( const category name)
private

Member Function Documentation

static int sstmac::sw::key::allocate_category_id ( const std::string &  name)
static

Referenced by name().

void sstmac::sw::key::block_thread ( thread_data_t  t)
inline

Definition at line 115 of file key.h.

References blocked_thread_.

void sstmac::sw::key::clear ( )
inline

Definition at line 135 of file key.h.

References blocked_thread_, and delete_statics().

Here is the call graph for this function:

static key* sstmac::sw::key::construct ( )
static

Referenced by to_string().

static key* sstmac::sw::key::construct ( const category name)
static
static void sstmac::sw::key::delete_statics ( )
static

Referenced by clear().

static int sstmac::sw::key::event_typeid ( const std::string &  event_name)
static
int sstmac::sw::key::event_typeid ( ) const
inline

Definition at line 102 of file key.h.

References keyname_id_, and ~key().

Referenced by name().

Here is the call graph for this function:

static std::string sstmac::sw::key::name ( int  keyname_id)
inlinestatic

Definition at line 81 of file key.h.

References allocate_category_id(), category_id_to_name_, and event_typeid().

Here is the call graph for this function:

std::string sstmac::sw::key::name ( ) const
inline

Definition at line 97 of file key.h.

References keyname_id_, and sstmac::sw::key::category::name().

Referenced by sstmac::sw::key::category::name().

Here is the call graph for this function:

static int sstmac::sw::key::num_categories ( )
inlinestatic

Definition at line 92 of file key.h.

References category_name_to_id_.

void sstmac::sw::key::operator delete ( void *  ptr)
void* sstmac::sw::key::operator new ( size_t  size)
void sstmac::sw::key::set_timed_out ( )
inline

Definition at line 130 of file key.h.

References timed_out_.

bool sstmac::sw::key::still_blocked ( )
inline

Definition at line 120 of file key.h.

References blocked_thread_.

bool sstmac::sw::key::timed_out ( ) const
inline

Definition at line 125 of file key.h.

References timed_out_.

virtual std::string sstmac::sw::key::to_string ( ) const
inlinevirtual

Definition at line 70 of file key.h.

References construct(), and sstmac::sw::key::category::name().

Here is the call graph for this function:

Friends And Related Function Documentation

friend class operating_system
friend

Definition at line 144 of file key.h.

Member Data Documentation

thread_data_t sstmac::sw::key::blocked_thread_
private

Definition at line 155 of file key.h.

Referenced by block_thread(), clear(), and still_blocked().

spkt_unordered_map<int, std::string>* sstmac::sw::key::category_id_to_name_
staticprivate

Definition at line 152 of file key.h.

Referenced by name().

spkt_unordered_map<std::string, int>* sstmac::sw::key::category_name_to_id_
staticprivate

Definition at line 151 of file key.h.

Referenced by num_categories().

category sstmac::sw::key::general
static
uint64_t sstmac::sw::key::key_storage_size_
staticprivate

Definition at line 153 of file key.h.

int sstmac::sw::key::keyname_id_
private

Definition at line 157 of file key.h.

Referenced by event_typeid(), and name().

bool sstmac::sw::key::timed_out_
private

Definition at line 156 of file key.h.

Referenced by set_timed_out(), and timed_out().


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