diff options
| author | Ben Boeckel <MathStuf@gmail.com> | 2009-01-10 19:37:11 -0500 |
|---|---|---|
| committer | Ben Boeckel <MathStuf@gmail.com> | 2009-01-10 19:37:11 -0500 |
| commit | ab29ae236cef4d1550cfb791d36083036b00fc08 (patch) | |
| tree | 821a69fe3711d39fd44d80edf824a23bfc01b887 | |
| parent | ff3dcd69c48b2a39cdef71a9a8d5ee278440da55 (diff) | |
| download | sigen-ab29ae236cef4d1550cfb791d36083036b00fc08.tar.gz sigen-ab29ae236cef4d1550cfb791d36083036b00fc08.tar.xz sigen-ab29ae236cef4d1550cfb791d36083036b00fc08.zip | |
Added Weather documentation
| -rw-r--r-- | sigmod/Weather.cpp | 4 | ||||
| -rw-r--r-- | sigmod/Weather.h | 75 |
2 files changed, 79 insertions, 0 deletions
diff --git a/sigmod/Weather.cpp b/sigmod/Weather.cpp index 77f48807..410c00cb 100644 --- a/sigmod/Weather.cpp +++ b/sigmod/Weather.cpp @@ -15,6 +15,10 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ +/** + * \file sigmod/Weather.cpp + */ + // Header include #include "Weather.h" diff --git a/sigmod/Weather.h b/sigmod/Weather.h index 175c23b8..bfce8a47 100644 --- a/sigmod/Weather.h +++ b/sigmod/Weather.h @@ -15,6 +15,10 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ +/** + * \file sigmod/Weather.h + */ + #ifndef SIGMOD_WEATHER #define SIGMOD_WEATHER @@ -29,25 +33,96 @@ namespace Sigmod // Forward declarations class Sigmod; +/** + * \class Sigmod::Weather Weather.h sigmod/Weather.h + * \brief Weathers can be used to add additional arena-wide effects in battle. + * + * Weathers can change the status of the arena with effects such as rain, snow, or sand. + */ class SIGMOD_EXPORT Weather : public Object { Q_OBJECT public: + /** + * Copy constructor. + * + * \param weather The weather to copy. + */ Weather(const Weather& weather); + /** + * Create a new weather belonging to \p parent and id \p id. + * + * \param parent The parent of the weather. + * \param id The id number for the weather. + */ Weather(const Sigmod* parent, const int id); + /** + * Data copy constructor. Copies the data from \p weather as a child of \p parent with id \p id. + * + * \param type The weather to copy the data from. + * \param parent The parent of the weather. + * \param id The id number for the weather. + */ Weather(const Weather& weather, const Sigmod* parent, const int id); + /** + * XML data constructor. + * + * \param xml The XML structure to extract the data from. + * \param parent The parent of the weather. + * \param id The id number for the weather. + */ Weather(const QDomElement& xml, const Sigmod* parent, const int id = -1); + /** + * Check to make sure the weather's values are valid. + * \note This does not check the script for validity. + */ void validate(); + /** + * Load data from XML. + * + * \param xml The XML structure to extract data from. + */ void load(const QDomElement& xml); + /** + * Get the data for the weather in XML format. + * + * \return The XML structure representing the weather. + */ QDomElement save() const; + /** + * The name of the weather. + * + * \param name The name of the weather. + */ void setName(const QString& name); + /** + * Set the script for the weather. What the weather does is defined by this script. + * The following objects are available to the script: + * + * - \b owner -- The \link Sigencore::TeamMember team member \endlink which owns the instance of the ability. + * - \b client -- The \link Sigencore::Client client \endlink which owns \b owner. + * - \b sigmod -- The \link Sigscript::SigmodWrapper wrapper \endlink for the \link Sigmod sigmod \endlink in use. + * - \b arena -- The \link Sigencore::Arena arena \endlink the ability is being used in. + * + * \param script The script for the weather. + */ void setScript(const Sigcore::Script& script); + /** + * \sa setName + * + * \return The name of the weather. + */ QString name() const; + /** + * \sa setScript + * + * \return The script for the weather. + */ Sigcore::Script script() const; bool nameCheck(const QString& name) const; |
