Since some properties are class properties without any state we need to
add a "remove" method to call, rather than putting cleanup logic in the
destructor.
All IG code should use the interface of LocatedEntity when dealing
with any entity, rather than sometimes requiring Entity. Add virtual
functions to the interface where required, and modify all other interfaces
to stop them using Entity. This makes the code way cleaner, and much better
de-coupled.
* common/Property.h, common/Property_impl.h, common/Property.cpp:
Re-write the core property classes to embed their own data,
rather than refer to it. This makes DynamicProperty obsolete.
* common/Property.h, common/Property.cpp: Add a soft property class,
which can take values of any type.
* rulesets/Entity.cpp: Use soft property for any values for which
there is no assigned property factory, and avoid using raw atlas
attributes completely.
* common/Property.cpp: Add some specialisations that are useful
to cover in the tests, even though we are not using them in
the server yet.
* common/inheritance.h: Provide an accessor for the dictionary of
class objects for testing purposes.
* rulesets/AreaProperty.cpp: Use Map() rather than isMap() once we
have already tested it.
* rulesets/Entity.cpp: Remove some debug output.
* server/CorePropertyManager.cpp: Remove some debug output.
* tests/PropertyExerciser.h, tests/PropertyExerciser.cpp: Fill out
the functionality of the property tester. Add functions to get
random values. Use vector for value storage to make it easier
to generate the random values.
* tests/AllPropertytest.cpp: Cover all the property classes we can
test.
* tests/Makefile.am: Add mercator libraries to the property test,
as we are now testing the terrain property.
* Doxyfile: Add tools to the documented code.
* index.dox: Update documentation index.
* tools/cycmd.cpp: Add a document page for this tool.
* common/DynamicProperty.h, common/Property.cpp, common/Property.h,
rulesets/AreaProperty.h, rulesets/CalendarProperty.h,
rulesets/EntityProperty.h, rulesets/LineProperty.h,
rulesets/StatisticsProperty.h, rulesets/TerrainProperty.h:
Add all property classes into a property group.
* common/AtlasFileLoader.cpp, common/Database.cpp,
common/FormattedXMLWriter.cpp, common/Property.cpp,
common/accountbase.cpp, rulesets/Character.cpp,
rulesets/Entity_getLocation.h, rulesets/MemMap.cpp,
rulesets/Pedestrian.cpp, rulesets/Plant.cpp,
rulesets/Py_Object.cpp, rulesets/Thing.cpp,
server/Admin.cpp, server/Connection.cpp, server/EntityFactory.cpp,
server/WorldRouter.cpp, tools/AdminClient.cpp, tools/cycmd.cpp,
tools/cyconvertrules.cpp: After an Element has been checked
with isFoo(), it is more efficient to get its value using Foo()
rather than asFoo() which repeats the check.
* common/Property.cpp, rulesets/EntityProperties.cpp,
server/Persistor.cpp, server/Restorer.cpp, tools/cycmd.cpp:
Tweak template code to work with stricter standard compliance
of gcc 4.
* rulesets/Character.h, rulesets/Character.cpp: static const
members need to be defined in the .cpp to satisfy all compilers.
* common/OOGThing.cpp, common/Property.cpp, common/Property.h,
common/Property_impl.h, common/inheritance.h, common/operations.cpp,
rulesets/World.cpp: Update some comments.
* rulesets/Task.h, rulesets/Task.cpp, tests/Tasktest.cpp,
rulesets/Fell.h, rulesets/Fell.cpp: New Task interface for
tasks which take a while to complete. Sample implentation provided
in the form of a Fell task for felling trees.
* rulesets/Character.cpp, rulesets/Character.h: Try out Task
implementation with Fell.
* common/Property.cpp, common/Property.h, common/Property_impl.h:
Add a default add() method to the Property base class, as its
often the same in derived classes.
* rulesets/TerrainProperty.cpp, rulesets/TerrainProperty.h:
Remove add() method, as its now covered by the default in
the base class.
* rulesets/Entity.cpp: Fix for loop not to create temporary for
end() on every iteration.
* common/Property.cpp: Add required type checks to property set
methods.
* modules/Location.cpp: Don't send LOC attribute when the
pointer is NULL.
* rulesets/EntityProperties.cpp: Add a Property specialisation
for list of IDs.
* rulesets/MemMap.cpp: Fix the memory code to use the correct
PARENTS attribute rather than type, which is not an Atlas
attribute.
* tests/IGEntityExerciser.h: Add debugging output to attribute
checks.
* common/Property.cpp, common/Property.h, common/Property_impl.h:
Add new ImmutableProperty for properties that cannot be
modified, and hold a const reference.
* rulesets/EntityProperties.cpp: Add some specialisations of
Property to handle attributes of Entity.
* rulesets/LineProperty.h, rulesets/LineProperty.cpp:
Property class for handling linear list of coordinates.
* rulesets/TerrainProperty.cpp, rulesets/TerrainProperty.h:
Property class for handling Mercator terrain.
* common/Property.cpp, common/Property.h, common/Property_impl.h:
New class to automate and simplify handled of hard coded
proerties.
* tests/Propertytest.cpp: Test for new Property class.