本文整理匯總了C++中DumpInt函數的典型用法代碼示例。如果您正苦於以下問題:C++ DumpInt函數的具體用法?C++ DumpInt怎麽用?C++ DumpInt使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了DumpInt函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。
示例1: DumpConstants
static void DumpConstants(const Proto* f, DumpState* D)
{
int i,n;
DumpInt(n=f->sizek,D);
for (i=0; i<n; i++)
{
const TObject* o=&f->k[i];
DumpByte(ttype(o),D);
switch (ttype(o))
{
case LUA_TNUMBER:
DumpNumber(nvalue(o),D);
break;
case LUA_TSTRING:
DumpString(tsvalue(o),D);
break;
case LUA_TNIL:
break;
default:
lua_assert(0); /* cannot happen */
break;
}
}
DumpInt(n=f->sizep,D);
for (i=0; i<n; i++) DumpFunction(f->p[i],f->source,D);
}
示例2: gf_ipmpx_dump_KeyData
GF_Err gf_ipmpx_dump_KeyData(GF_IPMPX_Data *_p, FILE *trace, u32 indent, Bool XMTDump)
{
GF_IPMPX_KeyData*p = (GF_IPMPX_KeyData*)_p;
StartElement(trace, "IPMP_KeyData", indent, XMTDump);
indent++;
DumpBool(trace, "hasStartDTS", (p->flags & 1) ? 1 : 0, indent, XMTDump);
DumpBool(trace, "hasStartPacketID", (p->flags & 2) ? 1 : 0, indent, XMTDump);
DumpBool(trace, "hasEndDTS", (p->flags & 4) ? 1 : 0, indent, XMTDump);
DumpBool(trace, "hasEndPacketID", (p->flags & 8) ? 1 : 0, indent, XMTDump);
if (p->flags & 1) DumpLargeInt(trace, "startDTS", p->startDTS, indent, XMTDump);
if (p->flags & 2) DumpInt(trace, "startPacketID", p->startPacketID, indent, XMTDump);
if (p->flags & 4) DumpLargeInt(trace, "expireDTS", p->expireDTS, indent, XMTDump);
if (p->flags & 8) DumpInt(trace, "expirePacketID", p->expirePacketID, indent, XMTDump);
EndAttributes(trace, XMTDump, GF_TRUE);
gf_ipmpx_dump_BaseData(_p, trace, indent, XMTDump);
gf_ipmpx_dump_ByteArray(p->keyBody, "keyBody", trace, indent, XMTDump);
gf_ipmpx_dump_ByteArray(p->OpaqueData, "OpaqueData", trace, indent, XMTDump);
indent--;
EndElement(trace, "IPMP_KeyData", indent, XMTDump);
return GF_OK;
}
示例3: DumpConstants
static void DumpConstants(const Proto* f, DumpState* D)
{
int i,n=f->sizek;
DumpInt(n,D);
for (i=0; i<n; i++)
{
const TValue* o=&f->k[i];
DumpChar(ttype(o),D);
switch (ttype(o))
{
case LUA_TNIL:
break;
case LUA_TBOOLEAN:
DumpChar(bvalue(o),D);
break;
case LUA_TNUMBER:
DumpNumber(nvalue(o),D);
break;
case LUA_TSTRING:
DumpString(rawtsvalue(o),D);
break;
default:
lua_assert(0); /* cannot happen */
break;
}
}
n=f->sizep;
DumpInt(n,D);
for (i=0; i<n; i++) DumpFunction(f->p[i],f->source,D);
}
示例4: DumpCSymbols
static void DumpCSymbols(DumpState *D)
{
int i, cs_nr;
cp_csymbol_state *cs_state;
csymbol *cs, *cs_arr;
cs_state = ctype_get_csym_state();
cs_arr = cs_state->cs_arr;
cs_nr = cs_state->cs_nr;
if (!cs_arr || cs_nr == 0) {
DumpInt(0, D);
return;
}
/* dump number of csymbols */
DumpInt(cs_nr, D);
/* dump size of csymbol, for safty check in vm */
DumpInt(sizeof(csymbol), D);
for (i = 0; i < cs_nr; i++) {
cs = &cs_arr[i];
switch (cs->type) {
case FFI_FUNC:
DumpCSymbolFunc(cs, D);
break;
case FFI_STRUCT:
DumpCSymbolStruct(cs, D);
break;
default:
DumpBlock(cs, sizeof(csymbol), D);
break;
}
}
}
示例5: DumpConstants
static void DumpConstants(const ktap_proto *f, DumpState *D)
{
int i, n = f->sizek;
DumpInt(n, D);
for (i = 0; i < n; i++) {
const ktap_value* o=&f->k[i];
DumpChar(ttypenv(o), D);
switch (ttypenv(o)) {
case KTAP_TNIL:
break;
case KTAP_TBOOLEAN:
DumpChar(bvalue(o), D);
break;
case KTAP_TNUMBER:
DumpNumber(nvalue(o), D);
break;
case KTAP_TSTRING:
DumpString(rawtsvalue(o), D);
break;
default:
printf("ktap: DumpConstants with unknown vaule type %d\n", ttypenv(o));
ktap_assert(0);
}
}
n = f->sizep;
DumpInt(n, D);
for (i = 0; i < n; i++)
DumpFunction(f->p[i], D);
}
示例6: gf_ipmpx_dump_ParametricDescription
GF_Err gf_ipmpx_dump_ParametricDescription(GF_IPMPX_Data *_p, FILE *trace, u32 indent, Bool XMTDump)
{
u32 i;
GF_IPMPX_ParametricDescription*p = (GF_IPMPX_ParametricDescription*)_p;
StartElement(trace, "IPMP_ParametricDescription", indent, XMTDump);
indent++;
DumpInt(trace, "majorVersion", p->majorVersion, indent, XMTDump);
DumpInt(trace, "minorVersion", p->minorVersion, indent, XMTDump);
EndAttributes(trace, XMTDump, GF_TRUE);
gf_ipmpx_dump_BaseData(_p, trace, indent, XMTDump);
gf_ipmpx_dump_ByteArray(p->descriptionComment, "descriptionComment", trace, indent, XMTDump);
StartList(trace, "descriptions", indent, XMTDump);
indent++;
for (i=0; i<gf_list_count(p->descriptions); i++) {
GF_IPMPX_ParametricDescriptionItem *it = (GF_IPMPX_ParametricDescriptionItem *)gf_list_get(p->descriptions, i);
StartElement(trace, "IPMP_ParametricDescriptionItem", indent, XMTDump);
indent++;
EndAttributes(trace, XMTDump, GF_TRUE);
gf_ipmpx_dump_ByteArray(it->main_class, "class", trace, indent, XMTDump);
gf_ipmpx_dump_ByteArray(it->subClass, "subClass", trace, indent, XMTDump);
gf_ipmpx_dump_ByteArray(it->typeData, "typeData", trace, indent, XMTDump);
gf_ipmpx_dump_ByteArray(it->type, "type", trace, indent, XMTDump);
gf_ipmpx_dump_ByteArray(it->addedData, "addedData", trace, indent, XMTDump);
indent--;
EndElement(trace, "IPMP_ParametricDescriptionItem", indent, XMTDump);
}
indent--;
EndList(trace, "descriptions", indent, XMTDump);
indent--;
EndElement(trace, "IPMP_ParametricDescription", indent, XMTDump);
return GF_OK;
}
示例7: DumpConstants
static void DumpConstants(const killa_Proto* f, DumpState* D)
{
int i,n=f->sizek;
DumpInt(n,D);
for (i=0; i<n; i++)
{
const killa_TValue* o=&f->k[i];
DumpChar(killa_ttype(o),D);
switch (killa_ttype(o))
{
case KILLA_TNULL:
break;
case KILLA_TBOOLEAN:
DumpChar(killa_bvalue(o),D);
break;
case KILLA_TNUMBER:
DumpNumber(killa_nvalue(o),D);
break;
case KILLA_TSTRING:
DumpString(killa_rawtsvalue(o),D);
break;
}
}
n=f->sizep;
DumpInt(n,D);
for (i=0; i<n; i++) DumpFunction(f->p[i],D);
}
示例8: DumpLocals
static void DumpLocals(const Proto* f, DumpState* D)
{
int i,n=f->sizelocvars;
DumpInt(n,D);
for (i=0; i<n; i++)
{
DumpString(f->locvars[i].varname,D);
DumpInt(f->locvars[i].startpc,D);
DumpInt(f->locvars[i].endpc,D);
}
}
示例9: DumpLocals
static void DumpLocals(const Proto* tf, void* D)
{
int i,n=tf->nlocvars;
DumpInt(n,D);
for (i=0; i<n; i++)
{
DumpString(tf->locvars[i].varname,D);
DumpInt(tf->locvars[i].startpc,D);
DumpInt(tf->locvars[i].endpc,D);
}
}
示例10: DumpConstants
static void DumpConstants(const Proto* tf, void* D)
{
int i,n;
DumpInt(n=tf->nkstr,D);
for (i=0; i<n; i++)
DumpString(tf->kstr[i],D);
DumpInt(tf->nknum,D);
DumpVector(tf->knum,tf->nknum,sizeof(*tf->knum),D);
DumpInt(n=tf->nkproto,D);
for (i=0; i<n; i++)
DumpFunction(tf->kproto[i],D);
}
示例11: DumpFunction
static void DumpFunction(const Proto* tf, void* D)
{
DumpString(tf->source,D);
DumpInt(tf->lineDefined,D);
DumpInt(tf->numparams,D);
DumpByte(tf->is_vararg,D);
DumpInt(tf->maxstacksize,D);
DumpLocals(tf,D);
DumpLines(tf,D);
DumpConstants(tf,D);
DumpCode(tf,D);
}
示例12: DumpFunction
static void DumpFunction(const ktap_proto *f, DumpState *D)
{
DumpInt(f->linedefined, D);
DumpInt(f->lastlinedefined, D);
DumpChar(f->numparams, D);
DumpChar(f->is_vararg, D);
DumpChar(f->maxstacksize, D);
DumpCode(f, D);
DumpConstants(f, D);
DumpUpvalues(f, D);
DumpDebug(f, D);
}
示例13: DumpInsRange
static void DumpInsRange( conflict_node *conf ) {
/***************************************************/
if( conf->ins_range.first != NULL ) {
DumpLiteral( " Instruction " );
DumpInt( conf->ins_range.first->id );
if( conf->ins_range.first != conf->ins_range.last
&& conf->ins_range.last != NULL ) {
DumpLiteral( " to Instruction " );
DumpInt( conf->ins_range.last->id );
}
}
}
示例14: DumpFunction
static void DumpFunction(const Proto* f, const TString* p, DumpState* D)
{
DumpString((f->source==p || D->strip) ? NULL : f->source,D);
DumpInt(f->linedefined,D);
DumpInt(f->lastlinedefined,D);
DumpChar(f->nups,D);
DumpChar(f->numparams,D);
DumpChar(f->is_vararg,D);
DumpChar(f->maxstacksize,D);
DumpCode(f,D);
DumpConstants(f,D);
DumpDebug(f,D);
}
示例15: gf_ipmpx_dump_GetToolContext
GF_Err gf_ipmpx_dump_GetToolContext(GF_IPMPX_Data *_p, FILE *trace, u32 indent, Bool XMTDump)
{
GF_IPMPX_GetToolContext*p = (GF_IPMPX_GetToolContext*)_p;
StartElement(trace, "IPMP_GetToolContext", indent, XMTDump);
indent++;
DumpInt(trace, "scope", p->scope, indent, XMTDump);
DumpInt(trace, "IPMP_DescriptorIDEx", p->IPMP_DescriptorIDEx, indent, XMTDump);
EndAttributes(trace, XMTDump, GF_TRUE);
gf_ipmpx_dump_BaseData(_p, trace, indent, XMTDump);
indent--;
EndElement(trace, "IPMP_GetToolContext", indent, XMTDump);
return GF_OK;
}