@@ -23,8 +23,8 @@ WsjcppJsonRpc20ExportCliWebJs::WsjcppJsonRpc20ExportCliWebJs(
23
23
TAG = " WsjcppJsonRpc20ExportCliWebJs" ;
24
24
m_sAuthorName = " Unknown" ;
25
25
m_sAuthorEmail = " unknown" ;
26
- m_sAppName = " unknown" ;
27
- m_sAppVersion = " unknown" ;
26
+ this -> getAppName () = " unknown" ;
27
+ this -> getAppVersion () = " unknown" ;
28
28
m_sClassName = " Unknown" ;
29
29
m_sDefaultConnectionString = " ws://localhost:1234/" ;
30
30
@@ -53,12 +53,6 @@ void WsjcppJsonRpc20ExportCliWebJs::setAuthorEmail(const std::string &sAuthorEma
53
53
54
54
// ---------------------------------------------------------------------
55
55
56
- void WsjcppJsonRpc20ExportCliWebJs::setAppName (const std::string &sAppName ) {
57
- m_sAppName = sAppName ;
58
- }
59
-
60
- // ---------------------------------------------------------------------
61
-
62
56
void WsjcppJsonRpc20ExportCliWebJs::setClassName (const std::string &sClassName ) {
63
57
m_sClassName = sClassName ;
64
58
}
@@ -97,12 +91,6 @@ void WsjcppJsonRpc20ExportCliWebJs::setDefaultConnectionString(const std::string
97
91
98
92
// ---------------------------------------------------------------------
99
93
100
- void WsjcppJsonRpc20ExportCliWebJs::setAppVersion (const std::string &sAppVersion ) {
101
- m_sAppVersion = sAppVersion ;
102
- }
103
-
104
- // ---------------------------------------------------------------------
105
-
106
94
bool WsjcppJsonRpc20ExportCliWebJs::doExportLib () {
107
95
std::string sBasicDir = " ./" + this ->getPackageName ();
108
96
@@ -159,8 +147,8 @@ void WsjcppJsonRpc20ExportCliWebJs::exportPackageJson() {
159
147
packageJson <<
160
148
" {\n "
161
149
" \" name\" : \" " + this ->getPackageName () + " \" ,\n "
162
- " \" version\" : \" " + m_sAppVersion + " \" ,\n "
163
- " \" description\" : \" " + m_sClassName + " JavaScript Web Client Library for " + m_sAppName + " \" ,\n "
150
+ " \" version\" : \" " + this -> getAppVersion () + " \" ,\n "
151
+ " \" description\" : \" " + m_sClassName + " JavaScript Web Client Library for " + this -> getAppName () + " \" ,\n "
164
152
" \" main\" : \" dist/" + this ->getPackageName () + " .js\" ,\n "
165
153
" \" repository\" : {\n "
166
154
" \" type\" : \" " + m_sRepositoryType + " \" ,\n "
@@ -199,8 +187,8 @@ void WsjcppJsonRpc20ExportCliWebJs::exportAPImd() {
199
187
200
188
apimd <<
201
189
" # " + this ->getPackageName () + " \n\n "
202
- " Automatically generated by " << m_sAppName << " . \n "
203
- " * Version: " << m_sAppVersion << " \n "
190
+ " Automatically generated by " << this -> getAppName () << " . \n "
191
+ " * Version: " << this -> getAppVersion () << " \n "
204
192
" * Date: " << buffer.str () << " \n\n "
205
193
" Include script ```dist/" + this ->getPackageName () + " .js```\n "
206
194
" Example connect:\n "
@@ -381,11 +369,11 @@ bool WsjcppJsonRpc20ExportCliWebJs::exportLibCliWebJSFile() {
381
369
// now the result is in `buffer.str()`.
382
370
383
371
libwjscppcli_web_js_file <<
384
- " // This file was automatically generated by " << m_sAppName << " (" + m_sAppVersion + " ), date: " << sBuildDate << " \r\n "
372
+ " // This file was automatically generated by " << this -> getAppName () << " (" + this -> getAppVersion () + " ), date: " << sBuildDate << " \r\n "
385
373
" window." << m_sClassName << " = window." << m_sClassName << " || (function() { \r\n "
386
374
" var self = {};\r\n "
387
- " self.appName = '" + m_sAppName + " ';\r\n "
388
- " self.appVersion = '" + m_sAppVersion + " ';\r\n "
375
+ " self.appName = '" + this -> getAppName () + " ';\r\n "
376
+ " self.appVersion = '" + this -> getAppVersion () + " ';\r\n "
389
377
" self.appBuildDate = '" + sBuildDate + " ';\r\n "
390
378
" var _lastm = 0;\r\n "
391
379
" var _listeners = {};\r\n "
@@ -401,7 +389,7 @@ bool WsjcppJsonRpc20ExportCliWebJs::exportLibCliWebJSFile() {
401
389
libwjscppcli_web_js_file <<
402
390
" };\r\n "
403
391
" function _lm() { _lastm++; return 'm' + _lastm; };\r\n "
404
- " console.warn('" + m_sClassName + " (" + m_sAppVersion + " )');\r\n "
392
+ " console.warn('" + m_sClassName + " (" + this -> getAppVersion () + " )');\r\n "
405
393
" self.promise = function() {\r\n "
406
394
" return {\r\n "
407
395
" completed: false, failed: false, successed: false, \r\n "
@@ -698,7 +686,7 @@ void WsjcppJsonRpc20ExportCliWebJs::exportLibCliWebServiceTSFile() {
698
686
// now the result is in `buffer.str()`.
699
687
700
688
libwjscppcli_web_service_ts_file <<
701
- " // This file was automatically generated by " << m_sAppName << " (v" + m_sAppVersion + " ), date: " << sBuildDate << " \r\n "
689
+ " // This file was automatically generated by " << this -> getAppName () << " (v" + this -> getAppVersion () + " ), date: " << sBuildDate << " \r\n "
702
690
" import { Injectable, EventEmitter } from '@angular/core';\r\n "
703
691
" import { PlatformLocation } from '@angular/common';\r\n "
704
692
" import { ToastrService } from 'ngx-toastr';\r\n "
@@ -707,8 +695,8 @@ void WsjcppJsonRpc20ExportCliWebJs::exportLibCliWebServiceTSFile() {
707
695
" \r\n "
708
696
" @Injectable({providedIn: 'root'})\r\n "
709
697
" export class " + m_sClassName + " {\r\n "
710
- " private appName: string = '" + m_sAppName + " ';\r\n "
711
- " private appVersion: string = '" + m_sAppVersion + " ';\r\n "
698
+ " private appName: string = '" + this -> getAppName () + " ';\r\n "
699
+ " private appVersion: string = '" + this -> getAppVersion () + " ';\r\n "
712
700
" private appBuildDate: string = '" + sBuildDate + " ';\r\n "
713
701
" isAuthorized: boolean = false;\r\n "
714
702
" connectionState: string = '';\r\n "
@@ -738,7 +726,7 @@ void WsjcppJsonRpc20ExportCliWebJs::exportLibCliWebServiceTSFile() {
738
726
" ) {\r\n "
739
727
" this.serverHost = this._location.hostname;\r\n "
740
728
" this.currentProtocol = this._location.protocol;\r\n "
741
- " console.warn('" + m_sClassName + " (" + m_sAppVersion + " )');\r\n "
729
+ " console.warn('" + m_sClassName + " (" + this -> getAppVersion () + " )');\r\n "
742
730
" this._tokenValue = this.getToken();\r\n "
743
731
" }\r\n "
744
732
" \r\n "
0 commit comments