mirror of
https://github.com/tiennm99/zfoo.git
synced 2026-08-21 08:27:11 +00:00
perf[protocol]: 使用模板生成协议
This commit is contained in:
+1
-1
@@ -38,7 +38,7 @@ hs_err_pid*
|
||||
**/gdProtocol/
|
||||
**/CsProtocol/
|
||||
**/LuaProtocol/
|
||||
**/zfoocpp/
|
||||
**/cppProtocol/
|
||||
**/protos/
|
||||
|
||||
# 以下是web前端需要忽略的文件
|
||||
|
||||
@@ -46,7 +46,7 @@ import static com.zfoo.protocol.util.StringUtils.TAB;
|
||||
*/
|
||||
public abstract class GenerateCppUtils {
|
||||
|
||||
private static String protocolOutputRootPath = "zfoocpp";
|
||||
private static String protocolOutputRootPath = "cppProtocol";
|
||||
private static String protocolOutputPath = StringUtils.EMPTY;
|
||||
|
||||
private static Map<ISerializer, ICppSerializer> cppSerializerMap;
|
||||
@@ -142,7 +142,7 @@ public abstract class GenerateCppUtils {
|
||||
var writeObject = writeObject(registration);
|
||||
var readObject = readObject(registration);
|
||||
|
||||
protocolTemplate = StringUtils.format(protocolTemplate, defineProtocolName, defineProtocolName, includeHeaders, docTitle
|
||||
protocolTemplate = StringUtils.format(protocolTemplate, defineProtocolName, defineProtocolName, protocolOutputRootPath, includeHeaders, docTitle
|
||||
, protocolClazzName, fieldDefinition, protocolClazzName, protocolClazzName, valueOfMethod.getKey(), protocolClazzName
|
||||
, valueOfMethod.getValue().trim(), protocolId, protocolClazzName, operator.trim(),
|
||||
protocolClazzName, protocolId, protocolClazzName, writeObject.trim(), protocolClazzName, readObject.trim());
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef ZFOO_{}_H
|
||||
#define ZFOO_{}_H
|
||||
|
||||
#include "zfoocpp/ByteBuffer.h"
|
||||
#include "{}/ByteBuffer.h"
|
||||
{}
|
||||
namespace zfoo {
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ const fs = require('fs');
|
||||
|
||||
describe('jsProtocolTest', () => {
|
||||
it('complexObjectTest', () => {
|
||||
const data = fs.readFileSync('resources\\ComplexObject.bytes');
|
||||
const data = fs.readFileSync('../resources/ComplexObject.bytes');
|
||||
|
||||
ProtocolManager.initProtocol();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user