ct_common  1.0.1
Common library for combinatorial testing
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Static Public Member Functions
ct::common::ParamSpec Class Reference

#include <paramspec.h>

Inheritance diagram for ct::common::ParamSpec:
ct::common::ParamSpec_Bool ct::common::ParamSpec_Double ct::common::ParamSpec_Int ct::common::ParamSpec_String

List of all members.

Public Member Functions

 ParamSpec (void)
 ParamSpec (const ParamSpec &from)
ParamSpecoperator= (const ParamSpec &right)
virtual ~ParamSpec (void)=0
void set_param_name (const std::string &param_name)
const std::string & get_param_name (void) const
virtual void set_values (const std::vector< std::string > &string_values)
const std::vector< std::string > & get_string_values (void) const
std::size_t get_level (void) const
const std::map< std::string,
std::size_t > & 
get_map_string_values_2_vid (void) const
std::size_t query_value_id (const std::string &str) const
virtual std::string get_class_name (void) const
std::vector< std::pair
< boost::shared_ptr< TreeNode >
, boost::shared_ptr< TreeNode > > > & 
auto_value_specs (void)
const std::vector< std::pair
< boost::shared_ptr< TreeNode >
, boost::shared_ptr< TreeNode > > > & 
get_auto_value_specs (void) const
void touch_pids (const std::vector< boost::shared_ptr< ParamSpec > > &param_specs, std::set< std::size_t > &pids_to_touch) const
void set_aux (bool flag)
bool is_aux (void) const
void set_auto (bool flag)
bool is_auto (void) const
std::size_t get_invalid_vid (void) const
std::size_t get_width (void) const
std::size_t get_num_values (void) const
bool is_vid_invalid (std::size_t vid) const

Static Public Member Functions

static std::string class_name (void)

Detailed Description

The base class for parameter specifications

Definition at line 29 of file paramspec.h.


Constructor & Destructor Documentation

Definition at line 18 of file paramspec.cpp.

ParamSpec::ParamSpec ( const ParamSpec from)

Definition at line 22 of file paramspec.cpp.

ParamSpec::~ParamSpec ( void  ) [pure virtual]

Definition at line 39 of file paramspec.cpp.


Member Function Documentation

std::vector<std::pair<boost::shared_ptr<TreeNode>, boost::shared_ptr<TreeNode> > >& ct::common::ParamSpec::auto_value_specs ( void  ) [inline]

The specification for auto parameters

Definition at line 73 of file paramspec.h.

std::string ParamSpec::class_name ( void  ) [static]

TODO: to be replaced by typeid

Reimplemented in ct::common::ParamSpec_Bool, ct::common::ParamSpec_Double, ct::common::ParamSpec_Int, and ct::common::ParamSpec_String.

Definition at line 65 of file paramspec.cpp.

const std::vector<std::pair<boost::shared_ptr<TreeNode>, boost::shared_ptr<TreeNode> > >& ct::common::ParamSpec::get_auto_value_specs ( void  ) const [inline]

The constant reference for auto parameter specifications

Definition at line 75 of file paramspec.h.

std::string ParamSpec::get_class_name ( void  ) const [virtual]

TODO: to be replaced by typeid

Reimplemented in ct::common::ParamSpec_Bool, ct::common::ParamSpec_Double, ct::common::ParamSpec_Int, and ct::common::ParamSpec_String.

Definition at line 61 of file paramspec.cpp.

std::size_t ct::common::ParamSpec::get_invalid_vid ( void  ) const [inline]

Get the vid for invalid values, which is level

Definition at line 91 of file paramspec.h.

std::size_t ct::common::ParamSpec::get_level ( void  ) const [inline]

Get the level (number of values) of the parameter

Definition at line 56 of file paramspec.h.

const std::map<std::string, std::size_t>& ct::common::ParamSpec::get_map_string_values_2_vid ( void  ) const [inline]

Get the map from strings to their ids by looking up the preserved string copies

Definition at line 60 of file paramspec.h.

std::size_t ct::common::ParamSpec::get_num_values ( void  ) const [inline]

Get the number of values (same with get_level)

Definition at line 95 of file paramspec.h.

const std::string& ct::common::ParamSpec::get_param_name ( void  ) const [inline]

Getting the parameter name

Definition at line 40 of file paramspec.h.

const std::vector<std::string>& ct::common::ParamSpec::get_string_values ( void  ) const [inline]

Get the preserved string values

Definition at line 52 of file paramspec.h.

std::size_t ParamSpec::get_width ( void  ) const

Get the width of the values (for output padding)

Definition at line 78 of file paramspec.cpp.

bool ct::common::ParamSpec::is_auto ( void  ) const [inline]

Whether the parameter is automatic

Definition at line 88 of file paramspec.h.

bool ct::common::ParamSpec::is_aux ( void  ) const [inline]

Whether the parameter is auxiliary

Definition at line 84 of file paramspec.h.

bool ct::common::ParamSpec::is_vid_invalid ( std::size_t  vid) const [inline]

Check whether the given vid is invalid (>=level)

Definition at line 97 of file paramspec.h.

ParamSpec & ParamSpec::operator= ( const ParamSpec right)

Definition at line 26 of file paramspec.cpp.

std::size_t ParamSpec::query_value_id ( const std::string &  str) const

Query the value id by looking up the preserved string copies. Value ids start from zero.

Definition at line 69 of file paramspec.cpp.

void ct::common::ParamSpec::set_auto ( bool  flag) [inline]

Setting the auto flag

Definition at line 86 of file paramspec.h.

void ct::common::ParamSpec::set_aux ( bool  flag) [inline]

Setting the aux flag

Definition at line 82 of file paramspec.h.

void ct::common::ParamSpec::set_param_name ( const std::string &  param_name) [inline]

Setting the parameter name

Definition at line 38 of file paramspec.h.

void ParamSpec::set_values ( const std::vector< std::string > &  string_values) [virtual]

Setting the values by their string representations An invalid value is automatically added in the back A copy of the original string values is preserved

Reimplemented in ct::common::ParamSpec_Bool, ct::common::ParamSpec_Double, and ct::common::ParamSpec_Int.

Definition at line 42 of file paramspec.cpp.

void ParamSpec::touch_pids ( const std::vector< boost::shared_ptr< ParamSpec > > &  param_specs,
std::set< std::size_t > &  pids_to_touch 
) const

Get the set of all related parameters

Definition at line 98 of file paramspec.cpp.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines