當前位置: 首頁>>代碼示例>>C++>>正文


C++ DumpString函數代碼示例

本文整理匯總了C++中DumpString函數的典型用法代碼示例。如果您正苦於以下問題:C++ DumpString函數的具體用法?C++ DumpString怎麽用?C++ DumpString使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了DumpString函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。

示例1: 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;
  }
 }
 n=f->sizep;
 DumpInt(n,D);
 for (i=0; i<n; i++) DumpFunction(f->p[i],D);
}
開發者ID:alucard-dracula,項目名稱:yggdrasil,代碼行數:27,代碼來源:ldump.c

示例2: DumpLine

int          clsDump::DumpScope(clsScope * pScope, int onlyCalculateSize)
{
  int          iSize = 0;
  unsigned int iIndex;

  iSize += DumpLine("----- SCOPE BEG -----\n", onlyCalculateSize);
  iSize += DumpLine("\tUID %u\n", pScope->m_UID, onlyCalculateSize);
  iSize += DumpLocation(pScope->m_Location, onlyCalculateSize);
  _Assert(pScope->m_pParentScope && "Frontend Error: All scopes should have a parent.");
  iSize += DumpLine("\tParent Scope UID %u\n", pScope->m_pParentScope->m_UID, onlyCalculateSize);
  _Assert(pScope->m_pRootScope && "Frontend Error: All scopes should have a root.");
  iSize += DumpLine("\tRoot Scope UID %u\n", pScope->m_pRootScope->m_UID, onlyCalculateSize);
  iSize += DumpLine("\tNumber of Children Scopes %u\n", pScope->m_pChildrenScopes.size(), onlyCalculateSize);
  for (iIndex = 0; iIndex < pScope->m_pChildrenScopes.size(); ++iIndex)
  {
    iSize += DumpLine("\tChild Scope UID %u\n", pScope->m_pChildrenScopes[iIndex]->m_UID, onlyCalculateSize);
  }
  iSize += DumpLine("\tNumber of Signals %u\n", pScope->m_pSignals.size(), onlyCalculateSize);
  for (iIndex = 0; iIndex < pScope->m_pSignals.size(); ++iIndex)
  {
    iSize += DumpLine("\tSignal UID %u\n", pScope->m_pSignals[iIndex]->m_UID, onlyCalculateSize);
  }
  iSize += DumpLine("\tNumber of Arguments %u\n", pScope->m_pArguments.size(), onlyCalculateSize);
  for (iIndex = 0; iIndex < pScope->m_pArguments.size(); ++iIndex)
  {
    iSize += DumpLine("\tArgument UID %u\n", pScope->m_pArguments[iIndex]->m_UID, onlyCalculateSize);
  }
  iSize += DumpLine("\tNumber of Parameters %u\n", pScope->m_pParameters.size(), onlyCalculateSize);
  for (iIndex = 0; iIndex < pScope->m_pParameters.size(); ++iIndex)
  {
    iSize += DumpLine("\tParameter UID %u\n", pScope->m_pParameters[iIndex]->m_UID, onlyCalculateSize);
  }
  iSize += DumpLine("\tNumber of Conditions %u\n", pScope->m_pConditions.size(), onlyCalculateSize);
  for (iIndex = 0; iIndex < pScope->m_pConditions.size(); ++iIndex)
  {
    iSize += DumpLine("\tCondition UID %u\n", pScope->m_pConditions[iIndex]->m_UID, onlyCalculateSize);
  }
  iSize += DumpLine("\tNumber of Events %u\n", pScope->m_pEvents.size(), onlyCalculateSize);
  for (iIndex = 0; iIndex < pScope->m_pEvents.size(); ++iIndex)
  {
    iSize += DumpLine("\tEvent UID %u\n", pScope->m_pEvents[iIndex]->m_UID, onlyCalculateSize);
  }
  if (pScope->m_pBasicBlock)
  {
    iSize += DumpLine("\tHas Basicblock %u\n", true, onlyCalculateSize);
    iSize += DumpLine("\tBasicblock UID %u\n", pScope->m_pBasicBlock->m_UID, onlyCalculateSize);
  }
  else
  {
    iSize += DumpLine("\tHas No Basicblock %u\n", false, onlyCalculateSize);
  }
  iSize += DumpString("\tScope Name\n", pScope->m_sScopeName, onlyCalculateSize);
  iSize += DumpLine("\tScope Type UID %u\n", pScope->m_pScopeType->m_UID, onlyCalculateSize);
  iSize += DumpLine("\tScope is Root = %u\n", pScope->m_IsRoot, onlyCalculateSize);
  iSize += DumpLine("\tScope is Automatic = %u\n", pScope->m_IsAutomatic, onlyCalculateSize);
  iSize += DumpLine("----- SCOPE END -----\n", onlyCalculateSize);

  return iSize;
}
開發者ID:CModelGen,項目名稱:frontend,代碼行數:59,代碼來源:dump-scope.cpp

示例3: DumpDebug

static void DumpDebug (const Proto *f, DumpState *D) {
  int i, n;
  n = (D->strip) ? 0 : f->sizelineinfo;
  DumpInt(n, D);
  DumpVector(f->lineinfo, n, D);
  n = (D->strip) ? 0 : 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);
  }
  n = (D->strip) ? 0 : f->sizeupvalues;
  DumpInt(n, D);
  for (i = 0; i < n; i++)
    DumpString(f->upvalues[i].name, D);
}
開發者ID:ezEngine,項目名稱:ezEngine,代碼行數:17,代碼來源:ldump.c

示例4: DumpFunction

static void DumpFunction (const Proto *f, TString *psource, DumpState *D) {
  const SharedProto *sp = f->sp;
  if (D->strip || sp->source == psource)
    DumpString(NULL, D);  /* no debug info or same source as its parent */
  else
    DumpString(sp->source, D);
  DumpInt(sp->linedefined, D);
  DumpInt(sp->lastlinedefined, D);
  DumpByte(sp->numparams, D);
  DumpByte(sp->is_vararg, D);
  DumpByte(sp->maxstacksize, D);
  DumpCode(sp, D);
  DumpConstants(f, D);
  DumpUpvalues(f, D);
  DumpProtos(f, D);
  DumpDebug(sp, D);
}
開發者ID:deway,項目名稱:node-lua,代碼行數:17,代碼來源:ldump.c

示例5: DumpDebug

static void DumpDebug(const LuaProto* f, DumpState* D)
{
 int i,n;
 DumpString((D->strip) ? NULL : f->source,D);
 n= (D->strip) ? 0 : (int)f->lineinfo.size();
 DumpVector(f->lineinfo.begin(),n,sizeof(int),D);
 n= (D->strip) ? 0 : (int)f->locvars.size();
 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);
 }
 n= (D->strip) ? 0 : (int)f->upvalues.size();
 DumpInt(n,D);
 for (i=0; i<n; i++) DumpString(f->upvalues[i].name,D);
}
開發者ID:aappleby,項目名稱:Lumina,代碼行數:18,代碼來源:ldump.cpp

示例6: DumpOc

extern  void    DumpOc( ins_entry *ins ) {
/****************************************/

    DumpPtr( ins );
    DumpLiteral( " " );
    DumpString(  CNames[ _Class( ins ) ] );
    DumpLiteral( " " );
    if( _Class( ins ) != OC_INFO ) {
        CheckAttr( ins->oc.oc_header.class );
    }
開發者ID:Ukusbobra,項目名稱:open-watcom-v2,代碼行數:10,代碼來源:dumpopt.c

示例7: DumpOc

void    DumpOc( ins_entry *ins )
/******************************/
{
    DumpPtr( ins );
    DumpChar( ' ' );
    DumpString(  CNames[_Class( ins )] );
    DumpChar( ' ' );
    if( _Class( ins ) != OC_INFO ) {
        CheckAttr( ins->oc.oc_header.class );
    }
開發者ID:ArmstrongJ,項目名稱:open-watcom-v2,代碼行數:10,代碼來源:dumpopt.c

示例8: 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);
	}
}
開發者ID:jcubic,項目名稱:ToME,代碼行數:11,代碼來源:luac.c

示例9: 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);
 }
}
開發者ID:Falcon-peregrinus,項目名稱:angband-russian,代碼行數:11,代碼來源:ldump.c

示例10: DumpLine

int          clsDump::DumpLocation(clsLocation Location, int onlyCalculateSize)
{
  int iSize = 0;

  iSize += DumpLine("- - - LOCATION BEG - - -\n", onlyCalculateSize);
  iSize += DumpString("\tFile\n", Location.m_sFile, onlyCalculateSize);
  iSize += DumpLine("\tLine %u\n", Location.m_iLine, onlyCalculateSize);
  iSize += DumpLine("- - - LOCATION END - - -\n", onlyCalculateSize);

  return iSize;
}
開發者ID:CModelGen,項目名稱:frontend,代碼行數:11,代碼來源:dump-location.cpp

示例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);
}
開發者ID:jcubic,項目名稱:ToME,代碼行數:12,代碼來源:luac.c

示例12: 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);
}
開發者ID:jcubic,項目名稱:ToME,代碼行數:12,代碼來源:luac.c

示例13: DumpDebug

static void DumpDebug (const Proto *f, DumpState *D) {
  int i, n;
  n = (D->strip) ? 0 : f->sizelineinfo;
  DumpInt(n, D);
  DumpVector(f->lineinfo, n, D);
  /* n = (D->strip) ? 0 : f->sizelocvars; */
  n = f->sizelocvars;
  DumpInt(n, D);
  for (i = 0; i < n; i++) {
    DumpString((D->strip) ? NULL : f->locvars[i].varname, D);
    DumpInt(f->locvars[i].startpc, D);
    DumpInt(f->locvars[i].endpc, D);
    DumpByte(f->locvars[i].ravi_type, D);
  }
  /* n = (D->strip) ? 0 : f->sizeupvalues; */
  n = f->sizeupvalues;
  DumpInt(n, D);
  for (i = 0; i < n; i++) {
    DumpString((D->strip) ? NULL : f->upvalues[i].name, D);
    DumpByte(f->upvalues[i].type, D);
  }
}
開發者ID:duchuan123,項目名稱:ravi,代碼行數:22,代碼來源:ldump.c

示例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);
}
開發者ID:luiseduardohdbackup,項目名稱:lua4wince,代碼行數:13,代碼來源:ldump.c

示例15: AnalogDevicesSync

/**  Attempt to synchronize with an Analog Device ARM micro.  Sends a
backspace and reads back the microcontrollers response.  Performs
multiple retries. Exits the program on error, returns to caller in the
case of success.
*/
static void AnalogDevicesSync(ISP_ENVIRONMENT *IspEnvironment)
{
    BINARY sync;                        /* Holds sync command.          */
    AD_SYNC_RESPONSE response;          /* Response from micro.         */
    int sync_attempts;                  /* Number of retries.           */

    /*  Make sure we don't read garbage later instead of the        */
    /* response we expect from the micro.                           */
    ClearSerialPortBuffers(IspEnvironment);

    DebugPrintf(2, "Synchronizing\n"); /* Progress report.             */

    sync = ANALOG_DEVICES_SYNC_CHAR;    /* Build up sync command.       */

    /*  Perform the actual sync attempt.  First send the sync       */
    /* character, the attempt to read back the response.  For the   */
    /* AD ARM micro this is a fixed length block.  If response is   */
    /* received attempt to validate it by comparing the first       */
    /* characters to those expected.  If the received block does    */
    /* not validate or is incomplete empty the serial buffer and    */
    /* retry.                                                       */
    for (sync_attempts = 0; sync_attempts < 5; sync_attempts++)
    {
        SendComPortBlock(IspEnvironment, &sync, 1);

        if (ReceiveComPortBlockComplete(IspEnvironment, &response, sizeof(response),
            500) == 0)
        {

            if (memcmp(response.product_id, ANALOG_DEVICES_SYNC_RESPONSE,
                ANALOG_DEVICES_SYNC_SIZE) == 0)
            {
                return;
            }
            else
            {
                DumpString(3, &response, sizeof(response),
                    "Unexpected response to sync attempt ");
            }
        }
        else
        {
            DebugPrintf(3, "No (or incomplete) answer on sync attempt\n");
        }

        ClearSerialPortBuffers(IspEnvironment);
    }

    DebugPrintf(1, "No (or unacceptable) answer on sync attempt\n");
    exit(4);
}
開發者ID:Vanganesha,項目名稱:oufffteam,代碼行數:56,代碼來源:adprog.c


注:本文中的DumpString函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。