本文整理汇总了C++中Dsymbol::cvMember方法的典型用法代码示例。如果您正苦于以下问题:C++ Dsymbol::cvMember方法的具体用法?C++ Dsymbol::cvMember怎么用?C++ Dsymbol::cvMember使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Dsymbol
的用法示例。
在下文中一共展示了Dsymbol::cvMember方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: cvMember
int AttribDeclaration::cvMember(unsigned char *p)
{
int nwritten = 0;
int n;
Array *d = include(NULL, NULL);
if (d)
{
for (unsigned i = 0; i < d->dim; i++)
{ Dsymbol *s = (Dsymbol *)d->data[i];
n = s->cvMember(p);
if (p)
p += n;
nwritten += n;
}
}
return nwritten;
}
示例2: cvMember
int AttribDeclaration::cvMember(unsigned char *p)
{
int nwritten = 0;
int n;
Dsymbols *d = include(NULL, NULL);
if (d)
{
for (size_t i = 0; i < d->dim; i++)
{ Dsymbol *s = (*d)[i];
n = s->cvMember(p);
if (p)
p += n;
nwritten += n;
}
}
return nwritten;
}
示例3: toDebug
//.........这里部分代码省略.........
TOWORD(d->data,leaf);
// Assign a number to prevent infinite recursion if a struct member
// references the same struct.
d->length = 0; // so cv_debtyp() will allocate new
typidx = cv_debtyp(d);
d->length = len; // restore length
if (!members) // if reference only
{
TOWORD(d->data + 2,0); // count: number of fields is 0
TOWORD(d->data + 4,0); // field list is 0
TOWORD(d->data + 6,property);
return /*typidx*/;
}
// Compute the number of fields, and the length of the fieldlist record
nfields = 0;
fnamelen = 2;
// Add in base classes
for (i = 0; i < baseclasses.dim; i++)
{ BaseClass *bc = (BaseClass *)baseclasses.data[i];
nfields++;
fnamelen += 6 + cv4_numericbytes(bc->offset);
}
count = nfields;
for (i = 0; i < members->dim; i++)
{ Dsymbol *s = (Dsymbol *)members->data[i];
int nwritten;
nwritten = s->cvMember(NULL);
if (nwritten)
{
fnamelen += nwritten;
nfields++;
count++;
}
}
TOWORD(d->data + 2,count);
TOWORD(d->data + 6,property);
// Generate fieldlist type record
dt = debtyp_alloc(fnamelen);
p = dt->data;
// And fill it in
TOWORD(p,LF_FIELDLIST);
p += 2;
// Add in base classes
for (i = 0; i < baseclasses.dim; i++)
{ BaseClass *bc = (BaseClass *)baseclasses.data[i];
idx_t typidx;
unsigned attribute;
typidx = cv4_typidx(bc->base->type->toCtype()->Tnext);
attribute = PROTtoATTR(bc->protection);
TOWORD(p,LF_BCLASS);
TOWORD(p + 2,typidx);
TOWORD(p + 4,attribute);