The property was not deleting the shape object it owned, but adding the
delete was not enough. When the property is copied, it is necessary to copy
the shape object. In order to verify, add an integration test which
simulates the normal scenario of copying properites, just like in the
StatisticsPropertyintegration test.
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.
This means we have changed the code to use our shape classes to store the
data, and modified the expected Atlas format to match the more standard
way of expressing shapes in Atlas which the shape classes expect.
* rulesets/LineProperty.h, rulesets/LineProperty.cpp: Make
LineProperty store its own data.
* rulesets/AreaProperty.cpp: Adapt the way AreaProperty uses
LineProperty to take account of it storing data.
* 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.
* common/Property.h, common/Property_impl.h,
rulesets/AreaProperty.cpp, rulesets/AreaProperty.h,
rulesets/CalendarProperty.cpp, rulesets/CalendarProperty.h,
rulesets/Entity.cpp, rulesets/EntityProperties.cpp,
rulesets/LineProperty.cpp, rulesets/LineProperty.h,
rulesets/Py_Thing.cpp, rulesets/StatisticsProperty.cpp,
rulesets/StatisticsProperty.h, rulesets/TerrainProperty.cpp,
rulesets/TerrainProperty.h: Change return value of Property::get
to bool, and use it to indicate if the property has a value.