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

« back to all changes in this revision

Viewing changes to Ag++/OptionVec.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:
26
26
        
27
27
class OptionItem{
28
28
        public:
29
 
                enum {OPT_ACC=0x1, OPT_GCC=0x2, OPT_FILE=0x4, OPT_FILE_GCC=0xC, OPT_FILE_ACC=0x14};
30
 
                typedef int FLAG;
 
29
                enum {OPT_ACC=0x1, OPT_GCC=0x2, OPT_FILE=0x4, OPT_CONFIG=0x8};
 
30
                typedef unsigned int flag_t;
31
31
        
32
32
 
33
33
        private:
34
34
                string _name;
35
35
                string _argument;
36
 
                FLAG _flag;
 
36
                flag_t _flag;
37
37
 
38
38
        public:
39
 
                OptionItem(string name, string arg,FLAG flag):_name(name),_argument(arg),_flag(flag){}
40
 
                OptionItem(string name,FLAG flag):_name(name),_flag(flag){}
 
39
                OptionItem(string name, string arg,flag_t flag):_name(name),_argument(arg),_flag(flag){}
 
40
                OptionItem(string name,flag_t flag):_name(name),_flag(flag){}
41
41
                OptionItem(const OptionItem& opt):_name(opt._name),_argument(opt._argument),_flag(opt._flag){}
42
42
 
43
43
                const string& name(){return _name;}
46
46
                const string& arg(){return _argument;}
47
47
                void arg(string newarg){_argument=newarg;}
48
48
 
49
 
                const FLAG flag(){return _flag;}
50
 
                void flag(FLAG flag) {_flag = flag;}
 
49
                const flag_t flag(){return _flag;}
 
50
                void flag(flag_t flag) {_flag = flag;}
51
51
};
52
52
 
53
53
class OptionVec: public vector<OptionItem>{
63
63
        //OptionVec(const OptionVec& optvec):_options(optvec._options){}
64
64
        
65
65
        // Add a new Option
66
 
        void pushback(string name, string arg, OptionItem::FLAG flag);
67
 
        
68
 
//      
69
 
//      // Add a new Option
70
 
        void pushback(string name, OptionItem::FLAG flag);
71
 
 
72
 
        
73
 
        //vec_t& options(){return _options;}
 
66
        void pushback(string name, string arg, OptionItem::flag_t flag);
 
67
        
 
68
   // Add a new Option
 
69
        void pushback(string name, OptionItem::flag_t flag);
74
70
 
75
71
        const string& getString();
76
72
        
77
 
        const string& getString(OptionItem::FLAG);
 
73
   // get a string of options which have at least the flags passed with parameter
 
74
        const string& getString(OptionItem::flag_t);
 
75
        
 
76
   // get a string of options which have at least the flags passed with parameter
 
77
   // and not the flags pass as second argument
 
78
   const string& getString(OptionItem::flag_t,OptionItem::flag_t);
78
79
};
79
80
        
80
81