model_server/project_pdf/src/scopeMaster.h.cxx
//returns size of array. C++ cnames ONLY
returns size of array. C++ cnames ONLY
returns size of array . C ++ cnames ONLY
static int lookup_cname (scopeRoot *sroot, char const *cname, symbolArr& result)
{
    Initialize(lookup_cname);
    if (!sroot || !cname || !cname[0])
	return 0;
    int len = strlen(cname);
    symbolScope sym_scope;
    objArr domain;
    domain.insert_last(sroot);
    sym_scope.set_domain (domain);
    ddSelector ddsel;
    ddsel.add(DD_FUNC_DECL);
    symbolArr sarr;
    sym_scope.query(sarr,ddsel);
    int sz = sarr.size();
    for (int ii = 0 ; ii < sz ; ii++ ) {
	symbolPtr& cur = sarr[ii];
	char const *cur_cname = cur.get_name();
	int cur_len = strlen(cur_cname);
	if (cur_len <= len || cur_cname[len] != '(')
	    continue;
	if (strncmp(cname,cur_cname,len) == 0)
	    result.insert_last(cur);
    }
    int ret = result.size();
    return ret;
}
static int lookup_cname ( scopeRoot * sroot , char const * cname , symbolArr & result ) { Initialize ( lookup_cname ) ; if ( ! sroot || ! cname || ! cname [ 0 ] ) return 0 ; int len = strlen ( cname ) ; symbolScope sym_scope ; objArr domain ; domain . insert_last ( sroot ) ; sym_scope . set_domain ( domain ) ; ddSelector ddsel ; ddsel . add ( DD_FUNC_DECL ) ; symbolArr sarr ; sym_scope . query ( sarr , ddsel ) ; int sz = sarr . size ( ) ; for ( int ii = 0 ; ii < sz ; ii ++ ) { symbolPtr & cur = sarr [ ii ] ; char const * cur_cname = cur . get_name ( ) ; int cur_len = strlen ( cur_cname ) ; if ( cur_len <= len || cur_cname [ len ] != ' ' ) continue ; if ( strncmp ( cname , cur_cname , len ) == 0 ) result . insert_last ( cur ) ; } int ret = result . size ( ) ; return ret ; }
returns size of array.
returns size of array .