absyntax_utils/get_datatype_info.cc
changeset 939 5074236fb3c4
parent 938 31e3b3f2eff1
child 945 477393b00f95
--- a/absyntax_utils/get_datatype_info.cc	Sun Oct 19 21:30:58 2014 +0100
+++ b/absyntax_utils/get_datatype_info.cc	Sat Oct 25 11:15:55 2014 +0100
@@ -417,6 +417,17 @@
   return get_struct_info_c::get_field_type_id(struct_datatype, struct_fieldname);
 }
 
+symbol_c *get_datatype_info_c::get_array_storedtype_id(symbol_c *type_symbol) {
+  // returns the datatype of the variables stored in the array
+  symbol_c *basetype = search_base_type_c::get_basetype_decl(type_symbol);
+  array_specification_c *symbol = dynamic_cast<array_specification_c *>(basetype);
+
+  if (NULL != symbol) 
+    return symbol->non_generic_type_name;
+  return NULL; // this is not an array!
+}
+  
+  
 /* Returns true if both datatypes are equivalent (not necessarily equal!).
  * WARNING: May return true even though the datatypes are not the same/identicial!!!
  *          This occurs when at least one of the datatypes is of a generic