ct_common
1.0.1
Common library for combinatorial testing
|
#include <tree_node.h>
Public Member Functions | |
TreeNode (void) | |
TreeNode (const TreeNode &from) | |
TreeNode & | operator= (const TreeNode &right) |
virtual | ~TreeNode (void)=0 |
virtual std::string | get_class_name (void) const |
bool | is_leaf (void) const |
void | touch_pids (const std::vector< boost::shared_ptr< ParamSpec > > ¶m_specs, std::set< std::size_t > &pids_to_touch) const |
virtual void | inner_touch_leaf_pids (const std::vector< boost::shared_ptr< ParamSpec > > ¶m_specs, std::set< std::size_t > &pids_to_touch) const |
const std::vector < boost::shared_ptr< TreeNode > > & | get_oprds () const |
virtual const std::string & | get_str_value (void) const |
virtual void | dump (std::ostream &os, const std::vector< boost::shared_ptr< ParamSpec > > ¶m_specs) const =0 |
Static Public Member Functions | |
static std::string | class_name (void) |
Protected Attributes | |
std::vector< boost::shared_ptr < TreeNode > > | oprds_ |
The base class for all expressions and constraints
Definition at line 29 of file tree_node.h.
TreeNode::TreeNode | ( | void | ) |
Definition at line 20 of file tree_node.cpp.
TreeNode::TreeNode | ( | const TreeNode & | from | ) |
Only shallow copy here
Definition at line 24 of file tree_node.cpp.
TreeNode::~TreeNode | ( | void | ) | [pure virtual] |
Definition at line 28 of file tree_node.cpp.
std::string TreeNode::class_name | ( | void | ) | [static] |
TODO: replace by typeid
Reimplemented in ct::common::Exp_A, ct::common::Constraint, ct::common::Exp, ct::common::Exp_S, ct::common::Constraint_L_Atom, ct::common::Exp_S_Atom, ct::common::Constraint_A_Binary, ct::common::Constraint_S_Binary, ct::common::Exp_A_Atom, ct::common::Exp_A_Binary, ct::common::Exp_A_Param, ct::common::Exp_A_Unary, ct::common::Constraint_L, ct::common::Constraint_L_Binary, ct::common::Constraint_L_IVLD, ct::common::Constraint_L_Param, ct::common::Constraint_L_Unary, ct::common::Exp_A_Add, ct::common::Exp_A_Cast, ct::common::Exp_A_CDouble, ct::common::Exp_A_CInt, ct::common::Exp_A_ConstraintCast, ct::common::Exp_A_Div, ct::common::Exp_A_Mod, ct::common::Exp_A_Mult, ct::common::Exp_A_Neg, ct::common::Exp_A_Sub, ct::common::Exp_S_CString, ct::common::Constraint_A, ct::common::Constraint_A_EQ, ct::common::Constraint_A_GE, ct::common::Constraint_A_GT, ct::common::Constraint_A_LE, ct::common::Constraint_A_LT, ct::common::Constraint_A_NE, ct::common::Constraint_L_And, ct::common::Constraint_L_CBool, ct::common::Constraint_L_Iff, ct::common::Constraint_L_Imply, ct::common::Constraint_L_Not, ct::common::Constraint_L_Or, ct::common::Constraint_L_Xor, ct::common::Constraint_S, ct::common::Constraint_S_EQ, ct::common::Constraint_S_NE, and ct::common::Exp_S_Param.
Definition at line 59 of file tree_node.cpp.
virtual void ct::common::TreeNode::dump | ( | std::ostream & | os, |
const std::vector< boost::shared_ptr< ParamSpec > > & | param_specs | ||
) | const [pure virtual] |
Print the tree node to a given output stream
Implemented in ct::common::Constraint_L_CBool, ct::common::Constraint_A_Binary, ct::common::Constraint_S_Binary, ct::common::Exp_A_Binary, ct::common::Exp_A_Param, ct::common::Exp_A_Unary, ct::common::Constraint_L_Binary, ct::common::Constraint_L_IVLD, ct::common::Constraint_L_Param, ct::common::Constraint_L_Unary, ct::common::Exp_A_Cast, ct::common::Exp_A_CDouble, ct::common::Exp_A_CInt, ct::common::Exp_A_ConstraintCast, ct::common::Exp_S_CString, and ct::common::Exp_S_Param.
std::string TreeNode::get_class_name | ( | void | ) | const [virtual] |
TODO: replace by typeid
Reimplemented in ct::common::Exp_A, ct::common::Constraint, ct::common::Exp, ct::common::Exp_S, ct::common::Constraint_L_Atom, ct::common::Exp_S_Atom, ct::common::Constraint_A_Binary, ct::common::Constraint_S_Binary, ct::common::Exp_A_Atom, ct::common::Exp_A_Binary, ct::common::Exp_A_Param, ct::common::Exp_A_Unary, ct::common::Constraint_L, ct::common::Constraint_L_Binary, ct::common::Constraint_L_IVLD, ct::common::Constraint_L_Param, ct::common::Constraint_L_Unary, ct::common::Exp_A_Add, ct::common::Exp_A_Cast, ct::common::Exp_A_CDouble, ct::common::Exp_A_CInt, ct::common::Exp_A_ConstraintCast, ct::common::Exp_A_Div, ct::common::Exp_A_Mod, ct::common::Exp_A_Mult, ct::common::Exp_A_Neg, ct::common::Exp_A_Sub, ct::common::Exp_S_CString, ct::common::Constraint_A, ct::common::Constraint_A_EQ, ct::common::Constraint_A_GE, ct::common::Constraint_A_GT, ct::common::Constraint_A_LE, ct::common::Constraint_A_LT, ct::common::Constraint_A_NE, ct::common::Constraint_L_And, ct::common::Constraint_L_CBool, ct::common::Constraint_L_Iff, ct::common::Constraint_L_Imply, ct::common::Constraint_L_Not, ct::common::Constraint_L_Or, ct::common::Constraint_L_Xor, ct::common::Constraint_S, ct::common::Constraint_S_EQ, ct::common::Constraint_S_NE, and ct::common::Exp_S_Param.
Definition at line 55 of file tree_node.cpp.
const std::vector<boost::shared_ptr<TreeNode> >& ct::common::TreeNode::get_oprds | ( | ) | const [inline] |
Get the operands
Definition at line 57 of file tree_node.h.
const std::string & TreeNode::get_str_value | ( | void | ) | const [virtual] |
Setting the string value (preserve a copy of the original string representation)
Reimplemented in ct::common::Exp_A_CDouble, ct::common::Exp_A_CInt, ct::common::Exp_S_CString, and ct::common::Constraint_L_CBool.
Definition at line 63 of file tree_node.cpp.
void TreeNode::inner_touch_leaf_pids | ( | const std::vector< boost::shared_ptr< ParamSpec > > & | param_specs, |
std::set< std::size_t > & | pids_to_touch | ||
) | const [virtual] |
Inner function to get all related parameters
Reimplemented in ct::common::Constraint_L_Param, ct::common::Constraint_L_IVLD, ct::common::Exp_A_Param, and ct::common::Exp_S_Param.
Definition at line 91 of file tree_node.cpp.
bool ct::common::TreeNode::is_leaf | ( | void | ) | const [inline] |
Whether the node is a leaf node
Definition at line 43 of file tree_node.h.
Only shallow copy here
Definition at line 50 of file tree_node.cpp.
void TreeNode::touch_pids | ( | const std::vector< boost::shared_ptr< ParamSpec > > & | param_specs, |
std::set< std::size_t > & | pids_to_touch | ||
) | const |
Get all related parameters EXCEPT for auto parameters param_specs are used to determine related pids of auto parameters
Definition at line 68 of file tree_node.cpp.
std::vector<boost::shared_ptr<TreeNode> > ct::common::TreeNode::oprds_ [protected] |
The operands
Definition at line 66 of file tree_node.h.