Ignore:
Timestamp:
Dec 10, 2008, 7:31:39 PM (16 years ago)
Author:
rosiere
Message:

Almost complete design
with Test and test platform

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Stat_binary_tree.h

    r81 r88  
    1414namespace behavioural {
    1515
    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;
    1717
    1818  typedef union
     
    2626  {
    2727    // arbre binaire
    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;
     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;
    3333   
    3434    /*     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 );
    4040   
    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 );
    4547
    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);
    4854
    49     public  : bool      valid    (void);
     55  public  : bool               valid    (void);
    5056
    51     public  : counter_t eval     (void);
     57  public  : counter_t          eval     (void);
    5258
    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);
    5668
    5769//     public  : friend std::ostream& operator<< (std::ostream&, const morpheo::Stat_binary_tree &);
Note: See TracChangeset for help on using the changeset viewer.