本文整理汇总了C++中SymbolList::length方法的典型用法代码示例。如果您正苦于以下问题:C++ SymbolList::length方法的具体用法?C++ SymbolList::length怎么用?C++ SymbolList::length使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SymbolList
的用法示例。
在下文中一共展示了SymbolList::length方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: append_debug_tables
//.........这里部分代码省略.........
sym.addr = str.parse();
sym.tagid = str.parse();
str.skipspaces();
str.expect(':');
char *name = str.skipspaces();
char *nameend = str.skipto(' ');
Atom *atom = pool.add(name, nameend - name);
sym.codestart = str.parse();
sym.codeend = str.parse();
sym.ident = (char)str.parse();
sym.vclass = (char)str.parse();
sym.dimcount = 0;
sym.name = dbgnames->add(atom);
info->header().num_syms++;
str.skipspaces();
if (str.getc() == '[') {
info->header().num_arrays++;
for (char *ptr = str.skipspaces(); *ptr != ']'; ptr = str.skipspaces()) {
dims[sym.dimcount].tagid = str.parse();
str.skipspaces();
str.expect(':');
dims[sym.dimcount].size = str.parse();
sym.dimcount++;
}
}
symbols->add(&sym, sizeof(sym));
symbols->add(dims, sizeof(dims[0]) * sym.dimcount);
break;
}
}
}
// Add the last file.
if (prev_file_name) {
sp_fdbg_file_t &entry = files->add();
entry.addr = prev_file_addr;
entry.name = dbgnames->add(pool, prev_file_name);
}
// Build the tags table.
for (constvalue *constptr = tagname_tab.next; constptr; constptr = constptr->next) {
assert(strlen(constptr->name)>0);
sp_file_tag_t &tag = tags->add();
tag.tag_id = constptr->value;
tag.name = names->add(pool, constptr->name);
}
// Finish up debug header statistics.
info->header().num_files = files->count();
info->header().num_lines = lines->count();
// Write natives.
sp_fdbg_ntvtab_t natives_header;
natives_header.num_entries = nativeList.length();
natives->add(&natives_header, sizeof(natives_header));
for (size_t i = 0; i < nativeList.length(); i++) {
symbol *sym = nativeList[i];
sp_fdbg_native_t info;
info.index = i;
info.name = dbgnames->add(pool, sym->name);
info.tagid = sym->tag;
info.nargs = 0;
for (arginfo *arg = sym->dim.arglist; arg->ident; arg++)
info.nargs++;
natives->add(&info, sizeof(info));
for (arginfo *arg = sym->dim.arglist; arg->ident; arg++) {
sp_fdbg_ntvarg_t argout;
argout.ident = arg->ident;
argout.tagid = arg->tag;
argout.dimcount = arg->numdim;
argout.name = dbgnames->add(pool, arg->name);
natives->add(&argout, sizeof(argout));
for (int j = 0; j < argout.dimcount; j++) {
sp_fdbg_arraydim_t dim;
dim.tagid = arg->idxtag[j];
dim.size = arg->dim[j];
natives->add(&dim, sizeof(dim));
}
}
}
// Add these in the same order SourceMod 1.6 added them.
builder->add(files);
builder->add(symbols);
builder->add(lines);
builder->add(natives);
builder->add(dbgnames);
builder->add(info);
builder->add(tags);
}