Logo SoCRocket

Transaction-Level Modeling Framework for Space Applications

Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
sr_param< T > Class Template Reference

The parameters, sr_param class, templated. More...

#include <sr_param_class.h>

Inheritance diagram for sr_param< T >:
Collaboration diagram for sr_param< T >:

Public Member Functions

std::string convertValueToString (const val_type &val) const
 Overloads sr_param_t<T>::convertValueToString. More...
 
- Public Member Functions inherited from sr_param_t< T >
my_typeoperator+= (val_type)
 
my_typeoperator-= (val_type)
 
my_typeoperator/= (val_type)
 
my_typeoperator*= (val_type)
 
val_type operator+ (val_type)
 
val_type operator- (val_type)
 
val_type operator/ (val_type)
 
val_type operator* (val_type)
 
my_typeoperator%= (val_type)
 
my_typeoperator^= (val_type)
 
my_typeoperator&= (val_type)
 
my_typeoperator|= (val_type)
 
my_typeoperator<<= (val_type)
 
my_typeoperator>>= (val_type)
 
my_typeoperator-- ()
 
val_type operator-- (int)
 
my_typeoperator++ ()
 
val_type operator++ (int)
 
 sr_param_t ()
 Empty constructor. Name will be set in base. Avoid using it! You MUST call init() after instantiation! More...
 
 sr_param_t (const bool force_top_level_name, gs_param_array *parent_array, const bool register_at_db)
 Constructor with the special parameters. Name will be set in base. Avoid using it! You MUST call init() after instantiation! More...
 
 sr_param_t (const std::string &nam)
 Constructor with (local or hierarchical) name. You MUST call init() after instantiation! More...
 
 sr_param_t (const std::string &nam, const bool force_top_level_name, gs_param_array *parent_array, const bool register_at_db)
 Constructor with (local or hierarchical) name and special parameters. You MUST call init() after instantiation! More...
 
void init (const val_type &default_val)
 Init method to set the value and add the parameter to the plugin db. More...
 
void init ()
 Init method without value. More...
 
virtual ~sr_param_t ()
 Destructor. More...
 
my_typeoperator= (const my_type &v)
 Set the value of this parameter to the value of another gs_param. More...
 
my_typeoperator= (const val_type &v)
 Set the value of this parameter. More...
 
 operator const val_type & () const
 Get the value of this parameter. More...
 
void setValue (const val_type &val)
 Set the value of this parameter. More...
 
const val_type & getValue () const
 Returns the value of this parameter. More...
 
const void * get_value_pointer () const
 
bool setString (const std::string &str)
 Set the value of this parameter with a string. More...
 
const std::string & getString () const
 Get the value of this parameter as a string. More...
 
virtual const bool deserialize (val_type &target_val, const std::string &str)=0
 Deserialize for this parameter. To be implemented by the specialization. More...
 
void mirror (T &original)
 Serialize this parameter. More...
 
void mirror (sr_param_t< T > &original)
 
- Public Member Functions inherited from sr_param_base
 sr_param_base (const std::string &n, const bool register_at_db=true, gs::cnf::gs_param_array *parent_array=NULL, const bool force_top_level_name=false)
 
void setProperty (std::string key, std::string value)
 
std::string getProperty (std::string key)
 
std::map< std::string,
std::string > 
getProperties ()
 
void deleteProperty (std::string key)
 
bool exists (std::string key)
 
easy_init add_properties ()
 

Static Public Member Functions

static bool static_deserialize (val_type &target_val, const std::string &str)
 Static convertion function called by virtual deserialize and others (e.g. GCnf_API) More...
 

Public Attributes

 SR_PARAM_HEAD
 

Additional Inherited Members

- Protected Member Functions inherited from sr_param_t< T >
gs::cnf::callback_return_type mirror_callback (gs::gs_param_base &changed_param, gs::cnf::callback_type reason)
 
const val_type & convertStringToValue (const std::string &str)
 Get the value the string. Needed for construction of gs_param. More...
 
- Protected Attributes inherited from sr_param_t< T >
val_type my_value
 Value of this parameter. More...
 
std::string return_string
 String whose reference can be returned as string value. More...
 
sr_param_t< T > * m_mirror_param
 
T * m_mirror_val
 

Detailed Description

template<typename T>
class sr_param< T >

The parameters, sr_param class, templated.

Each explicitely supported data type has a template specialisation. See specialisations. All data types for which no specialization is existing, will use this class.

Member Function Documentation

template<typename T>
std::string sr_param< T >::convertValueToString ( const val_type &  val) const
inlinevirtual
template<typename T>
static bool sr_param< T >::static_deserialize ( val_type &  target_val,
const std::string &  str 
)
inlinestatic

Static convertion function called by virtual deserialize and others (e.g. GCnf_API)

Does not change the target_val if str == ""

Referenced by sr_param< std::string >::deserialize(), sr_param< sc_core::sc_event >::deserialize(), and sr_param< sc_core::sc_time >::static_deserialize().

Member Data Documentation

template<typename T>
sr_param< T >::SR_PARAM_HEAD

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