Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 11644


Ignore:
Timestamp:
Dec 8, 2017, 2:55:15 PM (6 years ago)
Author:
kuchlert
Message:

eigentlich fertig nur noch altes system entfernen

Location:
code/branches/Dialog_HS17
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • code/branches/Dialog_HS17/data/gui/layouts/Dialog.layout

    r11642 r11644  
    3131            </Window>
    3232
    33             <Window Type="MenuWidgets/StaticText" Name="orxonox/DialogAns" >
    34                 <Property Name="InheritsAlpha" Value="False" />
    35                 <Property Name="HorzFormatting" Value="HorzCentred" />
     33            <Window Type="MenuWidgets/Listbox" Name="orxonox/AnsListbox" >
    3634                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
    37                 <Property Name="VertFormatting" Value="TopAligned" />
    38                 <Property Name="UnifiedAreaRect" Value="{{0.604166,0},{0.15,0},{0.958333,0},{0.636,0}}" />
    39                 <Window Type="MenuWidgets/Listbox" Name="orxonox/AnsListbox" >
    40                     <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
    41                     <Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.225,0},{0.95,0},{0.92,0}}" />
    42                     <Event Name="ItemSelectionChanged" Function="Dialog.answer_changed" />
    43                 </Window>
     35                <Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.225,0},{0.95,0},{0.85,0}}" />
     36                <Event Name="ItemSelectionChanged" Function="Dialog.answer_changed" />
    4437            </Window>
     38       
    4539            <Window Type="MenuWidgets/Button" Name="orxonox/SayButton" >
    4640                <Property Name="Text" Value="Say" />
  • code/branches/Dialog_HS17/data/gui/scripts/Dialog.lua

    r11642 r11644  
    66P.detailsWindows = {}
    77P.showing = false
     8P.choice = 0
    89
    9 -- Design parameters
    10 P.imageHeight = 50
    11 P.detailImageSize = 100
    12 P.textHeight = 50
    13 P.buttonWidth = 50
    14 
    15 function P.onLoad()
     10function P.onLoad() --wird ausgefuert wenn Fenster geladen
    1611    P.wrapper = nil
    1712end
    1813
    19 function P.onShow()
     14function P.onShow() --wird ausgefuert wenn Dialogfenster gezeigt
    2015
    2116    orxonox.CommandExecutor:execute("setTimeFactor 0")
     
    2520end
    2621
    27 function P.onHide()
     22function P.onHide() --aufgefuert wenn Fenster geschlossen wird
    2823    orxonox.CommandExecutor:execute("setTimeFactor 1")
    2924    P.showing = false
     
    3126end
    3227
    33 function P.createDialog()
     28function P.createDialog() -- initiallisiert das Dialog Fenster, setzt Namen sowie die erste Frage mit enstprechenden Antworten
    3429
    3530    local manager = orxonox.DialogManager:getInstance()
     
    4439    questionfiled:setText(question)
    4540
    46     listboxwindow = winMgr:getWindow("orxonox/AnsListbox")
     41    local listboxwindow = winMgr:getWindow("orxonox/AnsListbox")
     42    CEGUI.toListbox(listboxwindow):resetList()
    4743
    48     local themeList = {}
    49     --[[
    50     table.insert(themeList, "Default")
    51     table.insert(themeList, "Drum n' Bass")
    52     table.insert(themeList, "8-Bit Style")
    53     table.insert(themeList, "Corny Jazz")
    54     table.insert(themeList, "Metal")
    55     --]]
     44    local ansList = {}
    5645    local anssize = manager:getSize()
    5746
    5847    for index = 0, anssize -1, 1 do
    59         table.insert(themeList, manager:getAnswer(index))
     48        table.insert(ansList, manager:getAnswer(index))
    6049    end 
    6150
    62     for k,v in pairs(themeList) do
     51    for k,v in pairs(ansList) do
    6352        item = CEGUI.createListboxTextItem(v)
    6453        item:setSelectionBrushImage(menuImageSet, "MultiListSelectionBrush")
     
    6756end
    6857
    69 function P.updateDialog()
     58function P.updateDialog()   --updated den Dialog entsprechend der Ausgeaehlten option der letzten Frage, setzt Frage und Antwortmoeglichkeiten neu
    7059    local manager = orxonox.DialogManager:getInstance()
    71     --manager:update()
     60    manager:update(P.choice)
    7261
    7362    local questionfiled = winMgr:getWindow("orxonox/Dialog/Question")
    7463    local question = manager:getQuestion()
    7564    questionfiled:setText(question)
     65
     66    local listboxwindow = winMgr:getWindow("orxonox/AnsListbox")
     67    listboxwindow:resetList()
     68
     69    local ansList = {}
     70    local anssize = manager:getSize()
     71
     72    for index = 0, anssize -1, 1 do
     73        table.insert(ansList, manager:getAnswer(index))
     74    end 
     75
     76    for k,v in pairs(ansList) do
     77        item = CEGUI.createListboxTextItem(v)
     78        item:setSelectionBrushImage(menuImageSet, "MultiListSelectionBrush")
     79        CEGUI.toListbox(listboxwindow):addItem(item)
     80    end
     81
     82    P.choice = 0
    7683end
    7784
    78 function P.answer_changed(e)
    79     -- body
     85function P.answer_changed(e)    --wird aufgerufen falls Auswahl geaendert wird und setzt enstprechenden Indexparameter 
     86    listboxwindow = winMgr:getWindow("orxonox/AnsListbox")
     87    selection = listboxwindow:getFirstSelectedItem()
     88    if selection ~= nil then
     89    P.choice = listboxwindow:getItemIndex(selection)
     90    else
     91        P.choice = 0
     92    end
    8093end
    8194
    8295
    83 function P.cleanup(destroyDetails)
    84    
     96function P.cleanup(destroyDetails)  --loest Fenster wieder auf (!nicht selbst geschrieben, nur uebernommen, eventuell nicht noetiger code)
     97
    8598    if P.wrapper ~= nil then
    8699        winMgr:destroyWindow(P.wrapper)
     
    101114
    102115
    103 function P.Button_clicked(e)
    104     local ending = orxonox.DialogManager:getInstance():endtest()
    105     orxonox.CommandExecutor:execute("OrxonoxOverlay toggleVisibility Dialog")
     116function P.Button_clicked(e)    --wird bei click auf say knopf ausgeloest, entscheidet ob Dialog schliesst oder updated und fuert entsprechen aus
     117    local ending = orxonox.DialogManager:getInstance():endtest(P.choice)
    106118   
    107119    if ending then
    108120        orxonox.CommandExecutor:execute("OrxonoxOverlay toggleVisibility Dialog")
    109    
    110    
    111121    else
    112122        P.updateDialog(index)
  • code/branches/Dialog_HS17/data/levels/DialogueShowcase2.oxw

    r11642 r11644  
    11<LevelInfo
    2  name = "DialogueShowcase2"
     2 name = "DialogShowase"
    33 description = "A level to show and test the functionality of the Dialogue module."
    44 tags = "test"
     
    3232    <Backlight position="100,0,100" visible=true frequency=0.6 amplitude=3 material="Flares/lensflare" colour="1,0,1"/>
    3333   
    34     <Dialog name="Kurt" currentQuestionId="loop">
     34    <Dialog name="Kurt" currentQuestionId="loop1">
    3535      <questions>
    36         <Question question="Soll ich dich loopen?" Id="loop">
     36        <Question question="Soll ich dich einmal loopen?" Id="loop1">
    3737          <answerIds>
    3838            <AnswerId Id="ja"/>
    3939            <AnswerId Id="nein"/>
     40            <AnswerId Id="giveItToMe"/>
     41          </answerIds>
     42        </Question>
     43        <Question question="Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua." Id="lorem">
     44          <answerIds>
     45            <AnswerId Id="end"/>
     46          </answerIds>
     47        </Question>
     48        <Question question="Soll ich dich nochmal loopen?" Id="loop2">
     49          <answerIds>
     50            <AnswerId Id="ja"/>
     51            <AnswerId Id="nein"/>
     52            <AnswerId Id="end"/>
    4053          </answerIds>
    4154        </Question>
     
    4356      </questions>
    4457      <answers>
    45         <Answer Id="ja" answer="ja loop mich" nextQuestionId="loop"/>
     58        <Answer Id="giveItToMe" answer="Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet." nextQuestionId="lorem"/>
     59        <Answer Id="ja" answer="ja loop mich" nextQuestionId="loop2"/>
    4660        <Answer Id="nein" answer="lieber nicht" nextQuestionId="ok"/>
     61        <Answer Id="end" answer="ich geh dann mal" nextQuestionId=""/>
    4762      </answers>
    4863      <events>
     
    5267      </events>
    5368    </Dialog>
    54 
    55     <DistanceTrigger name="test1" position="100,0,-100" target="Pawn" distance=25 stayActive="true" />
    56     <Backlight position="100,0,-100" visible=true frequency=0.6 amplitude=3 material="Flares/lensflare" colour="1,1,1"/>
    5769   
    58     <NextQuestion  question="Hey,  sorry to bother you,  could you help me with something?" a1="Yeah sure." a2="Nope get lost." >
    59      <possibleQuestions>
    60         <NextQuestion  question="Do you like fish" a1="...yes?" a2="This is wasting my time." >
    61         <possibleQuestions>
    62           <NextQuestion  question="Splendid! Would you like your ship to look like one?" a1="..." a2="I'm going now,  okay?" />
    63           <NextQuestion  question="Turtles then?" a1="..." a2="Im going now,  okay?" />
    64         </possibleQuestions>
    65         </NextQuestion>
    66         <NextQuestion  question="I can pay you know." a1="Got enough money." a2="...are you deaf? Bye."/>
    67       </possibleQuestions>   
    68       <events>
    69         <execute>
    70            <EventListener event="test1" />
    71         </execute>
    72       </events>
    73     </NextQuestion>
    74 
    75    
    76 
    7770    <Light type=directional position="0,0,0" direction="0.253, 0.593, -0.765" diffuse="1.0, 0.9, 0.9, 1.0" specular="1.0, 0.9, 0.9, 1.0"/>
    7871    <SpawnPoint team=0 position="-200,0,0" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipescort />
  • code/branches/Dialog_HS17/src/modules/dialog/Answer.cc

    r11611 r11644  
    2323        }
    2424
    25         void Answer::setAnswerId(std::string answerId){
     25        void Answer::setAnswerId(const std::string& answerId){
    2626                this->answerId_ = answerId;
    2727        }
    2828
    29         std::string Answer::getAnswerId(){
     29        const std::string& Answer::getAnswerId() const
     30        {
    3031                return this->answerId_;
    3132        }
    3233
    33         void Answer::setNextQuestion(std::string nextId)
     34        void Answer::setNextQuestion(const std::string& nextId)
    3435        {
    3536                this->nextQuestionId_ = nextId;
    3637        }
    3738
    38         std::string Answer::getNextQuestion()
     39        const std::string& Answer::getNextQuestion() const
    3940        {
    4041                return this->nextQuestionId_;
    4142        }
    4243
    43         void Answer::setAnswer(std::string answer)
     44        void Answer::setAnswer(const std::string& answer)
    4445        {
    4546                this->answer_ = answer;
    4647        }
    4748
    48         std::string Answer::getAnswer()
     49        const std::string& Answer::getAnswer() const
    4950        {
    5051                return this->answer_;
  • code/branches/Dialog_HS17/src/modules/dialog/Answer.h

    r11611 r11644  
    1818                        virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    1919
    20                         void setAnswerId(std::string answerId);
    21                         std::string getAnswerId();
     20                        void setAnswerId(const std::string& answerId); //xmlPort-Funktion, setzt AntwortId
     21                        const std::string& getAnswerId() const; //xmlPort-Funktion,     gibt AntwortId
    2222
    23                         void setNextQuestion(std::string nextId); // "end" um den dialog zu beenden
    24                         std::string getNextQuestion();
     23                        void setNextQuestion(const std::string& nextId); //xmlPort-Funktion, um Dialog zu beenden tag benutzen der von keiner Frage benutzt wird
     24                        const std::string& getNextQuestion() const;     //xmlPort-Funktion, gibt Id der Folgefrage
    2525
    26                         void setAnswer(std::string awns);
    27                         std::string getAnswer();
     26                        void setAnswer(const std::string& awns);        //xmlPort-Funktion, setzt Antworttext
     27                        const std::string& getAnswer() const;   //xmlPort-Funktion,     gibt Antworttext
    2828
    2929                private:
  • code/branches/Dialog_HS17/src/modules/dialog/AnswerId.cc

    r11611 r11644  
    1919        }
    2020
    21         void AnswerId::setId(std::string id)
     21        void AnswerId::setId(const std::string& id)
    2222        {
    2323                this->id_ = id;
    2424        }
    2525       
    26         std::string AnswerId::getId()
     26        const std::string& AnswerId::getId() const
    2727        {
    2828                return this->id_;
  • code/branches/Dialog_HS17/src/modules/dialog/AnswerId.h

    r11611 r11644  
    1616                        virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    1717
    18             void setId(std::string Id);
    19             std::string getId();
     18            void setId(const std::string& Id);  //allows to set Id, only use in xmlPort for initializing AnswerIds in lvl files
     19            const std::string& getId() const;   //allows to get Id, used in xmlPort
    2020
    2121                private:
  • code/branches/Dialog_HS17/src/modules/dialog/Dialog.cc

    r11642 r11644  
    3535    }
    3636
    37         void Dialog::setName(std::string name)
     37        void Dialog::setName(const std::string& name)
    3838        {
    3939                this->name_ = name;
    4040        }
    4141
    42         std::string Dialog::getName()
     42        const std::string& Dialog::getName() const
    4343        {
    4444                return this->name_;
    4545        }
    4646
    47         void Dialog::setCurrentQuestionId(std::string questionId)
     47        void Dialog::setCurrentQuestionId(const std::string& questionId)
    4848        {
    4949                this->currentQuestionId_ = questionId;
    5050        }
    5151
    52         std::string Dialog::getCurrentQuestionId()
     52        const std::string& Dialog::getCurrentQuestionId() const
    5353        {
    5454                return this->currentQuestionId_;
     
    6161        }
    6262
     63        const Question* Dialog::getQuestion() const // returned nichts
     64        {
     65                return nullptr;
     66        }
     67
    6368        void Dialog::addAnswer(Answer* answer) //fuegt Answer der Map hinzu
    6469        {
     
    6671        }
    6772
    68         Question* Dialog::getQuestion(unsigned int index) const // returned nichts
     73        const Answer* Dialog::getAnswer(unsigned int index) const       //returned sting der Antwort zur Id.
    6974        {
    7075                return nullptr;
    71                 // Question question = (questions_.find(this->currentQuestionId_))->second;
    72                 // return question.getQuestion();
    7376        }
    7477
    75         Answer* Dialog::getAnswer(unsigned int index) const     //returned sting der Antwort zur Id.
    76         {
    77                 return nullptr;
    78                 // return (this->answers_.find(answerId))->second.getAnswer();
    79         }
    8078
    81         std::vector<std::string>* Dialog::getAnswerIds() // returned vector mit allen momentanen AntwortenIds
     79        const std::vector<std::string>* Dialog::getAnswerIds() // returned vector mit allen momentanen AntwortenIds
    8280        {
    8381               
    8482                Question* question = (this->questions_.find(this->currentQuestionId_))->second;
    85                 std::vector<std::string>* answers = question->getAnswerIds();
     83                const std::vector<std::string>* answers = question->getAnswerIds();
    8684                return answers;
    8785               
     
    103101    }
    104102
    105     void Dialog::update(std::string givenAnswer)
     103    void Dialog::update(const std::string& givenAnswerId)
    106104    {
    107         Answer* answer = (answers_.find(givenAnswer))->second;
     105        Answer* answer = (answers_.find(givenAnswerId))->second;
    108106        this->currentQuestionId_ = answer->getNextQuestion();
    109107    }
    110108
    111     bool Dialog::ending() //retruned true wenn die Id der Antwort end ist oder keine Antworten auf die frage eingetragen sind
     109    bool Dialog::ending(const std::string& givenAnswerId)
    112110    {
    113         bool end = false;
    114         if ((this->questions_.find(this->currentQuestionId_)->second)->getAnswerIds()->empty()){
    115                 end = true;
    116         }       
    117         return end;
     111        return !this->questions_.count(this->answers_.find(givenAnswerId)->second->getNextQuestion());
    118112    }
    119113
    120         std::string Dialog::getQuestionString()
     114        const std::string& Dialog::getQuestionString()
    121115        {
    122116                return this->questions_.find(this->currentQuestionId_)->second->getQuestion();
    123117        }
    124118
    125         std::string Dialog::getAnswerString(std::string answerId)
     119        const std::string& Dialog::getAnswerString(std::string answerId)
    126120        {
    127121                return this->answers_.find(answerId)->second->getAnswer();
  • code/branches/Dialog_HS17/src/modules/dialog/Dialog.h

    r11642 r11644  
    2424                        virtual void XMLEventPort(Element& xmlelement, XMLPort::Mode mode);
    2525
    26                         void setName(std::string name);
    27                         std::string getName();
     26                        void setName(const std::string& name);  //xmlPort-Funktion, setzt Namen
     27                        const std::string& getName() const;     //xmlPort-Funktion, returnt Namen
    2828
    29                         void setCurrentQuestionId(std::string questionId);
    30                         std::string getCurrentQuestionId();
     29                        void setCurrentQuestionId(const std::string& questionId);       //xmlPort-Funktion, setzt string Id der momentanen Frage
     30                        const std::string& getCurrentQuestionId() const;        //xmlPort-Funktion, gibt Id der momentanen Frage
    3131
    32                         void addQuestion(Question* question); //fuegt Question der Map hinzu
    33                         void addAnswer(Answer* answer); //fuegt Answer der Map hinzu
     32                        void addQuestion(Question* question); //xmlPort-Funktion, fuegt Question der Map hinzu
     33                        const Question* getQuestion() const; //xmlPort-Funktion, returnt nullptr
    3434
    35                         Question* getQuestion(unsigned int index) const; // // benoetigt fuer xmlPort
    36                         Answer* getAnswer(unsigned int index) const; // benoetigt fuer xmlPort
    37                         std::vector<std::string>* getAnswerIds();       // returned vector mit allen momentanen AntwortenIds
     35                        void addAnswer(Answer* answer); //xmlPort-Funktion, fuegt Answer der Map hinzu
     36                        const Answer* getAnswer(unsigned int index) const; //xmlPort-Funktion, returnt nullptr
    3837
    39                         bool execute(bool bTriggered, BaseObject* trigger);
    4038
    41                         void update(std::string givenAnswer);
     39                        const std::vector<std::string>* getAnswerIds();         // returned Pointer auf Vector mit allen momentanen AntwortenIds
    4240
    43                         bool ending(); //retruned true wenn die Id der Antwort end ist oder keine Antworten auf die frage eingetragen sind
     41                        bool execute(bool bTriggered, BaseObject* trigger); // funktion die aufgerufen wird wenn der im xml verbundene Trigger aktiviert wird
    4442
    45                         std::string getQuestionString(); //gibt string der momentanen Frage
    46                         std::string getAnswerString(std::string answerId); //gibt string der zur Id passenden Frage
     43                        void update(const std::string& givenAnswerId);  //setzt die naechste Frage entsprechend der gegebenen antwortId
     44
     45                        bool ending(const std::string& givenAnswerId); //ist true falls fuer die gegebene AntwortId keine Frage zur FragenId der Antwort existiert
     46
     47                        const std::string& getQuestionString(); //gibt string der momentanen Frage
     48                        const std::string& getAnswerString(std::string answerId); //gibt string der zur Id passenden Frage
    4749
    4850                private:
  • code/branches/Dialog_HS17/src/modules/dialog/DialogManager.cc

    r11642 r11644  
    2929    int DialogManager::getSize()
    3030    {   
    31         return 2; //return this->answerIds_->size();
     31        return this->answerIds_->size();
    3232    }
    3333
     
    4242    }
    4343
    44     bool DialogManager::endtest()
    45     {
    46         return this->currentTalk_->ending();
     44    bool DialogManager::endtest(int index)
     45    {   
     46        if(this->answerIds_->empty())
     47        {
     48            return true;
     49        }
     50        else
     51        {
     52            return this->currentTalk_->ending(this->answerIds_->at(index));
     53        }
     54
    4755    }
    4856
  • code/branches/Dialog_HS17/src/modules/dialog/DialogManager.h

    r11642 r11644  
    2222        DialogManager();
    2323       
    24 
     24        //gibt lua den pointer auf den Manager
    2525        static DialogManager& getInstance() { return Singleton<DialogManager>::getInstance(); } //tolua_export
    2626
     27        //setzt den momentanen Dialog auf den uebergebenen, wird vom Dialog verwendet um bei Trigger event sich selbst zu setzen
    2728        void setDialog(Dialog* dialog);
    2829
    29         //from here on luafunctionality is declared
     30        //von hier an sind lua funktionalitaeten definiert
    3031
     32        //gibt den string der momentanen Frage des Dialogs
    3133        std::string getQuestion(); //tolua_export
     34
     35        //gibt die laenge des Antwort-arrays der momentanen zuruek, 0 falls es leer ist
    3236        int getSize(); //tolua_export
     37
     38        //gibt den sting zu einer Frage im antwortarray der momentanen Frage
    3339        std::string getAnswer(int index); //tolua_export
     40
     41        //gibt den Namen der Person mit der man spricht
    3442        std::string getPerson(); //tolua_export
    35         bool endtest(); //tolua_export
     43
     44        //testet ob der dialog weiter geht, true wenn es keine weitere Frage nach der Antwort kommt oder keine Antwort zur Frage existiert
     45        bool endtest(int index); //tolua_export
     46
     47        //updated den Dialog so dass er auf die Antwort die im Antwortvector am index steht reagiert
    3648        void update(int index); //tolua_export
    3749
     
    4052
    4153    Dialog* currentTalk_;
    42     std::vector<std::string>* answerIds_;
     54    const std::vector<std::string>* answerIds_;
    4355
    4456    };//tolua_export
  • code/branches/Dialog_HS17/src/modules/dialog/Question.cc

    r11642 r11644  
    2222        }
    2323
    24         void Question::setQuestionId(std::string Id)
     24        void Question::setQuestionId(const std::string& Id)
    2525        {
    2626                this->questionId_ = Id;
    2727        }
    2828
    29         std::string Question::getQuestionId()
     29        const std::string& Question::getQuestionId() const
    3030        {
    3131                return this->questionId_;
    3232        }
    3333
    34         void Question::setQuestion(std::string question)
     34        void Question::setQuestion(const std::string& question)
    3535        {
    3636                this->question_ = question;
    3737        }
    3838
    39         std::string Question::getQuestion()
     39        const std::string& Question::getQuestion() const
    4040        {
    4141                return this->question_;
     
    4747        }
    4848
    49         AnswerId* Question::getAnswerId(unsigned int index) const
     49        const AnswerId* Question::getAnswerId() const
    5050        {
    5151                return nullptr;
    5252        }
    5353
    54         std::vector<std::string>* Question::getAnswerIds()
     54        const std::vector<std::string>* Question::getAnswerIds()
    5555        {
    5656                return &(this->answerIds_);
  • code/branches/Dialog_HS17/src/modules/dialog/Question.h

    r11642 r11644  
    2020                        virtual void XMLPort(Element& xmelement, XMLPort::Mode mode);
    2121
    22                         void setQuestionId(std::string Id);
    23                         std::string getQuestionId();
     22                        void setQuestionId(const std::string& Id);      //xmlPort-Funktion, setzt Id
     23                        const std::string& getQuestionId() const;       //xmlPort-Funktion, gibt Id string zuruek
    2424
    25                         void setQuestion(std::string question);
    26                         std::string getQuestion();
     25                        void setQuestion(const std::string& question);  //xmlPort-Funktion, setzt Fragen string
     26                        const std::string& getQuestion() const; //xmlPort-Funktion, gibt Fragen string
    2727
    28                         void addAnswerId(AnswerId* answerId); //leer lassen um Dialog zu beenden
    29                         AnswerId* getAnswerId(unsigned int index) const;
     28                        void addAnswerId(AnswerId* answerId);   //xmlPort-Funktion, nimmt AnswerIds von entsprechenden Objekten und fuegt sie in List ein.
     29                        const AnswerId* getAnswerId() const;    //xmlPort-Funktion, gibt nichts zuruek
    3030
    31                        
    32                         //braucht es getAnswerId oder reicht es andere funktion anzugeben,
    33                         // die sowieso gebraucht wird?
    34 
    35                         std::vector<std::string>* getAnswerIds(); //returnt vektor mit allen Ids
     31                        const std::vector<std::string>* getAnswerIds(); //returnt Pointer auf Vektor mit allen Ids
    3632
    3733
Note: See TracChangeset for help on using the changeset viewer.