@@ -23,8 +23,8 @@ WsjcppJsonRpc20ExportCliWebJs::WsjcppJsonRpc20ExportCliWebJs(
2323 TAG = " WsjcppJsonRpc20ExportCliWebJs" ;
2424 m_sAuthorName = " Unknown" ;
2525 m_sAuthorEmail = " unknown" ;
26- m_sAppName = " unknown" ;
27- m_sAppVersion = " unknown" ;
26+ this -> getAppName () = " unknown" ;
27+ this -> getAppVersion () = " unknown" ;
2828 m_sClassName = " Unknown" ;
2929 m_sDefaultConnectionString = " ws://localhost:1234/" ;
3030
@@ -53,12 +53,6 @@ void WsjcppJsonRpc20ExportCliWebJs::setAuthorEmail(const std::string &sAuthorEma
5353
5454// ---------------------------------------------------------------------
5555
56- void WsjcppJsonRpc20ExportCliWebJs::setAppName (const std::string &sAppName ) {
57- m_sAppName = sAppName ;
58- }
59-
60- // ---------------------------------------------------------------------
61-
6256void WsjcppJsonRpc20ExportCliWebJs::setClassName (const std::string &sClassName ) {
6357 m_sClassName = sClassName ;
6458}
@@ -97,12 +91,6 @@ void WsjcppJsonRpc20ExportCliWebJs::setDefaultConnectionString(const std::string
9791
9892// ---------------------------------------------------------------------
9993
100- void WsjcppJsonRpc20ExportCliWebJs::setAppVersion (const std::string &sAppVersion ) {
101- m_sAppVersion = sAppVersion ;
102- }
103-
104- // ---------------------------------------------------------------------
105-
10694bool WsjcppJsonRpc20ExportCliWebJs::doExportLib () {
10795 std::string sBasicDir = " ./" + this ->getPackageName ();
10896
@@ -159,8 +147,8 @@ void WsjcppJsonRpc20ExportCliWebJs::exportPackageJson() {
159147 packageJson <<
160148 " {\n "
161149 " \" 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 "
164152 " \" main\" : \" dist/" + this ->getPackageName () + " .js\" ,\n "
165153 " \" repository\" : {\n "
166154 " \" type\" : \" " + m_sRepositoryType + " \" ,\n "
@@ -199,8 +187,8 @@ void WsjcppJsonRpc20ExportCliWebJs::exportAPImd() {
199187
200188 apimd <<
201189 " # " + 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 "
204192 " * Date: " << buffer.str () << " \n\n "
205193 " Include script ```dist/" + this ->getPackageName () + " .js```\n "
206194 " Example connect:\n "
@@ -381,11 +369,11 @@ bool WsjcppJsonRpc20ExportCliWebJs::exportLibCliWebJSFile() {
381369 // now the result is in `buffer.str()`.
382370
383371 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 "
385373 " window." << m_sClassName << " = window." << m_sClassName << " || (function() { \r\n "
386374 " 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 "
389377 " self.appBuildDate = '" + sBuildDate + " ';\r\n "
390378 " var _lastm = 0;\r\n "
391379 " var _listeners = {};\r\n "
@@ -401,7 +389,7 @@ bool WsjcppJsonRpc20ExportCliWebJs::exportLibCliWebJSFile() {
401389 libwjscppcli_web_js_file <<
402390 " };\r\n "
403391 " 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 "
405393 " self.promise = function() {\r\n "
406394 " return {\r\n "
407395 " completed: false, failed: false, successed: false, \r\n "
@@ -698,7 +686,7 @@ void WsjcppJsonRpc20ExportCliWebJs::exportLibCliWebServiceTSFile() {
698686 // now the result is in `buffer.str()`.
699687
700688 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 "
702690 " import { Injectable, EventEmitter } from '@angular/core';\r\n "
703691 " import { PlatformLocation } from '@angular/common';\r\n "
704692 " import { ToastrService } from 'ngx-toastr';\r\n "
@@ -707,8 +695,8 @@ void WsjcppJsonRpc20ExportCliWebJs::exportLibCliWebServiceTSFile() {
707695 " \r\n "
708696 " @Injectable({providedIn: 'root'})\r\n "
709697 " 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 "
712700 " private appBuildDate: string = '" + sBuildDate + " ';\r\n "
713701 " isAuthorized: boolean = false;\r\n "
714702 " connectionState: string = '';\r\n "
@@ -738,7 +726,7 @@ void WsjcppJsonRpc20ExportCliWebJs::exportLibCliWebServiceTSFile() {
738726 " ) {\r\n "
739727 " this.serverHost = this._location.hostname;\r\n "
740728 " 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 "
742730 " this._tokenValue = this.getToken();\r\n "
743731 " }\r\n "
744732 " \r\n "
0 commit comments