--- a/absyntax_utils/function_call_param_iterator.hh Sat Feb 18 21:03:01 2012 +0000
+++ b/absyntax_utils/function_call_param_iterator.hh Sun Feb 19 16:16:45 2012 +0000
@@ -51,6 +51,58 @@
class function_call_param_iterator_c : public null_visitor_c {
private:
+ void *search_list(list_c *list);
+ void *handle_parameter_assignment(symbol_c *variable_name, symbol_c *expression) ;
+
+
+ public:
+ /* start off at the first parameter once again... */
+ void reset(void);
+
+ /* initialise the iterator object.
+ * We must be given a reference to the function/program/function block call
+ * that will be analysed...
+ */
+ function_call_param_iterator_c(symbol_c *f_call);
+
+ /* Skip to the next formal parameter. After object creation,
+ * the object references on parameter _before_ the first, so
+ * this function must be called once to get the object to
+ * reference the first parameter...
+ *
+ * Returns the paramater name to which a value is being passed!
+ * You can determine the value being passed by calling
+ * function_call_param_iterator_c::search_f()
+ */
+ symbol_c *next_f(void);
+
+ /* Skip to the next non-formal parameter. After object creation,
+ * the object references on parameter _before_ the first, so
+ * this function must be called once to get the object to
+ * reference the first parameter...
+ *
+ * Returns whatever is being passed to the parameter!
+ */
+ symbol_c *next_nf(void);
+
+ /* Search for the value passed to the parameter named <param_name>... */
+ symbol_c *search_f(symbol_c *param_name);
+ symbol_c *search_f(const char *param_name);
+
+ /* Returns the value being passed to the current parameter. */
+ symbol_c *get_current_value(void);
+
+ /* A type to specify how the current parameter was assigned.
+ * param_name := var -> assign_in
+ * param_name => var -> assign_out
+ * -> assign_none (used when handling non formal calls, when no assignment type is used)
+ */
+ typedef enum {assign_in, assign_out, assign_none} assign_direction_t ;
+ /* Returns the assignment direction of the current parameter. */
+ assign_direction_t get_assign_direction(void);
+
+
+ private:
/* a pointer to the function call
* (or function block or program call!)
*/
@@ -58,6 +110,7 @@
int iterate_f_next_param, iterate_nf_next_param, param_count;
identifier_c *search_param_name;
symbol_c *current_value;
+ assign_direction_t current_assign_direction;
/* Which operation of the class was called:
* - iterate to the next non-formal parameter.
@@ -67,49 +120,7 @@
typedef enum {iterate_nf_op, iterate_f_op, search_f_op} operation_t;
operation_t current_operation;
- private:
- void *search_list(list_c *list);
- void *handle_parameter_assignment(symbol_c *variable_name, symbol_c *expression) ;
-
-
- public:
- /* start off at the first parameter once again... */
- void reset(void);
-
- /* initialise the iterator object.
- * We must be given a reference to the function/program/function block call
- * that will be analysed...
- */
- function_call_param_iterator_c(symbol_c *f_call);
-
- /* Skip to the next formal parameter. After object creation,
- * the object references on parameter _before_ the first, so
- * this function must be called once to get the object to
- * reference the first parameter...
- *
- * Returns the paramater name to which a value is being passed!
- * You can determine the value being passed by calling
- * function_call_param_iterator_c::search_f()
- */
- symbol_c *next_f(void);
-
- /* Skip to the next non-formal parameter. After object creation,
- * the object references on parameter _before_ the first, so
- * this function must be called once to get the object to
- * reference the first parameter...
- *
- * Returns whatever is being passed to the parameter!
- */
- symbol_c *next_nf(void);
-
- /* Search for the value passed to the parameter named <param_name>... */
- symbol_c *search_f(symbol_c *param_name);
- symbol_c *search_f(const char *param_name);
-
- /* Returns the value being passed to the current parameter. */
- symbol_c *get_current_value(void);
-
-
+
private:
/********************************/
/* B 1.7 Configuration elements */