absyntax_utils/search_varfb_instance_type.hh
changeset 321 a96399ab57c2
parent 279 c0453b7f99df
child 371 926490780952
--- a/absyntax_utils/search_varfb_instance_type.hh	Fri Jun 10 08:47:38 2011 +0100
+++ b/absyntax_utils/search_varfb_instance_type.hh	Tue Jun 14 14:53:37 2011 +0100
@@ -39,13 +39,6 @@
  * A mixture of array element of a structure element of a structure element
  * of a .... is also suported!
  *
- * A reference to the relevant base type __definition__ is returned.
- * This means that if we find that the variable is of type MY_INT,
- * which was previously declared to be
- * TYPE MY_INT: INT := 9;
- * this class wil return INT, and __not__ MY_INT !!
- *
- *
  *  example:
  *    window.points[1].coordinate.x
  *    window.points[1].colour
@@ -53,7 +46,44 @@
  *
  * This class must be passed the scope within which the
  * variable was declared, and the variable name...
- */
+ *
+ *
+ *
+ *
+ *
+ * This class has several members, depending on the exact data the caller
+ * is looking for...
+ *
+ *    - item i: we can get either the name of the data type(A),
+ *              or it's declaration (B)
+ *             (notice however that some variables belong to a data type that does
+ *              not have a name, only a declaration as in
+ *              VAR a: ARRAY [1..3] of INT; END_VAR
+ *             )
+ *    - item ii: we can get either the direct data type (1), 
+ *               or the base type (2)
+ * 
+ *   By direct type, I mean the data type of the variable. By base type, I 
+ * mean the data type on which the direct type is based on. For example, in 
+ * a subrange on INT, the direct type is the subrange itself, while the 
+ * base type is INT.
+ * e.g.
+ *   This means that if we find that the variable is of type MY_INT,
+ *   which was previously declared to be
+ *   TYPE MY_INT: INT := 9;
+ *   option (1) will return MY_INT
+ *   option (2) will return INT
+ * 
+ *
+ * Member functions:
+ * ================
+ *   get_basetype_decl()  ---> returns 2B 
+ *   get_type_id()        ---> returns 1A
+ * 
+ *   Since we haven't yet needed them, we don't yet implement
+ *   get_basetype_id()    ----> would return 2A
+ *   get_type_decl()      ----> would return 1B
+ */ 
 
 class search_varfb_instance_type_c: public search_base_type_c {
 
@@ -66,8 +96,8 @@
 
   public:
     search_varfb_instance_type_c(symbol_c *search_scope);
-    symbol_c *get_type(symbol_c *variable_name);
-    symbol_c *get_rawtype(symbol_c *variable_name);
+    symbol_c *get_basetype_decl(symbol_c *variable_name);
+    symbol_c *get_type_id(symbol_c *variable_name);
 
     unsigned int get_vartype(symbol_c *variable_name);
     bool type_is_complex(void);