absyntax_utils/case_element_iterator.cc
changeset 377 60b012b7793f
parent 347 44ff2a6fcadc
child 596 4efb11e44065
equal deleted inserted replaced
376:7dcbd8418771 377:60b012b7793f
    91 void case_element_iterator_c::reset(void) {
    91 void case_element_iterator_c::reset(void) {
    92   current_case_element = NULL;
    92   current_case_element = NULL;
    93 }
    93 }
    94 
    94 
    95 
    95 
    96 /* initialise the iterator object.
    96 /* initialize the iterator object.
    97  * We must be given a reference to a case_list_c that will be analysed...
    97  * We must be given a reference to a case_list_c that will be analyzed...
    98  */
    98  */
    99 case_element_iterator_c::case_element_iterator_c(symbol_c *list, case_element_t element_type) {
    99 case_element_iterator_c::case_element_iterator_c(symbol_c *list, case_element_t element_type) {
   100   /* do some consistency check... */
   100   /* do some consistency check... */
   101   case_list_c* case_list = dynamic_cast<case_list_c*>(list);
   101   case_list_c* case_list = dynamic_cast<case_list_c*>(list);
   102 
   102 
   103   if (NULL == case_list) ERROR;
   103   if (NULL == case_list) ERROR;
   104 
   104 
   105   /* OK. Now initialise this object... */
   105   /* OK. Now initialize this object... */
   106   this->case_list = list;
   106   this->case_list = list;
   107   this->wanted_element_type = element_type;
   107   this->wanted_element_type = element_type;
   108   reset();
   108   reset();
   109 }
   109 }
   110 
   110