source: dev/trunk/ab5.0/abdev/BasicCompiler_Common/include/Program.h@ 731

Last change on this file since 731 was 719, checked in by dai, 16 years ago
  • ab_breakpoint.tmpをテンポラリディレクトリに生成するようにした。
  • pgm.tmpをユーザ空間に生成するようにした。
  • GetUserAppDir/GetIdeUserAppDir/GetAbcUserAppDirの各メソッドを用意。用途別に呼び出し側の制御を分けた。
File size: 1.7 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};
99
100extern Program program;
Note: See TracBrowser for help on using the repository browser.