- Add function set_coordinates(float, float, float).
- Add function distance_to_sphere().
- Suppress calls by reference for simple types (use const float instead
of const &float).
TextFileWriter:
- OutputFileMedium becomes TextFileWriter.
- Method write_string_to_file() becomes write_text() and is made public.
- Add a unit test.
InputLogCSV and OutputCSV do not extend OutputFileMedium anymore, but
use a TextFileWriter as an attribute.
OutputCSV writes Result to a CSV file. It extends OutputFileMedium.
Update:
- Output.
- UserInterface (add option "output.csv-file").
- posexcept (add class no_output_csv_file).
OutputFileMedium is designed to be a super-class for classes that need
to write to a text file. It could also be a simple writer if the method
write_string_to_file() was public (maybe we should change that and
rename OutputFileMedium to OutputFileWriter or something like that).
InputLogCSV:
- Now extends InputLogMedium *and* OutputFileMedium.
- Make log_request() inline.
Add Positioning creation in owlps-positioning, so the program is usable,
configuration is checked in Positioning, Input and Output, and objects
are created and run normally.
UserInterface: Minor modification, config_file_name is not initialised
in constructor anymore, it is now a default value of the configuration
entry "config-file".
- Where possible, use initialisation lists in class definition instead
of explicit variable initialisations in source file.
- Rename some variables (use of "source" in copy constructors and
operators…).
- Suppress useless Doxygen comments, allow non-documented members in
Doxyfile.
In cxxtest, TS_ASSERT_DIFFERS(a, b) tests !(a == b) and not (a != b).
Therefore, to test a::operator!=(b), we must avoid TS_ASSERT_DIFFERS()
(that will test !a::operator==(b)) and write instead TS_ASSERT(a != b).
The new class Positioning is the interface between Input and Output,
using positioning algorithms to compute results from requests.
Update UserInterface to add option "positioning.algorithm"; update posexcept.
PositioningAlgorithm is the super-class of all positioning algorithms.
RealPosition is the first "positioning algorithm" (it actually computes
nothing, but returns the position declared in a CalibrationRequest).
- Replace occurences of `container.size() == 0` with
`container.empty()`.
- Fix an allocation in posexcept.cc (false positive?).
- UserInterface: in constructor, handle bad_alloc exception possibly
thrown by `new`.
InputLogCSV now handles calibration requests.
TestUtil:
- Request list become a Request pointer list (to handle polymorphism).
- Add a ReferencePoint list.
- Reorganise create_test_csv_file().
InputCSV now handles CalibrationRequest, adding position and direction
information.
Input:
- Add add_request_to_stock().
Stock:
- Add list of ReferencePoint.
- Add list of CalibrationRequest.
The new class Direction will be used to represent the direction of a
calibration request.
Update posexcept.hh to add new exception bad_direction, used in class
Direction.
InputMedium:
- Split into two files (inputmedium.{hh,cc}).
- Add polymorphic handling of CalibrationRequest.
- Write unit tests.
InputCSV:
- Use new code of InputMedium to handle calibration requests.
- We detect if the read request is a calibration request, but
specific attributes are not initialised.
Delete class CalibrationMeasurement and add class CalibrationRequest:
the ReferencePoint must be linked by the Request, not by each
Measurement of the Request.
Adapt ReferencePoint to link a CalibrationRequest instead of a
CalibrationMeasurement.
Request:
- Destructor is now virtual to allow polymorphism.
- Reactivate tests on get_measurements() and set_measurements().
Work on unit tests:
- TestUtil:
- Add set_up(), that sets up lists of Request, Mobile and AccessPoint,
primarily to be used with create_test_csv_file().
- Add public attributes for these lists.
- Update create_test_csv_file() to use these lists.
- Update InputCSV_test to use new TestUtil.
- Add class TestSetUp, a global fixture class. Before all tests off all
test suites, it calls TestUtil::set_up().
- Update and clean Makefile.
- Add files posexcept.{hh,cc} that contains exception classes.
- Add class Input, that handles InputMedium (and InputLogMedium, in the
future). Note that for the moment, the unit test is *very* minimal.
- UserInterface: Add options for the input medium and the CSV file.
Add the class TestUtil, that provides functions used in several unit
tests. For the moment, it contains two function:
- fill_file(), that creates and fills a test file.
- remove_file(), that deletes a test file.
- Add class Configuration, a stock for the configuration structure.
- Add class UserInterface, that handles the configuration input.
- Update owlps-positioning.cc (delete old stuff like configuration) and
delete owlps-positioning.hh: we now have a compilable executable.
This commit pass finally all unit tests without any warning!
Measurement:
- Finish unit test (test the average SS).
- Fix update_average_ss() and add_ss().
- average_ss is now double.
Area:
- Unit test: test inversion of points.
- Add reorder_coordinates().
- Remove all set_{x,y,z}_{min,max}() accessors.
- Remove set_p_min() and set_p_max().
- Add set_coordinates().
- The constructor now takes 2 Point3D instead of 6 float coordinates.
Point3D:
- Unit test: finish to test distances, test new cast operator.
- Add a cast to string operator.
Unit tests:
- Add valuetraits.hh with class to display correctly a Point3D in a
wrong assertion.
InputCSV:
- Add eof_close() to automatically close the file when EOF is reached.
- Add read_next_line(), that read the next non-blank line and skips
blank characters.
- Add current_line, a string containing the current line data.
- Update unit test.
InputMedium:
- Rename InputMedium::current_line to current_line_nb.