Skip to content

Commit

Permalink
feat: tars2node support --web, only struct member field
Browse files Browse the repository at this point in the history
  • Loading branch information
ruanshudong committed Feb 12, 2025
1 parent a468648 commit 84f8635
Show file tree
Hide file tree
Showing 7 changed files with 387 additions and 265 deletions.
2 changes: 1 addition & 1 deletion tools/tars2node/code_generator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ void CodeGenerator::createFile(const string &file, const bool bEntry)
node.setDependent(_depMembers);
node.setEnableTS(_bTS);
node.setEnableDTS(_bDTS);

node.setEnableWeb(_bWeb);
node.createFile(files[ii], false);
}
}
Expand Down
5 changes: 5 additions & 0 deletions tools/tars2node/code_generator.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ class CodeGenerator
_sToPath("./"),
_bClient(false),
_bServer(false),
_bWeb(false),
_bRecursive(false),
_bUseSpecialPath(false),
_iLongType(Number),
Expand All @@ -99,6 +100,8 @@ class CodeGenerator

void setEnableServer(bool bEnable) { _bServer = bEnable; }

void setEnableWeb(bool bEnable) { _bWeb = bEnable; }

void setTargetPath(const string & sPath) { _sToPath = sPath + "/"; }

void setRecursive(bool bEnable) { _bRecursive = bEnable; }
Expand Down Expand Up @@ -302,6 +305,8 @@ class CodeGenerator

bool _bServer;

bool _bWeb;

bool _bRecursive;

bool _bUseSpecialPath;
Expand Down
Loading

0 comments on commit 84f8635

Please sign in to comment.