00001 #ifndef OPTION_H
00002 #define OPTION_H
00003
00004
00005 #include "global.h"
00006 #include <vector>
00007 using namespace std;
00013
00014
00015 class Option {
00016
00017 public:
00021 Option();
00022
00023
00027 ~Option();
00028
00032 Option operator=(const Option &o);
00033
00037 Option(const Option &o);
00038
00039 int setName(char * name, int * status);
00040 int setValue(char * value, int * status);
00041 int setOptions(vector <Option> optionList, int * status);
00042
00046 int getName(char * &name, int * status);
00047
00051 int getValue(char * &value, int * status);
00052
00057 int getOption(Option &option, int index, int *status);
00058
00062 int getNumOfOptions(int &numOfOptions, int *status);
00063
00064
00065 private:
00066 char * m_name;
00067 char * m_value;
00068 vector <Option> m_optionList;
00069
00070 void makecopy(const Option &o);
00071 void cleanup();
00072 void init(void);
00073
00074 };
00075
00076 #endif