~ubuntu-branches/ubuntu/maverick/aspectc++/maverick

« back to all changes in this revision

Viewing changes to Ag++/AGxxConfig.h

  • Committer: Bazaar Package Importer
  • Author(s): Reinhard Tartler
  • Date: 2008-04-10 17:40:52 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20080410174052-xdnsm7oi8hauyyf1
Tags: 1.0pre4~svn.20080409+dfsg-3
Fix another missing include, this time in Ag++/StdSystem.cc

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
 
42
42
private:
43
43
        
 
44
        
 
45
        // parse options
 
46
        bool parseOptions();
 
47
   
 
48
   // parse some special g++ options
 
49
        bool parseGccOpt(OptsParser&);
 
50
        
 
51
   // analyze options
 
52
        bool analyzeOptions();
 
53
        
 
54
        
 
55
        //print a usage message
 
56
        void usage() const;
 
57
   
 
58
        
 
59
 
44
60
        ErrorStream &_err;
45
61
        int _argc;
46
62
        char** _argv; 
55
71
        string _output_file;
56
72
 
57
73
        // name of puma config file
58
 
        string _puma_config;
 
74
        string _pumaconfig_file;
59
75
        
60
76
        // path to aspectc++ compiler
61
77
        string _acc_bin;
79
95
        
80
96
        // verbose
81
97
        int _verbose;
82
 
        
83
 
        // generate include files
84
 
        bool _gen_incl;
85
 
 
86
 
        // indicate wether a config file should be generated
 
98
 
 
99
 
 
100
   // indicate wether a config file should be generated
87
101
        bool _gen_pumaconfig;
88
102
        
89
103
        // indicate wether weaving should be done
90
104
        bool _weave;
91
105
        
 
106
   // indicate wether linking should be done
 
107
        bool _link;
 
108
        
92
109
        // indicate wether compiling should be done
93
110
        bool _compile;
94
 
        
 
111
   
 
112
   
 
113
   
 
114
   // use temporary file for puma config file
 
115
        bool _pumaconfig_tmp;
 
116
   
 
117
   // do weave the source files (no compiling or linking)
 
118
        bool _weave_only;
 
119
        
 
120
        // generate include files
 
121
        bool _gen_incl;
 
122
        
 
123
   // if include files are generated
 
124
        bool _gen_includes;
 
125
   
 
126
   // do only compile not link (but weave)
 
127
        bool _compile_only;
 
128
 
95
129
        // indicate wether dependency information should be printed out
96
130
        bool _make_dep;
97
131
        
98
 
        // indicate wether linking should be done
99
 
        bool _link;
100
 
        
101
 
        // keep weaved source code  files
102
 
        bool _keep_acc;
103
 
        
104
 
        // if include files are generated
105
 
        bool _gen_includes;
106
 
 
 
132
        // keep woven source code  files
 
133
        bool _keep_woven;
 
134
        
107
135
        // assign all following options to the compiler
108
136
        bool _x_compiler;
109
137
        
111
139
        static  string _gcc_option_arg[];
112
140
        
113
141
        
114
 
        
115
142
public:
116
143
        AGxxConfig(ErrorStream &e,int argc,char **argv):_err(e),_argc(argc),_argv(argv){}
117
144
        
118
145
        ~AGxxConfig(){}
119
146
                
120
147
        enum {
121
 
                AGOPT_COMPILE_ONLY=1,AGOPT_WEAVE,AGOPT_GEN_CFG,AGOPT_OUTPUT,AGOPT_ACC,AGOPT_CC,
122
 
                AGOPT_HELP,AGOPT_KEEP_ACC, AGOPT_CONFIG_COMMAND,AGOPT_X_COMPILER,AGOPT_X_WEAVER,
 
148
                AGOPT_COMPILE_ONLY=1,AGOPT_WEAVE_ONLY,AGOPT_GEN_CFG,AGOPT_OUTPUT,AGOPT_ACC,AGOPT_CC,
 
149
                AGOPT_HELP,AGOPT_KEEP_WOVEN, AGOPT_CONFIG_COMMAND,AGOPT_X_COMPILER,AGOPT_X_WEAVER,
123
150
                AGOPT_VERBOSE, AGOPT_VERSION, 
124
151
                // Ac++ options
125
152
                ACOPT, // default handling for AspectC++ options
134
161
        
135
162
        // anaylze the arguments
136
163
        bool analyze();
137
 
        
138
 
        // print Options
 
164
   
 
165
   // print Options
139
166
        void printOptions();
140
167
        
141
 
        // anaylze g++ options
142
 
        bool analyzeGccOpt(OptsParser&);
143
 
        
144
 
        //print a usage message
145
 
        void usage() const;
146
168
        
147
169
        //
148
170
        // Methods for accesing private data
159
181
        
160
182
        const bool link(){return _link;}
161
183
        
162
 
        const bool keep_acc(){return _keep_acc;}
 
184
        const bool keep_woven(){return _keep_woven;}
163
185
        
164
186
        const bool gen_includes(){return _gen_includes;}
165
187
        
173
195
        
174
196
        FileCont& proj_paths(){return _proj_path;}
175
197
 
176
 
        const string& puma_config(){return _puma_config;}
177
 
        void puma_config(const string& s){_puma_config=s;}
 
198
        const string& pumaconfig_file(){return _pumaconfig_file;}
 
199
        void pumaconfig_file(const string& s){_pumaconfig_file=s;}
 
200
        
 
201
   const bool& pumaconfig_tmp(){return _pumaconfig_tmp;}
178
202
 
179
203
        const string& output_file(){return _output_file;}
180
204
        void output_file(const string& s){_output_file=s;}
187
211
        
188
212
        string& config_command(){return _config_command;}
189
213
        
 
214
   //
 
215
        // Helper methods
 
216
        //
 
217
   
 
218
   static inline string& str_replace_all(string& input_str,const string search_str,const string replace_str)
 
219
   {
 
220
      string::size_type pos = input_str.find(search_str,0);
 
221
      while( pos != string::npos)
 
222
      {
 
223
         input_str.replace(pos,search_str.length(),replace_str);
 
224
         pos=input_str.find('"',pos+2);
 
225
      }
 
226
      return input_str;
 
227
   }
190
228
        
191
229
};      
192
230