本文共 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/