博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
eclipse-c-template
阅读量:4153 次
发布时间:2019-05-25

本文共 2975 字,大约阅读时间需要 9 分钟。

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;
}

转载地址:http://ybmti.baihongyu.com/

你可能感兴趣的文章
【Python】学习笔记——-7.2、访问限制
查看>>
【Python】学习笔记——-7.3、继承和多态
查看>>
【Python】学习笔记——-7.5、实例属性和类属性
查看>>
git中文安装教程
查看>>
虚拟机 CentOS7/RedHat7/OracleLinux7 配置静态IP地址 Ping 物理机和互联网
查看>>
Jackson Tree Model Example
查看>>
常用js收集
查看>>
如何防止sql注入
查看>>
springmvc传值
查看>>
在Eclipse中查看Android源码
查看>>
Android使用webservice客户端实例
查看>>
[转]C语言printf
查看>>
C 语言学习 --设置文本框内容及进制转换
查看>>
C 语言 学习---判断文本框取得的数是否是整数
查看>>
C 语言 学习---ComboBox相关、简易“假”管理系统
查看>>
C 语言 学习---回调、时间定时更新程序
查看>>
第十一章 - 直接内存
查看>>
JDBC核心技术 - 上篇
查看>>
一篇搞懂Java反射机制
查看>>
Single Number II --出现一次的数(重)
查看>>