SST/macro
Public Types | Static Public Member Functions | Static Public Attributes | Static Protected Member Functions | List of all members
sprockit::Factory< T, Args > Class Template Reference

#include <factory.h>

Collaboration diagram for sprockit::Factory< T, Args >:
Collaboration graph

Public Types

typedef SpktBuilder< T, Args... > builder_t
 
typedef T element_type
 
typedef std::map< std::string, builder_t * > builder_map
 
typedef std::map< std::string, std::list< std::string > > alias_map
 

Static Public Member Functions

static void register_alias (const std::string &oldname, const std::string &newname)
 
static void clean_up ()
 
static void register_name (const std::string &name, builder_t *descr)
 
static void add_to_map (const std::string &namestr, builder_t *desc, std::map< std::string, builder_t * > *descr_map, std::map< std::string, std::list< std::string > > *alias_map)
 
static T * get_value (const std::string &valname, sim_parameters *params, const Args &...args)
 
static T * get_extra_param (const std::string &param_name, sim_parameters *params, const Args &...args)
 
static T * get_param (const std::string &param_name, sim_parameters *params, const Args &...args)
 
static T * get_optional_param (const std::string &param_name, const std::string &defval, sim_parameters *params, const Args &...args)
 

Static Public Attributes

static builder_mapbuilder_map_
 
static alias_mapalias_map_
 
static const char * name_
 

Static Protected Member Functions

static T * _get_value (const std::string &valname, sprockit::sim_parameters *params, const Args &...args)
 

Detailed Description

template<class T, typename... Args>
class sprockit::Factory< T, Args >

Definition at line 54 of file factory.h.

Member Typedef Documentation

template<class T , typename... Args>
typedef std::map<std::string, std::list<std::string> > sprockit::Factory< T, Args >::alias_map

Definition at line 63 of file factory.h.

template<class T , typename... Args>
typedef std::map<std::string, builder_t*> sprockit::Factory< T, Args >::builder_map

Definition at line 61 of file factory.h.

template<class T , typename... Args>
typedef SpktBuilder<T,Args...> sprockit::Factory< T, Args >::builder_t

Definition at line 58 of file factory.h.

template<class T , typename... Args>
typedef T sprockit::Factory< T, Args >::element_type

Definition at line 59 of file factory.h.

Member Function Documentation

template<class T , typename... Args>
static T* sprockit::Factory< T, Args >::_get_value ( const std::string &  valname,
sprockit::sim_parameters *  params,
const Args &...  args 
)
inlinestaticprotected

Definition at line 139 of file factory.h.

References spkt_throw_printf.

template<class T , typename... Args>
static void sprockit::Factory< T, Args >::add_to_map ( const std::string &  namestr,
builder_t desc,
std::map< std::string, builder_t * > *  descr_map,
std::map< std::string, std::list< std::string > > *  alias_map 
)
inlinestatic

Definition at line 108 of file factory.h.

References pst::BasicStringTokenizer::tokenize(), and sprockit::trim_str().

Here is the call graph for this function:

template<class T , typename... Args>
static void sprockit::Factory< T, Args >::clean_up ( )
inlinestatic

Definition at line 85 of file factory.h.

Referenced by sprockit::CleanupFactory< Factory >::~CleanupFactory().

template<class T , typename... Args>
static T* sprockit::Factory< T, Args >::get_extra_param ( const std::string &  param_name,
sim_parameters *  params,
const Args &...  args 
)
inlinestatic

Definition at line 182 of file factory.h.

References get_param().

Here is the call graph for this function:

template<class T , typename... Args>
static T* sprockit::Factory< T, Args >::get_optional_param ( const std::string &  param_name,
const std::string &  defval,
sim_parameters *  params,
const Args &...  args 
)
inlinestatic

Definition at line 202 of file factory.h.

template<class T , typename... Args>
static T* sprockit::Factory< T, Args >::get_param ( const std::string &  param_name,
sim_parameters *  params,
const Args &...  args 
)
inlinestatic

Definition at line 194 of file factory.h.

template<class T , typename... Args>
static T* sprockit::Factory< T, Args >::get_value ( const std::string &  valname,
sim_parameters *  params,
const Args &...  args 
)
inlinestatic
template<class T , typename... Args>
static void sprockit::Factory< T, Args >::register_alias ( const std::string &  oldname,
const std::string &  newname 
)
inlinestatic

Definition at line 68 of file factory.h.

template<class T , typename... Args>
static void sprockit::Factory< T, Args >::register_name ( const std::string &  name,
builder_t descr 
)
inlinestatic

Member Data Documentation

template<class T , typename... Args>
alias_map* sprockit::Factory< T, Args >::alias_map_
static

Definition at line 64 of file factory.h.

template<class T , typename... Args>
builder_map* sprockit::Factory< T, Args >::builder_map_
static

Definition at line 62 of file factory.h.

template<class T , typename... Args>
const char* sprockit::Factory< T, Args >::name_
static

Definition at line 65 of file factory.h.


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