/* $Id: shared_lists.cpp,v 1.11 2002/03/21 15:44:00 dirkl Exp $ $Log: shared_lists.cpp,v $ Revision 1.11 2002/03/21 15:44:00 dirkl - additional Information about the PVS-files (Output from 'cvs status file') - started support for multiple connect-outside functions Revision 1.10 2002/02/25 23:34:14 dirkl - connections of bus_protocol get now connected to the top-level module(very uggly implementation) Revision 1.9 2001/11/28 15:33:18 dirkl - added error message for function with same name except for case; Xilinx Foundation can't handle such Functions Revision 1.8 2001/01/18 16:04:48 sbeyer added copy constructors Revision 1.7 2001/01/12 16:24:48 sbeyer C++-files now use 'class string' instead of 'char *'-stuff Revision 1.6 2001/01/12 09:27:31 sbeyer added support for overload detection in parameters/actuals (parameter/actuals names for any function/type must be unique) made compse_path recursive (now supports all relative paths) Revision 1.5 2001/01/11 16:22:27 sbeyer added error macros to header and cosmetic changes in implementation Revision 1.4 2001/01/11 11:43:32 sbeyer added debug output (operator <<) to the different structs Revision 1.3 2001/01/09 16:27:32 sbeyer *** empty log message *** */ #include "shared_lists.h" #include "tools.h" list defined_types; list defined_functions; list root_functions; list connect_outsides; actuals_array::actuals_array(const actuals_array &act) { num=act.num; for (int i=0;i::const_iterator i=defined_types.begin(); while (i!=defined_types.end()) { if (i->name==name) { ret = *i; return true; } i++; } return false; }; bool is_function_defined(const string &name, defined_function &ret) { list::const_iterator i=defined_functions.begin(); while (i!=defined_functions.end()) { if (i->name==name) { ret = *i; return true; } i++; } return false; }; int cmp_nocase(const string& s, const string& s2) { string::const_iterator p=s.begin(); string::const_iterator p2=s2.begin(); while (p!=s.end() && p2!=s2.end()) { if (toupper(*p)!=toupper(*p2)) return (toupper(*p)::const_iterator i=connect_outsides.begin(); while (i!=connect_outsides.end()) { list::const_iterator j=i->feedthrough_functions.begin(); while (j!=i->feedthrough_functions.end()) { if (cmp_nocase(*j,name)==0) { gefunden=true; ret+=i->parameterstring; } j++; } i++; } if (gefunden) { parameter=ret; return true; } else { return false; } } bool is_function_defined_caseinsensitive(const string &name, defined_function &ret) { list::const_iterator i=defined_functions.begin(); while (i!=defined_functions.end()) { if (cmp_nocase(i->name,name)==0) { ret = *i; return true; } i++; } return false; };