Solution46
LibCommon.cpp
[詳解]
1 //=============================================================================
2 /// @file
3 /// 共通ライブラリ実装ファイル
4 ///
5 /// 共通ライブラリ実装ファイルです。
6 ///
7 /// $Id: LibCommon.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 <LibCommon.h>
18 #include <CDebug.h>
19 #include <CConsole.h>
20 #include <CMonitor.h>
21 
22 //=============================================================================
23 // インクルード実装ファイル
24 #include <LibCommon.hpp>
25 
26 //=============================================================================
27 // 共通ライブラリ名前空間
28 namespace LibCommon {
29  //=========================================================================
30  // 共通ライブラリクラス
31  //=========================================================================
32  // 静的公開関数
33  //-------------------------------------------------------------------------
34  // プロジェクト種別取得関数
35  wchar_t const* CLibCommon::GetProjectType() noexcept {
36  // プロジェクト種別文字列を返す
37  return _PROJECT_TYPE;
38  }
39 
40  //-------------------------------------------------------------------------
41  // インスタンスハンドル取得関数
42  HINSTANCE CLibCommon::GetInstanceHandle() noexcept {
43 #if defined( _WINDLL ) && !defined( _MANAGED )
44 
45  // インスタンスハンドルを返す
46  return s_hInstance;
47 
48 # else
49 
50  // 実行モジュールのインスタンスハンドルを返す
51  return ::GetModuleHandleW( nullptr );
52 
53 # endif
54  }
55 
56  //=========================================================================
57  // デバッグ出力クラス
58  //=========================================================================
59  // 静的限定公開変数
61 
62  //=========================================================================
63  // コンソール入出力クラス
64  //=========================================================================
65  // 静的限定公開変数
67 
68  //=========================================================================
69  // モニタクラス
70  //=========================================================================
71  // 静的限定公開変数
73 }
74 
75 #pragma managed( pop )
デバッグクラスヘッダファイル
共通ライブラリ実装ヘッダファイル
static CMonitor s_cInstance
静的インスタンス
Definition: CMonitor.h:143
モニタクラスヘッダファイル
#define _PROJECT_TYPE
プロジェクト種別定義
Definition: LibCommonDef.h:88
デバッグクラス
Definition: CDebug.h:50
共通ライブラリ名前空間
Definition: CArray.h:23
static CConsole s_cInstance
静的インスタンス
Definition: CConsole.h:594
コンソール入出力クラスヘッダコンソール
static CDebug s_cInstance
静的インスタンス
Definition: CDebug.h:119
モニタクラス
Definition: CMonitor.h:37
static HINSTANCE GetInstanceHandle() noexcept
インスタンスハンドル取得関数
Definition: LibCommon.cpp:42
コンソール入出力クラス
Definition: CConsole.h:79
共通ライブラリヘッダファイル
static wchar_t const * GetProjectType() noexcept
プロジェクト種別取得関数
Definition: LibCommon.cpp:35