Solution46
CJsonConfig.cpp
[詳解]
1 //=============================================================================
2 /// @file
3 /// JSON構成情報クラス実装ファイル
4 ///
5 /// JSON構成情報クラス実装ファイルです。
6 ///
7 /// $Id: CJsonConfig.cpp 245 2019-03-20 15:03:41Z admin $
8 /// $Date: 2019-03-21 00:03:41 +0900 (2019/03/21 (木)) $
9 /// $Author: admin $
10 ///
11 /// @attention なし
12 
13 #pragma managed( push, off )
14 
15 //=============================================================================
16 // インクルードファイル
17 #include <CJsonConfig.h>
18 #include <CFileStream.h>
19 #include <LibLogOut.h>
20 #include <LibNewDel.h>
21 #include <LibUtility.h>
22 
23 //=============================================================================
24 // JSONライブラリ名前空間
25 namespace LibJson {
26  //=========================================================================
27  // JSON構成情報クラス
28  //=========================================================================
29  // 構築子と解体子
30  //-------------------------------------------------------------------------
31  // コンストラクタ
33  // 基底クラスコンストラクタ
34  : CJsonDocument()
35  {}
36 
37  //=========================================================================
38  // 公開関数
39  //-------------------------------------------------------------------------
40  // 構成ファイルロード関数
41  bool CJsonConfig::Load( wchar_t const* pszPath ) noexcept {
42  LogOutHeader();
43  // NewDelLogOut() = true;
44 
45  // 処理ブロック
46  bool result = false;
47  do {
48  // ファイルをオープンする
49  CFileStream cFile;
50  if ( !cFile.Open( pszPath ) ) {
51  // 失敗!
52  break;
53  }
54  // JSONドキュメントを入力する
55  else if ( !InputDocument( cFile ) ) {
56  // 失敗!
57  break;
58  }
59 
60  // 成功!
61  result = true;
62  } while ( false );
63 
64  NewDelLogOut() = false;
65  LogOutFooter();
66 
67  // 実行結果を返す
68  return result;
69  }
70 
71  //-------------------------------------------------------------------------
72  // 構成ファイルセーブ関数
73  bool CJsonConfig::Save( wchar_t const* pszPath ) noexcept {
74  LogOutHeader();
75  // NewDelLogOut() = true;
76 
77  // 処理ブロック
78  bool result = false;
79  do {
80  // ファイルを作成する
81  CFileStream cFile;
82  if ( !cFile.Create( pszPath ) ) {
83  // 失敗!
84  break;
85  }
86  // JSONドキュメントを出力する
87  else if ( !OutputDocument( cFile ) ) {
88  // 失敗!
89  break;
90  }
91 
92  // 成功!
93  result = true;
94  } while ( false );
95 
96  NewDelLogOut() = false;
97  LogOutFooter();
98 
99  // 実行結果を返す
100  return result;
101  }
102 
103  //-------------------------------------------------------------------------
104  // JSONパス取得関数
105  bool CJsonConfig::GetPath( CString& rcPath, wchar_t const* pszKey, int nIndex ) noexcept {
106  // 処理ブロック
107  bool result = false;
108  do {
109  // キー文字列ポインタを調べる
110  rcPath = L"";
111  if ( nullptr != pszKey ) {
112  // キー文字列を追加する
113  rcPath += pszKey;
114  }
115 
116  // インデックスを調べる
117  if ( 0 <= nIndex ) {
118  // 配列添字文字列を追加する
119  rcPath += CString().Format( L"[%d]", nIndex );
120  }
121 
122  // 成功!
123  result = true;
124  } while ( false );
125 
126  // 実行結果を返す
127  return result;
128  }
129 
130  //-------------------------------------------------------------------------
131  // キー設定値削除関数
132  bool CJsonConfig::Delete( wchar_t const* pszKey, int nIndex ) noexcept {
133  // 処理ブロック
134  bool result = false;
135  do {
136  // JSONパスを取得する
137  CString cPath;
138  if ( !GetPath( cPath, pszKey, nIndex ) ) {
139  // 失敗!
140  break;
141  }
142 
143  // JSONパスを検索する
144  CJson* pcJson = FindJsonPath( cPath, m_pcJsonCurrent );
145  if ( nullptr == pcJson ) {
146  // 失敗!
147  break;
148  }
149  // JSONクラスを削除する
150  else if ( !DeleteJson( pcJson ) ) {
151  // 失敗!
152  break;
153  }
154 
155  // 成功!
156  result = true;
157  } while ( false );
158 
159  // 実行結果を返す
160  return result;
161  }
162 
163  //-------------------------------------------------------------------------
164  // 整数型設定値取得関数
165  bool CJsonConfig::Get( int& rnValue, wchar_t const* pszKey, int nIndex ) noexcept {
166  // 処理ブロック
167  bool result = false;
168  do {
169  // JSONパスを取得する
170  CString cPath;
171  if ( !GetPath( cPath, pszKey, nIndex ) ) {
172  // 失敗!
173  break;
174  }
175 
176  // JSONパスを検索する
177  CJson* pcJson = FindJsonPath( cPath, m_pcJsonCurrent );
178  if ( nullptr == pcJson ) {
179  // 失敗!
180  break;
181  }
182  // JSONクラス種別を調べる
183  else if ( !pcJson->IsJsonNumber() ) {
184  // 失敗!
185  break;
186  }
187 
188  // JSON設定値文字列を取得する
189  CString cValue;
190  if ( !GetJsonSetValue( cValue, pcJson, false, false ) ) {
191  // 失敗!
192  break;
193  }
194 
195  // 整数を取得する
196  rnValue = ::wcstol( cValue, nullptr, 10 );
197 
198  // 成功!
199  result = true;
200  } while ( false );
201 
202  // 実行結果を返す
203  return result;
204  }
205 
206  //-------------------------------------------------------------------------
207  // 整数型設定値設定関数
208  bool CJsonConfig::Set( int nValue, wchar_t const* pszKey, int nIndex ) noexcept {
209  // 処理ブロック
210  bool result = false;
211  do {
212  // JSONパスを取得する
213  CString cPath;
214  if ( !GetPath( cPath, pszKey, nIndex ) ) {
215  // 失敗!
216  break;
217  }
218 
219  // 整数型設定値を追加する
220  cPath += L" = ";
221  cPath += CString().Format( L"%d", nValue );
222 
223  // JSONパスを作成する
224  if ( !CreatePath( cPath ) ) {
225  // 失敗!
226  break;
227  }
228 
229  // 成功!
230  result = true;
231  } while ( false );
232 
233  // 実行結果を返す
234  return result;
235  }
236 
237  //-------------------------------------------------------------------------
238  // 整数型設定値取得関数
239  bool CJsonConfig::Get( std::initializer_list< int* > const& rpnValueList, wchar_t const* pszKey ) noexcept {
240  // 処理ブロック
241  bool result = false;
242  do {
243  // 巡回する
244  int nIndex = 0;
245  for ( auto pcIter = rpnValueList.begin();; ++pcIter, ++nIndex ) {
246  // イテレータを調べる
247  if ( rpnValueList.end() == pcIter ) {
248  // 成功!
249  result = true;
250  break;
251  }
252 
253  // JSONパスを取得する
254  CString cPath;
255  if ( !GetPath( cPath, pszKey, nIndex ) ) {
256  // 失敗!
257  break;
258  }
259 
260  // JSONパスを検索する
261  CJson* pcJson = FindJsonPath( cPath, m_pcJsonCurrent );
262  if ( nullptr == pcJson ) {
263  // 失敗!
264  break;
265  }
266  // JSONクラス種別を調べる
267  else if ( !pcJson->IsJsonNumber() ) {
268  // 失敗!
269  break;
270  }
271 
272  // JSON設定値文字列を取得する
273  CString cValue;
274  if ( !GetJsonSetValue( cValue, pcJson, false, false ) ) {
275  // 失敗!
276  break;
277  }
278 
279  // 整数を取得する
280  if ( nullptr != *pcIter ) {
281  **pcIter = ::wcstol( cValue, nullptr, 10 );
282  }
283  }
284  } while ( false );
285 
286  // 実行結果を返す
287  return result;
288  }
289 
290  //-------------------------------------------------------------------------
291  // 整数型設定値設定関数
292  bool CJsonConfig::Set( std::initializer_list< int > const& rnValueList, wchar_t const* pszKey ) noexcept {
293  // 処理ブロック
294  bool result = false;
295  do {
296  // JSONパスを取得する
297  CString cPath;
298  if ( !GetPath( cPath, pszKey ) ) {
299  // 失敗!
300  break;
301  }
302 
303  // 巡回する
304  cPath += L" = [";
305  for ( auto pcIter = rnValueList.begin();; ++pcIter ) {
306  // イテレータを調べる
307  if ( rnValueList.end() == pcIter ) {
308  // JSONパスを作成する
309  cPath += L"]";
310  if ( !CreatePath( cPath ) ) {
311  // 失敗!
312  break;
313  }
314 
315  // 成功!
316  result = true;
317  break;
318  }
319  // イテレータを調べる
320  else if ( rnValueList.begin() != pcIter ) {
321  // コンマを追加する
322  cPath += L",";
323  }
324 
325  // 設定値を追加する
326  cPath += CString().Format( L"%d", *pcIter );
327  }
328  } while ( false );
329 
330  // 実行結果を返す
331  return result;
332  }
333 
334  //-------------------------------------------------------------------------
335  // JSON設定値浮動小数取得関数
336  bool CJsonConfig::Get( double& rfValue, wchar_t const* pszKey, int nIndex ) noexcept {
337  // 処理ブロック
338  bool result = false;
339  do {
340  // JSONパスを取得する
341  CString cPath;
342  if ( !GetPath( cPath, pszKey, nIndex ) ) {
343  // 失敗!
344  break;
345  }
346 
347  // JSONパスを検索する
348  CJson* pcJson = FindJsonPath( cPath, m_pcJsonCurrent );
349  if ( nullptr == pcJson ) {
350  // 失敗!
351  break;
352  }
353  // JSONクラス種別を調べる
354  else if ( !pcJson->IsJsonNumber() ) {
355  // 失敗!
356  break;
357  }
358 
359  // JSON設定値文字列を取得する
360  CString cValue;
361  if ( !GetJsonSetValue( cValue, pcJson, false, false ) ) {
362  // 失敗!
363  break;
364  }
365 
366  // 浮動小数を取得する
367  rfValue = ::wcstof( cValue, nullptr );
368 
369  // 成功!
370  result = true;
371  } while ( false );
372 
373  // 実行結果を返す
374  return result;
375  }
376 
377  //-------------------------------------------------------------------------
378  // JSON設定値浮動小数設定関数
379  bool CJsonConfig::Set( double fValue, wchar_t const* pszKey, int nIndex ) noexcept {
380  // 処理ブロック
381  bool result = false;
382  do {
383  // JSONパスを取得する
384  CString cPath;
385  if ( !GetPath( cPath, pszKey, nIndex ) ) {
386  // 失敗!
387  break;
388  }
389 
390  // 設定値浮動小数を追加する
391  cPath += L" = ";
392  cPath += CString().Format( L"%lG", fValue );
393 
394  // JSONパスを作成する
395  if ( !CreatePath( cPath ) ) {
396  // 失敗!
397  break;
398  }
399 
400  // 成功!
401  result = true;
402  } while ( false );
403 
404  // 実行結果を返す
405  return result;
406  }
407 
408  //-------------------------------------------------------------------------
409  // JSON設定値真理値取得関数
410  bool CJsonConfig::Get( bool& rbValue, wchar_t const* pszKey, int nIndex ) noexcept {
411  // 処理ブロック
412  bool result = false;
413  do {
414  // JSONパスを取得する
415  CString cPath;
416  if ( !GetPath( cPath, pszKey, nIndex ) ) {
417  // 失敗!
418  break;
419  }
420 
421  // JSONパスを検索する
422  CJson* pcJson = FindJsonPath( cPath, m_pcJsonCurrent );
423  if ( nullptr == pcJson ) {
424  // 失敗!
425  break;
426  }
427  // JSONクラス種別を調べる
428  else if ( !pcJson->IsJsonFixed() ) {
429  // 失敗!
430  break;
431  }
432 
433  // JSON設定値文字列を取得する
434  CString cValue;
435  if ( !GetJsonSetValue( cValue, pcJson, false, false ) ) {
436  // 失敗!
437  break;
438  }
439 
440  // 真理値を取得する
441  rbValue = ( 0 == ::wcscmp( L"true", cValue ) );
442 
443  // 成功!
444  result = true;
445  } while ( false );
446 
447  // 実行結果を返す
448  return result;
449  }
450 
451  //-------------------------------------------------------------------------
452  // JSON設定値真理値設定関数
453  bool CJsonConfig::Set( bool bValue, wchar_t const* pszKey, int nIndex ) noexcept {
454  // 処理ブロック
455  bool result = false;
456  do {
457  // JSONパスを取得する
458  CString cPath;
459  if ( !GetPath( cPath, pszKey, nIndex ) ) {
460  // 失敗!
461  break;
462  }
463 
464  // 設定値真理値を追加する
465  cPath += L" = ";
466  cPath += ( bValue? L"true": L"false" );
467 
468  // JSONパスを作成する
469  if ( !CreatePath( cPath ) ) {
470  // 失敗!
471  break;
472  }
473 
474  // 成功!
475  result = true;
476  } while ( false );
477 
478  // 実行結果を返す
479  return result;
480  }
481 
482  //-------------------------------------------------------------------------
483  // JSON設定値文字列取得関数
484  bool CJsonConfig::Get( CString& rcValue, wchar_t const* pszKey, int nIndex ) noexcept {
485  // 処理ブロック
486  bool result = false;
487  do {
488  // JSONパスを取得する
489  CString cPath;
490  if ( !GetPath( cPath, pszKey, nIndex ) ) {
491  // 失敗!
492  break;
493  }
494 
495  // JSONパスを検索する
496  CJson* pcJson = FindJsonPath( cPath, m_pcJsonCurrent );
497  if ( nullptr == pcJson ) {
498  // 失敗!
499  break;
500  }
501  // JSON設定値文字列を取得する
502  else if ( !GetJsonSetValue( rcValue, pcJson, false, false ) ) {
503  // 失敗!
504  break;
505  }
506 
507  // 成功!
508  result = true;
509  } while ( false );
510 
511  // 実行結果を返す
512  return result;
513  }
514 
515  //-------------------------------------------------------------------------
516  // JSON設定値文字列設定関数
517  bool CJsonConfig::Set( wchar_t const* pszValue, wchar_t const* pszKey, int nIndex ) noexcept {
518  // 処理ブロック
519  bool result = false;
520  do {
521  // JSONパスを取得する
522  CString cPath;
523  if ( !GetPath( cPath, pszKey, nIndex ) ) {
524  // 失敗!
525  break;
526  }
527 
528  // 設定値文字列を追加する
529  cPath += L" = ";
530  cPath += L"\"";
531  cPath += pszValue;
532  cPath += L"\"";
533 
534  // JSONパスを作成する
535  if ( !CreatePath( cPath ) ) {
536  // 失敗!
537  break;
538  }
539 
540  // 成功!
541  result = true;
542  } while ( false );
543 
544  // 実行結果を返す
545  return result;
546  }
547 
548  //-------------------------------------------------------------------------
549  // ウィンドウ表示位置復元関数
550  bool CJsonConfig::ResumeWindowPosition( HWND hWnd, wchar_t const* pszKey ) noexcept {
551  // 処理ブロック
552  bool result = false;
553  do {
554  // ウィンドウ表示位置設定値を取得する
555  int nLeft;
556  int nTop;
557  int nWidth;
558  int nHeight;
559  if ( !Get( { &nLeft, &nTop, &nWidth, &nHeight }, pszKey ) ) {
560  // 失敗!
561  break;
562  }
563 
564  // ウィンドウ表示位置を設定する
565  ::SetWindowPos( hWnd, HWND_TOP, nLeft, nTop, nWidth, nHeight, ( SWP_NOACTIVATE | SWP_SHOWWINDOW ) );
566  ::UpdateWindow( hWnd );
567 
568  // 成功!
569  result = true;
570  } while ( false );
571 
572  // 実行結果を返す
573  return result;
574  }
575 
576  //-------------------------------------------------------------------------
577  // ウィンドウ表示位置保存関数
578  bool CJsonConfig::SaveWindowPosition( HWND hWnd, wchar_t const* pszKey ) noexcept {
579  // 処理ブロック
580  bool result = false;
581  do {
582  // ウィンドウ表示状態を取得する
583  WINDOWPLACEMENT sWndPlace = { sizeof( WINDOWPLACEMENT ) };
584  if ( 0 == ::GetWindowPlacement( hWnd, &sWndPlace ) ) {
585  // 失敗!
586  break;
587  }
588 
589  // ウィンドウ表示位置を保存する
590  int nLeft = sWndPlace.rcNormalPosition.left;
591  int nTop = sWndPlace.rcNormalPosition.top;
592  int nWidth = ( sWndPlace.rcNormalPosition.right - sWndPlace.rcNormalPosition.left );
593  int nHeight = ( sWndPlace.rcNormalPosition.bottom - sWndPlace.rcNormalPosition.top );
594  if ( !Set( { nLeft, nTop, nWidth, nHeight }, pszKey ) ) {
595  // 失敗!
596  break;
597  }
598 
599  // 成功!
600  result = true;
601  } while ( false );
602 
603  // 実行結果を返す
604  return result;
605  }
606 
607  //-------------------------------------------------------------------------
608  // ウィンドウ表示状態復元関数
609  bool CJsonConfig::ResumeShowWindow( HWND hWnd, wchar_t const* pszKey ) noexcept {
610  // 処理ブロック
611  bool result = false;
612  do {
613  // ウィンドウ表示状態設定値を取得する
614  bool bVisible;
615  int nShow;
616  if ( !GetShowWindow( hWnd, bVisible, nShow, pszKey ) ) {
617  // 失敗!
618  break;
619  }
620 
621  // アクティブウィンドウを取得する
622  HWND hActive = ::GetActiveWindow();
623 
624  // ウィンドウ表示状態を調べる
625  switch ( nShow ) {
626  case SW_SHOWNORMAL:
627  // アクティブにしないでウィンドウ表示状態を設定する
628  ::ShowWindow( hWnd, SW_SHOWNOACTIVATE );
629  break;
630  case SW_SHOW:
631  // アクティブにしないでウィンドウ表示状態を設定する
632  ::ShowWindow( hWnd, SW_SHOWNA );
633  break;
634  case SW_SHOWMINIMIZED:
635  // アクティブにしないでウィンドウ表示状態を設定する
636  ::ShowWindow( hWnd, SW_SHOWMINNOACTIVE );
637  break;
638  default:
639  {
640  // ウィンドウ表示状態を設定する
641  ::ShowWindow( hWnd, nShow );
642 
643  // アクティブウィンドウを復元する
644  if ( hActive != ::GetActiveWindow() ) {
645  ::SetActiveWindow( hActive );
646  }
647  }
648  break;
649  }
650 
651  // WS_VISIBLEスタイルフラグを調べる
652  if ( !bVisible ) {
653  // ウィンドウを隠す
654  ::ShowWindow( hWnd, SW_HIDE );
655  }
656 
657  // 成功!
658  result = true;
659  } while ( false );
660 
661  // 実行結果を返す
662  return result;
663  }
664 
665  //-------------------------------------------------------------------------
666  // ウィンドウ表示状態保存関数
667  bool CJsonConfig::SaveShowWindow( HWND hWnd, wchar_t const* pszKey ) noexcept {
668  // 処理ブロック
669  bool result = false;
670  do {
671  // WS_VISIBLEスタイルフラグを取得する
672  bool bVisible = ( 0 != ::IsWindowVisible( hWnd ) );
673 
674  // ウィンドウ表示状態を取得する
675  WINDOWPLACEMENT sWndPlace = { sizeof( WINDOWPLACEMENT ) };
676  if ( 0 == ::GetWindowPlacement( hWnd, &sWndPlace ) ) {
677  // 失敗!
678  break;
679  }
680 
681  // ウィンドウ表示状態を設定する
682  int nShow = sWndPlace.showCmd;
683  if ( !SetShowWindow( hWnd, bVisible, nShow, pszKey ) ) {
684  // 失敗!
685  break;
686  }
687 
688  // 成功!
689  result = true;
690  } while ( false );
691 
692  // 実行結果を返す
693  return result;
694  }
695 
696  //-------------------------------------------------------------------------
697  // ウィンドウ表示状態取得関数
698  bool CJsonConfig::GetShowWindow( HWND hWnd, bool& rbVisible, int& rnShow, wchar_t const* pszKey ) noexcept {
699  // 処理ブロック
700  bool result = false;
701  do {
702  // ウィンドウ表示状態設定値を取得する
703  int nVisible;
704  if ( !Get( { &nVisible, &rnShow }, pszKey ) ) {
705  // 失敗!
706  break;
707  }
708 
709  // WS_VISIBLEスタイルフラグを設定する
710  rbVisible = ( 0 != nVisible );
711 
712  // 成功!
713  result = true;
714  } while ( false );
715 
716  // 実行結果を返す
717  return result;
718  }
719 
720  //-------------------------------------------------------------------------
721  // ウィンドウ表示状態設定関数
722  bool CJsonConfig::SetShowWindow( HWND hWnd, bool bVisible, int nShow, wchar_t const* pszKey ) noexcept {
723  // 処理ブロック
724  bool result = false;
725  do {
726  // ウィンドウ表示状態を保存する
727  if ( !Set( { bVisible, nShow }, pszKey ) ) {
728  // 失敗!
729  break;
730  }
731 
732  // 成功!
733  result = true;
734  } while ( false );
735 
736  // 実行結果を返す
737  return result;
738  }
739 
740  //=========================================================================
741  // 静的公開文字列定数
742  wchar_t const* const CJsonConfig::KEY_WINDOW_POS = L"ウィンドウ表示位置";
743  wchar_t const* const CJsonConfig::KEY_SHOW_WINDOW = L"ウィンドウ表示状態";
744 }
745 
746 #pragma managed( pop )
#define LogOutHeader()
関数ヘッダマクロ
Definition: LibLogOut.h:47
virtual bool Get(int &rnValue, wchar_t const *pszKey=nullptr, int nIndex=-1) noexcept
整数型設定値取得関数
virtual bool SaveWindowPosition(HWND hWnd, wchar_t const *pszKey=KEY_WINDOW_POS) noexcept
ウィンドウ表示位置保存関数
JSONドキュメントクラス
Definition: CJsonDocument.h:32
#define LogOutFooter()
関数フッタマクロ
Definition: LibLogOut.h:50
virtual bool GetShowWindow(HWND hWnd, bool &rbVisible, int &rnShow, wchar_t const *pszKey=KEY_SHOW_WINDOW) noexcept
ウィンドウ表示状態取得関数
ファイルストリームクラス
Definition: CFileStream.h:31
virtual bool Delete(wchar_t const *pszKey, int nIndex=-1) noexcept
キー設定値削除関数
JSONライブラリ名前空間
Definition: CJson.h:24
JSON構成情報クラスヘッダファイル
virtual bool IsJsonFixed() noexcept
Definition: CJson.h:145
virtual bool CreatePath(wchar_t const *pszPath) noexcept
JSONパス作成関数
static bool GetJsonSetValue(CString &rcValue, CJson *pcJson, bool bClassName=false, bool bQuotes=true) noexcept
JSON設定値文字列取得関数
virtual bool SaveShowWindow(HWND hWnd, wchar_t const *pszKey=KEY_SHOW_WINDOW) noexcept
ウィンドウ表示状態保存関数
virtual bool Open(wchar_t const *pszPath, bool bWrite=false) noexcept
オープン関数
Definition: CFile.cpp:88
virtual bool Save(wchar_t const *pszPath) noexcept
構成ファイルセーブ関数
Definition: CJsonConfig.cpp:73
static wchar_t const *const KEY_WINDOW_POS
ウィンドウ表示位置キー文字列
Definition: CJsonConfig.h:354
virtual bool Set(int nValue, wchar_t const *pszKey=nullptr, int nIndex=-1) noexcept
整数型設定値設定関数
virtual bool SetShowWindow(HWND hWnd, bool bVisible, int nShow, wchar_t const *pszKey=KEY_SHOW_WINDOW) noexcept
ウィンドウ表示状態設定関数
JSONクラス
Definition: CJson.h:44
CJsonConfig() noexcept
コンストラクタ
Definition: CJsonConfig.cpp:32
virtual wchar_t const * Format(wchar_t const *pszFormat,...) noexcept
書式設定文字列代入関数
Definition: CString.cpp:930
static CJson * FindJsonPath(wchar_t const *pszPath, CJson *pcJson) noexcept
JSONパス検索関数
virtual bool Load(wchar_t const *pszPath) noexcept
構成ファイルロード関数
Definition: CJsonConfig.cpp:41
virtual bool ResumeShowWindow(HWND hWnd, wchar_t const *pszKey=KEY_SHOW_WINDOW) noexcept
ウィンドウ表示状態復元関数
ファイルストリームクラスヘッダファイル
virtual bool OutputDocument(CStreamOut &rcStreamOut) noexcept
JSONドキュメント出力関数
virtual bool IsJsonNumber() noexcept
Definition: CJson.h:144
文字列クラス
Definition: CString.h:31
virtual bool Create(wchar_t const *pszPath, UINT uCodePage=CP_UTF16) noexcept
作成関数
Definition: CFile.cpp:52
#define NewDelLogOut()
ログ出力許可フラグ取得マクロ
Definition: LibNewDel.h:26
virtual bool GetPath(CString &rcPath, wchar_t const *pszKey=nullptr, int nIndex=-1) noexcept
JSONパス取得関数
static wchar_t const *const KEY_SHOW_WINDOW
ウィンドウ表示状態キー文字列
Definition: CJsonConfig.h:355
生成消滅演算子ライブラリヘッダファイル
virtual bool InputDocument(CStream &rcStream) noexcept
JSONドキュメント入力関数
CJson * m_pcJsonCurrent
カレントJSONクラスポインタ
ユーティリティライブラリヘッダファイル
virtual bool ResumeWindowPosition(HWND hWnd, wchar_t const *pszKey=KEY_WINDOW_POS) noexcept
ウィンドウ表示位置復元関数
static bool DeleteJson(CJson *&rpcJson) noexcept
JSONクラス削除関数
ログ出力ライブラリヘッダファイル