source: dev/branches/egtra/ab5.0/abdev/BasicCompiler_Common/include/Program.h

Last change on this file was 817, checked in by イグトランス (egtra), 14 years ago

compilerにおいて、各クラスのコピー禁止を明確化、ならびにコピー可能なものにムーブコンストラクタ・ムーブ代入演算子を追加。

File size: 1.8 KB
Line 
1#pragma once
2
3class Program
4{
5 std::string sourceFilePath;
6 std::string outputFilePath;
7
8 bool isKickedFromEditor;
9 bool isShowDlg;
10 bool isDebugRun;
11 bool isAttach;
12 DWORD attachProcessId;
13 bool isClipCompileView;
14 std::string includeDir;
15
16public:
17 static Jenga::Common::Logger logger;
18
19 Program()
20 : isKickedFromEditor( false )
21 , isShowDlg( false )
22 , isDebugRun( false )
23 , isAttach( false )
24 , attachProcessId( 0 )
25 , isClipCompileView( false )
26 {
27 }
28
29 void Configurate();
30
31 bool AnalysisCommandLines();
32
33 // ユーザデータ格納用のディレクトリを取得
34 static const std::string GetAbcUserAppDir();
35
36 const std::string &GetSourceFilePath() const
37 {
38 return sourceFilePath;
39 }
40 void SetSourceFilePath( const std::string &sourceFilePath )
41 {
42 this->sourceFilePath = sourceFilePath;
43 }
44 const std::string &GetOutputFilePath() const
45 {
46 return outputFilePath;
47 }
48 const std::string GetOutputFileName() const
49 {
50 Jenga::Common::Path path( outputFilePath );
51 return path.GetFileName() + path.GetExt();
52 }
53 void SetOutputFilePath( const std::string &outputFilePath )
54 {
55 this->outputFilePath = outputFilePath;
56 }
57
58 bool IsKickedFromEditor() const
59 {
60 return isKickedFromEditor;
61 }
62
63 bool IsShowDlg() const
64 {
65 return isShowDlg;
66 }
67
68 bool IsDebugRun() const
69 {
70 return isDebugRun;
71 }
72
73 bool IsAttach() const
74 {
75 return isAttach;
76 }
77
78 DWORD GetAttachProcessId() const
79 {
80 return attachProcessId;
81 }
82
83 bool IsClipCompileView() const
84 {
85 return isClipCompileView;
86 }
87
88 const std::string &GetIncludeDir() const
89 {
90 return includeDir;
91 }
92 void SetIncludeDir( const std::string &includeDir )
93 {
94 this->includeDir = includeDir;
95 }
96
97 int GetExitCode() const;
98
99private:
100 Program(Program const&);
101 Program& operator =(Program const&);
102};
103
104extern Program program;
Note: See TracBrowser for help on using the repository browser.