mirror of
https://github.com/worldforge/cyphesis
synced 2026-08-13 12:26:04 -04:00
* common/const.h: Make the coments doxygen compatable. * rulesets/Character.cpp: Add comments to document tool use. * rulesets/Fell.cpp, rulesets/Fell.h, rulesets/Task.cpp, rulesets/Task.h: Add reference to Character to base Task class, and setup() method for task initiation. * tests/Tasktest.cpp: Update task test for new changes. * tests/randomtest.cpp, tests/consttest.cpp: New tests for random and const headers.
27 lines
833 B
C++
27 lines
833 B
C++
// This file may be redistributed and modified only under the terms of
|
|
// the GNU General Public License (See COPYING for details).
|
|
// Copyright (C) 2004 Alistair Riddoch
|
|
|
|
#include "Task.h"
|
|
|
|
/// \brief Task constructor for classes which inherit from Task
|
|
Task::Task(Character & chr) : m_obsolete(false), m_character(chr)
|
|
{
|
|
}
|
|
|
|
/// \brief Task destructor
|
|
Task::~Task()
|
|
{
|
|
}
|
|
|
|
/// \brief Set the obsolete flag indicating that this task is obsolete
|
|
///
|
|
/// The task should be checked to see if it is irrelevant before any
|
|
/// processing is passed to it. A typical example is the Task may
|
|
/// contain references to entities which are deleted. irrelevant() could
|
|
/// be connected to the destroyed signal of the entities, so that it
|
|
/// never de-references the pointers to deleted entities.
|
|
void Task::irrelevant()
|
|
{
|
|
m_obsolete = true;
|
|
}
|