| 1 |
/* |
| 2 |
Copyright (C) 2002 Kai Sterker <[email protected]> |
| 3 |
Part of the Adonthell Project <http://adonthell.nongnu.org> |
| 4 |
|
| 5 |
Dlgedit is free software; you can redistribute it and/or modify |
| 6 |
it under the terms of the GNU General Public License as published by |
| 7 |
the Free Software Foundation; either version 2 of the License, or |
| 8 |
(at your option) any later version. |
| 9 |
|
| 10 |
Dlgedit is distributed in the hope that it will be useful, |
| 11 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 |
GNU General Public License for more details. |
| 14 |
|
| 15 |
You should have received a copy of the GNU General Public License |
| 16 |
along with Dlgedit. If not, see <http://www.gnu.org/licenses/>. |
| 17 |
*/ |
| 18 |
|
| 19 |
/** |
| 20 |
* @file dlg_circle_entry.h |
| 21 |
* |
| 22 |
* @author Kai Sterker |
| 23 |
* @brief The contents of a DlgCircle. |
| 24 |
*/ |
| 25 |
|
| 26 |
#ifndef DLG_CIRCLE_ENTRY_H |
| 27 |
#define DLG_CIRCLE_ENTRY_H |
| 28 |
|
| 29 |
#include <string> |
| 30 |
|
| 31 |
/** |
| 32 |
* The %DlgCircleEntry keeps the actual contents of circle, it's |
| 33 |
* actual text, annotions of the author, the NPC it is assigned to |
| 34 |
* (if any), it's conditions and additional Python code. |
| 35 |
*/ |
| 36 |
class DlgCircleEntry |
| 37 |
{ |
| 38 |
public: |
| 39 |
DlgCircleEntry (); |
| 40 |
|
| 41 |
/** |
| 42 |
* Attribute access. |
| 43 |
*/ |
| 44 |
//@{ |
| 45 |
/** |
| 46 |
* Get the text assigned to this circle. |
| 47 |
* @return the circle's text. |
| 48 |
*/ |
| 49 |
std::string text (); |
| 50 |
/** |
| 51 |
* Get the comment assigned to this circle. |
| 52 |
* @return the circle's comments. |
| 53 |
*/ |
| 54 |
std::string annotation () { return annotation_; } |
| 55 |
/** |
| 56 |
* Get the character this circle is assigned to. |
| 57 |
* @return the circle's character. |
| 58 |
*/ |
| 59 |
std::string npc () { return npc_; } |
| 60 |
/** |
| 61 |
* Get the arbitrary code assigned to this circle. |
| 62 |
* @return the circle's code. |
| 63 |
*/ |
| 64 |
std::string code () { return code_; } |
| 65 |
/** |
| 66 |
* Get the condition this circle is based upon. |
| 67 |
* @return the circle's condition. |
| 68 |
*/ |
| 69 |
std::string condition () { return condition_; } |
| 70 |
/** |
| 71 |
* Get whether the circle may loop. |
| 72 |
* @return <b>true</b> if that's the case, <b>false</b> otherwise. |
| 73 |
*/ |
| 74 |
bool loop () { return loop_; } |
| 75 |
|
| 76 |
void setText (std::string t); |
| 77 |
void setAnnotation (std::string a) { annotation_ = a; } |
| 78 |
void setNpc (std::string n) { npc_ = n; } |
| 79 |
void setCondition (std::string c); |
| 80 |
void setCode (std::string c) { code_ = c; } |
| 81 |
void setLoop (bool l) { loop_ = l; } |
| 82 |
//@} |
| 83 |
|
| 84 |
bool hasCode () { return code_ != "" || condition_ != ""; } |
| 85 |
|
| 86 |
private: |
| 87 |
bool loop_; // whether the text may loop |
| 88 |
std::string text_; // the node's actual text |
| 89 |
std::string annotation_; // comments of the author |
| 90 |
std::string npc_; // name of the NPC this node is assigned to |
| 91 |
std::string code_; // arbitrary (Python) code |
| 92 |
std::string condition_; // condition(s) for this node |
| 93 |
}; |
| 94 |
|
| 95 |
#endif // DLG_CIRCLE_ENTRY_H |