00001
00002 #ifndef QUESTAO_H
00003 #define QUESTAO_H
00004
00005 #define Q_STR_RESPOSTA "resposta"
00006 #define Q_STR_TIPO "tipo"
00007
00008 #include <string>
00009 #include <iostream>
00010 #include <sstream>
00011
00012 using namespace std;
00013
00014 enum TipoQuestao { Q_GENERICA = 0 , Q_DESCRITIVA = 1 , Q_SIMNAO = 2, Q_ALTERNATIVA = 3 };
00015
00021 class Questao
00022 {
00023 public:
00024
00028 Questao (int id = 0 );
00029
00030 virtual ~Questao ( );
00031
00036 virtual void lerDados ( ) = 0;
00037
00042 string getHtml ( ) const;
00043
00049 void setEnunciado ( string new_var );
00050
00056 string getEnunciado ( ) const;
00057
00063 int getId ( ) const;
00064
00069 void setTipo ( TipoQuestao new_var );
00070
00075 TipoQuestao getTipo ( ) const;
00076
00077 private:
00078
00079 string m_enunciado;
00080 int m_id;
00081 TipoQuestao m_tipo;
00082
00087 virtual string getBodyRespHtml ( ) const = 0;
00088 };
00089
00090 #endif // QUESTAO_H