- Timestamp:
- Dec 10, 2008, 7:31:39 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Stat_binary_tree.h
r81 r88 14 14 namespace behavioural { 15 15 16 typedef enum { VARIABLE, CONSTANT, OPERATOR_UNARY, OPERATOR_BINARY} data_type_t;16 typedef enum {NONE, VARIABLE, CONSTANT, OPERATOR_UNARY, OPERATOR_BINARY} data_type_t; 17 17 18 18 typedef union … … 26 26 { 27 27 // arbre binaire 28 29 30 31 32 28 private : Stat_binary_tree * _root; 29 private : Stat_binary_tree * _left; 30 private : Stat_binary_tree * _right; 31 private : data_type_t _data_type; 32 private : data_t _data; 33 33 34 34 /* private : Stat_binary_tree (data_type_t data_type, data_t data); */ 35 public : Stat_binary_tree (counter_t cst);36 public : Stat_binary_tree (counter_t * var);37 public : Stat_binary_tree (operator_t op);38 39 public : ~Stat_binary_tree (void);35 public : Stat_binary_tree (std::string expr, 36 std::map<std::string, counter_t*> * operand); 37 public : Stat_binary_tree (counter_t cst); 38 public : Stat_binary_tree (counter_t * var); 39 public : Stat_binary_tree (operator_t op ); 40 40 41 private : void insert_tree (Stat_binary_tree * tree); 42 public : Stat_binary_tree * insert_tree (counter_t cst); 43 public : Stat_binary_tree * insert_tree (counter_t * var); 44 public : Stat_binary_tree * insert_tree (operator_t op ); 41 public : ~Stat_binary_tree (void); 42 43 private : void insert_tree (Stat_binary_tree * tree); 44 public : Stat_binary_tree * insert_tree (counter_t cst); 45 public : Stat_binary_tree * insert_tree (counter_t * var); 46 public : Stat_binary_tree * insert_tree (operator_t op ); 45 47 46 public : Stat_binary_tree * goto_top_level (void); 47 public : Stat_binary_tree * goto_next_root (void); 48 private : void change_type (counter_t cst); 49 private : void change_type (counter_t * var); 50 private : void change_type (operator_t op ); 51 52 public : Stat_binary_tree * goto_top_level (void); 53 public : Stat_binary_tree * goto_next_root (void); 48 54 49 public : boolvalid (void);55 public : bool valid (void); 50 56 51 public : counter_teval (void);57 public : counter_t eval (void); 52 58 53 private : counter_t val_tree (void); 54 private : counter_t val_leaf (void); 55 private : bool is_leaf (void); 59 private : counter_t val_tree (void); 60 private : counter_t val_leaf (void); 61 private : bool is_leaf (void); 62 63 public : void import (std::string expr, 64 std::map<std::string, counter_t*> * operand); 65 66 67 public : void print (uint32_t depth=0); 56 68 57 69 // public : friend std::ostream& operator<< (std::ostream&, const morpheo::Stat_binary_tree &);
Note: See TracChangeset
for help on using the changeset viewer.