• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ LOG_FUNC_ENTRY函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中LOG_FUNC_ENTRY函数的典型用法代码示例。如果您正苦于以下问题:C++ LOG_FUNC_ENTRY函数的具体用法?C++ LOG_FUNC_ENTRY怎么用?C++ LOG_FUNC_ENTRY使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了LOG_FUNC_ENTRY函数的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: do_parens

void do_parens(void)
{
   LOG_FUNC_ENTRY();

   if (cpd.settings[UO_mod_full_paren_if_bool].b)
   {
      chunk_t *pc = chunk_get_head();
      while ((pc = chunk_get_next_ncnl(pc)) != nullptr)
      {
         if (  pc->type != CT_SPAREN_OPEN
            || (  pc->parent_type != CT_IF
               && pc->parent_type != CT_ELSEIF
               && pc->parent_type != CT_SWITCH))
         {
            continue;
         }

         // Grab the close sparen
         chunk_t *pclose = chunk_get_next_type(pc, CT_SPAREN_CLOSE, pc->level, scope_e::PREPROC);
         if (pclose != nullptr)
         {
            check_bool_parens(pc, pclose, 0);
            pc = pclose;
         }
      }
   }
}
开发者ID:Unity-Technologies,项目名称:uncrustify,代码行数:27,代码来源:parens.cpp


示例2: LOG_FUNC_ENTRY

// -----------------------------------------------------------------------------
// CATBase::IsBinaryLogFile
// -----------------------------------------------------------------------------
bool CATBase::IsBinaryLogFile( string sFile )
{
	LOG_FUNC_ENTRY("CATBase::IsDataFile");
	// Check that sFile not empty
	if ( sFile.empty() || sFile.length() < 1 )
		return false;

	// Temporary line char array.
	char cLineFromFile[MAX_LINE_LENGTH];
	//Open file
	ifstream in( sFile.c_str() );

	//File open ok?
	if( !in.good() )
		return false;

	//Read all lines
	in.getline( cLineFromFile, MAX_LINE_LENGTH );

	string sLineFromFile( cLineFromFile );
	in.close();

	if( sLineFromFile.find( "ATOOL_BINARY_FILE_VERSION" ) != string::npos )
		return true;
	else
		return false;
}
开发者ID:RomanSaveljev,项目名称:osrndtools,代码行数:30,代码来源:CATBase.cpp


示例3: do_parens

void do_parens(void)
{
    LOG_FUNC_ENTRY();
    chunk_t *pc;
    chunk_t *pclose;

    if (cpd.settings[UO_mod_full_paren_if_bool].b)
    {
        pc = chunk_get_head();
        while ((pc = chunk_get_next_ncnl(pc)) != NULL)
        {
            if ((pc->type != CT_SPAREN_OPEN) ||
                    ((pc->parent_type != CT_IF) &&
                     (pc->parent_type != CT_ELSEIF) &&
                     (pc->parent_type != CT_SWITCH)))
            {
                continue;
            }

            /* Grab the close sparen */
            pclose = chunk_get_next_type(pc, CT_SPAREN_CLOSE, pc->level, CNAV_PREPROC);
            if (pclose != NULL)
            {
                check_bool_parens(pc, pclose, 0);
                pc = pclose;
            }
        }
    }
}
开发者ID:githhhh,项目名称:uncrustify,代码行数:29,代码来源:parens.cpp


示例4: maybe_while_of_do

/**
 * pc is a CT_WHILE.
 * Scan backwards to see if we find a brace/vbrace with the parent set to CT_DO
 */
static bool maybe_while_of_do(chunk_t *pc)
{
    LOG_FUNC_ENTRY();
    chunk_t *prev;

    prev = chunk_get_prev_ncnl(pc);
    if ((prev == NULL) || !(prev->flags & PCF_IN_PREPROC))
    {
        return(false);
    }

    /* Find the chunk before the preprocessor */
    while ((prev != NULL) && (prev->flags & PCF_IN_PREPROC))
    {
        prev = chunk_get_prev_ncnl(prev);
    }

    if ((prev != NULL) &&
            (prev->parent_type == CT_DO) &&
            ((prev->type == CT_VBRACE_CLOSE) ||
             (prev->type == CT_BRACE_CLOSE)))
    {
        return(true);
    }
    return(false);
}
开发者ID:bengardner,项目名称:uncrustify,代码行数:30,代码来源:brace_cleanup.cpp


示例5: maybe_while_of_do

static bool maybe_while_of_do(chunk_t *pc)
{
   LOG_FUNC_ENTRY();
   chunk_t *prev;

   prev = chunk_get_prev_ncnl(pc);
   if (prev == nullptr || !(prev->flags & PCF_IN_PREPROC))
   {
      return(false);
   }

   // Find the chunk before the preprocessor
   while (prev != nullptr && (prev->flags & PCF_IN_PREPROC))
   {
      prev = chunk_get_prev_ncnl(prev);
   }

   if (  prev != nullptr
      && prev->parent_type == CT_DO
      && (prev->type == CT_VBRACE_CLOSE || prev->type == CT_BRACE_CLOSE))
   {
      return(true);
   }
   return(false);
}
开发者ID:jibsen,项目名称:uncrustify,代码行数:25,代码来源:brace_cleanup.cpp


示例6: preproc_start

static size_t preproc_start(parse_frame_t *frm, chunk_t *pc)
{
   LOG_FUNC_ENTRY();
   chunk_t *next;
   size_t  pp_level = cpd.pp_level;

   // Get the type of preprocessor and handle it
   next = chunk_get_next_ncnl(pc);
   if (next != nullptr)
   {
      cpd.in_preproc = next->type;

      // If we are in a define, push the frame stack.
      if (cpd.in_preproc == CT_PP_DEFINE)
      {
         pf_push(frm);

         // a preproc body starts a new, blank frame
         memset(frm, 0, sizeof(*frm));
         frm->level       = 1;
         frm->brace_level = 1;

         // TODO: not sure about the next 3 lines
         frm->pse_tos                 = 1;
         frm->pse[frm->pse_tos].type  = CT_PP_DEFINE;
         frm->pse[frm->pse_tos].stage = brace_stage_e::NONE;
      }
      else
      {
         // Check for #if, #else, #endif, etc
         pp_level = pf_check(frm, pc);
      }
   }
   return(pp_level);
}
开发者ID:jibsen,项目名称:uncrustify,代码行数:35,代码来源:brace_cleanup.cpp


示例7: print_stack

static void print_stack(log_sev_t logsev, const char *str,
                        struct parse_frame *frm, chunk_t *pc)
{
    (void)pc;
    LOG_FUNC_ENTRY();
    if (log_sev_on(logsev))
    {
        int idx;

        log_fmt(logsev, "%8.8s", str);

        for (idx = 1; idx <= frm->pse_tos; idx++)
        {
            if (frm->pse[idx].stage != BS_NONE)
            {
                LOG_FMT(logsev, " [%s - %d]", get_token_name(frm->pse[idx].type),
                        frm->pse[idx].stage);
            }
            else
            {
                LOG_FMT(logsev, " [%s]", get_token_name(frm->pse[idx].type));
            }
        }
        log_fmt(logsev, "\n");
    }
}
开发者ID:bengardner,项目名称:uncrustify,代码行数:26,代码来源:brace_cleanup.cpp


示例8: Util_EncodeBase64

int
Util_EncodeBase64(const void* src, size_t srcLen, char** dst_out, size_t* dstLen_out,
        VPL_BOOL addNewlines, VPL_BOOL urlSafe)
{
    size_t encodedBufLen;
    LOG_FUNC_ENTRY(LOG_LEVEL_DEBUG);
    
    if (dst_out == NULL) {
        return UTIL_ERR_INVALID;
    }
    if (addNewlines) {
        encodedBufLen = VPL_BASE64_ENCODED_BUF_LEN(srcLen);
    } else {
        encodedBufLen = VPL_BASE64_ENCODED_SINGLE_LINE_BUF_LEN(srcLen);
    }
    *dst_out = malloc(encodedBufLen);
    if (*dst_out == NULL) {
        if (dstLen_out != NULL) {
            *dstLen_out = 0;
        }
        return UTIL_ERR_NO_MEM;
    }
    VPL_EncodeBase64(src, srcLen, *dst_out, &encodedBufLen, addNewlines, urlSafe);
    // Subtract one for the null-terminator.
    if (dstLen_out != NULL) {
        *dstLen_out = (encodedBufLen - 1);
    }
    return GVM_OK;
}
开发者ID:iversonjimmy,项目名称:acer_cloud_wifi_copy,代码行数:29,代码来源:util_encodebase64.c


示例9: LOG_FUNC_ENTRY

bool CATDbgHelper::AddressToFunction( CATMemoryAddress* result )
{
	LOG_FUNC_ENTRY("CATDbgHelper::AddressToFunction");
	bool bFound = false;
	// If map file read use it and return.
	if ( m_bMap )
	{
		ULONG uCountedA = result->GetOffSetFromModuleStart();
		for ( vector<MAP_FUNC_INFO>::iterator it = m_vMapFileFuncList.begin() ; it != m_vMapFileFuncList.end() ; it++ )
		{
			// Check is this the symbol where address is.
			unsigned long iStart = it->iAddress;
			unsigned long iEnd = it->iAddress + it->iFuncLength;
			if ( uCountedA >= iStart 
				&& uCountedA < iEnd )
			{
				result->SetAddressToLineState( CATMemoryAddress::SYMBOL );
				result->SetFunctionName( it->sMangledName );
				bFound = true;
				break;
			}
		}
	}
	return bFound;
}
开发者ID:RomanSaveljev,项目名称:osrndtools,代码行数:25,代码来源:catdbghelper.cpp


示例10: do_code_width

void do_code_width(void)
{
   LOG_FUNC_ENTRY();
   LOG_FMT(LSPLIT, "%s(%d)\n", __func__, __LINE__);

   for (chunk_t *pc = chunk_get_head(); pc != nullptr; pc = chunk_get_next(pc))
   {
      if (  !chunk_is_newline(pc)
         && !chunk_is_comment(pc)
         && pc->type != CT_SPACE
         && is_past_width(pc))
      {
         if (  pc->type == CT_VBRACE_CLOSE // don't break if a vbrace close
            && chunk_is_last_on_line(*pc)) // is the last chunk on its line
         {
            continue;
         }

         bool split_OK = split_line(pc);
         if (split_OK)
         {
            LOG_FMT(LSPLIT, "%s(%d): on orig_line=%zu, orig_col=%zu, for %s\n",
                    __func__, __LINE__, pc->orig_line, pc->orig_col, pc->text());
         }
         else
         {
            LOG_FMT(LSPLIT, "%s(%d): Bailed on orig_line=%zu, orig_col=%zu, for %s\n",
                    __func__, __LINE__, pc->orig_line, pc->orig_col, pc->text());
            break;
         }
      }
   }
}
开发者ID:CDanU,项目名称:uncrustify,代码行数:33,代码来源:width.cpp


示例11: split_fcn_params_full

static void split_fcn_params_full(chunk_t *start)
{
   LOG_FUNC_ENTRY();
   LOG_FMT(LSPLIT, "%s(%d): %s\n", __func__, __LINE__, start->text());

   // Find the opening function parenthesis
   chunk_t *fpo = start;
   LOG_FMT(LSPLIT, "  %s(%d): Find the opening function parenthesis\n", __func__, __LINE__);
   while ((fpo = chunk_get_prev(fpo)) != nullptr)
   {
      LOG_FMT(LSPLIT, "%s(%d): %s, orig_col is %zu, level is %zu\n",
              __func__, __LINE__, fpo->text(), fpo->orig_col, fpo->level);
      if (fpo->type == CT_FPAREN_OPEN && (fpo->level == start->level - 1))
      {
         break;  // opening parenthesis found. Issue #1020
      }
   }

   // Now break after every comma
   chunk_t *pc = fpo;
   while ((pc = chunk_get_next_ncnl(pc)) != nullptr)
   {
      if (pc->level <= fpo->level)
      {
         break;
      }
      if ((pc->level == (fpo->level + 1)) && pc->type == CT_COMMA)
      {
         split_before_chunk(chunk_get_next(pc));
      }
   }
}
开发者ID:CDanU,项目名称:uncrustify,代码行数:32,代码来源:width.cpp


示例12: LOG_FUNC_ENTRY

/*
 * the value of after determines:
 *   true:  insert_vbrace_close_after(pc, frm)
 *   false: insert_vbrace_open_before(pc, frm)
 */
static chunk_t *insert_vbrace(chunk_t *pc, bool after,
                              struct parse_frame *frm)
{
    LOG_FUNC_ENTRY();
    chunk_t chunk;
    chunk_t *rv;
    chunk_t *ref;

    chunk.orig_line   = pc->orig_line;
    chunk.parent_type = frm->pse[frm->pse_tos].type;
    chunk.level       = frm->level;
    chunk.brace_level = frm->brace_level;
    chunk.flags       = pc->flags & PCF_COPY_FLAGS;
    chunk.str         = "";
    if (after)
    {
        chunk.type = CT_VBRACE_CLOSE;
        rv         = chunk_add_after(&chunk, pc);
    }
    else
    {
        ref = chunk_get_prev(pc);
        if ((ref->flags & PCF_IN_PREPROC) == 0)
        {
            chunk.flags &= ~PCF_IN_PREPROC;
        }

        while (chunk_is_newline(ref) || chunk_is_comment(ref))
        {
            ref->level++;
            ref->brace_level++;
            ref = chunk_get_prev(ref);
        }

        /* Don't back into a preprocessor */
        if (((pc->flags & PCF_IN_PREPROC) == 0) &&
                (ref->flags & PCF_IN_PREPROC))
        {
            if (ref->type == CT_PREPROC_BODY)
            {
                do
                {
                    ref = chunk_get_prev(ref);
                } while ((ref != NULL) && (ref->flags & PCF_IN_PREPROC));
            }
            else
            {
                ref = chunk_get_next(ref);
            }
        }

        chunk.orig_line = ref->orig_line;
        chunk.column    = ref->column + ref->len() + 1;
        chunk.type      = CT_VBRACE_OPEN;
        rv              = chunk_add_after(&chunk, ref);
    }
    return(rv);
} // insert_vbrace
开发者ID:bengardner,项目名称:uncrustify,代码行数:63,代码来源:brace_cleanup.cpp



注:本文中的LOG_FUNC_ENTRY函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ LOG_FUNC_RETURN函数代码示例发布时间:2022-05-30
下一篇:
C++ LOG_FUNC_CALLED函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap