eclipse-c-template

cmtblock
/****************************** BEG: ${name} **********************************/
 ${cursor}
/****************************** END: ${name} **********************************/




cmtfield
/*******************************************************************************
 * ${cursor}
 ******************************************************************************/




cmtfile
/*******************************************************************************
 *              Copyright(C) 2008-2012 MOON. All rights reserved.
 ------------------------------------------------------------------------------
 * Project Name : ${project_name}
 * File Name    : ${file}
 * Created On   : ${date} ${time}
 * Author       : ${user}
 * Description  : 
 ******************************************************************************/




cmtmethod
/*******************************************************************************
 * Function    : ${enclosing_method}
 * Description : 
 * Parameters  : (1) ${enclosing_method_arguments} : 
 *               (2)  : 
 * Return      : ${return_type}
 * Notes       : 
 ******************************************************************************/




cmttype
/*******************************************************************************
 * Class       : ${type_name}
 * Created On  : ${date} ${time}
 * Author      : ${user}
 * Description : 
 * Parameters  : (1)  : 
 *               (2)  : 
 ******************************************************************************/




ld (line delimiter)





Todo
// TODO




inc
#include "${cursor}"




inc
#include <${cursor}>




main
int main(int argc, char* argv[])
{
    ${cursor}
}




switch
switch (${key})
{
    case ${value}:
    {
        ${cursor}
    }
    break;

    case ${value}:
    {
        
    }
    break;

    default:
    {
    }
    break;
}




while
while (${condition})
{
    ${line_selection}${cursor}
}




ifdef
#ifdef ${tag}


#endif /* ${tag} */


ifdefc
#ifdef __cplusplus
extern "C"
{
#endif /* __cplusplus */


${cursor}


#ifdef __cplusplus
}
#endif /* __cplusplus */




ifndef
#ifndef ${include_guard_symbol}
#define ${include_guard_symbol}


#endif /* ${include_guard_symbol} */




class 
class ${name}
{
private:
${cursor}


public:
${name}();
virtual ~${name}();
};




// 以下的根据项目自己定制
classcfglist
#include "cfg-list.h"


using namespace com::koala::data::cfg;


class ${name} : public CCfgList
{
private:
${cursor}


public:
    ${name}();
    virtual ~${name}();
    INT32 Init();
    INT32 Fini();
};


DECLARE_CFG_CMP(SceneCfgSvr)




classhandle 
class ${name} : public CHandle
{
private:
${cursor}


public:
${name}();
virtual ~${name}();

virtual INT32 HandleMsg(IN const UINT32 u32MsgID, IN const BYTE* pbyMsgBuf,
           IN const UINT32 u32MsgLen, IN const MsgHead& robjMsgHead,
           IN const SockInfo& robjSockInfo);
};




classobj 
#include "obj-pool.h"


class ${name} : public CObj
{
private:
    ${cursor}


public:
    ${name}();
    virtual ~${name}();
    virtual INT32 Init(IN const BOOL bResume = FALSE);
};


// 将下面两行放到"obj-nr-def.h"文件中
typedef CObjPool<${name}, MAX_SCENE_NR> CScenePool;
#define SCENE_POOL_SZ sizeof(CScenePool)




loge
LOG_ERROR("${cursor}");
return ER_UNKNOWN;




iferr
if (i32Ret != 0)
{
    LOG_ERROR("failed to ${cursor}");
    return ER_UNKNOWN;
}
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值