Ticket #110 (closed: fixed)

Opened 13 years ago

Last modified 5 years ago

Alter the Algorithm factory to serve out algorithms based on name and version (not class name)

Reported by: Nick Draper Owned by: Dickon Champion
Priority: major Milestone: Iteration 7
Component: Keywords:
Cc: Blocked By:
Blocking: Tester:

Description

The current algorithm factory serves out algorithms based on the class name, This needs to be changed to work on the internal name method and the version method of the algorithm.

Steps:

  1. Change the Version method on algorithms to return an integer, not a string. You need to check that this does not break the algorithmHistory work.
  2. Alter the registration of the algorithm within the factory to use the name and version as the key (this could be done simply by some string concatenation with a seperator).
  3. Add a new map to the factory of (string alg_name, string full_key) to hold the key to the most recent algorithm
  4. Extend the methods for creating an algorithm with overloads to accept either just a name, or a name and a version.
  5. Create(name) should use the new map to look up the most recent version of an lagorithm and use that.
  6. Create(name,version) should return the requested version, but should also use the new map to see if a newer version is available and output that as an Information/warning? log message.

Change History

comment:1 Changed 13 years ago by Nick Draper

  • Owner set to Dickon Champion

comment:2 Changed 12 years ago by Dickon Champion

(In [878]) re #110

implementation of algorithm version convolution in the algorithm factory. more than one version of an algorithm can be registered

have edited tests but cannot test they all work on this crummy vista machine

need to test on the 32bit box

comment:3 Changed 12 years ago by Dickon Champion

(In [879]) re #110

fixed some of the tests to work differently, verification of others in due course

comment:4 Changed 12 years ago by Dickon Champion

(In [882]) re #110

moved macro into Algorithm.h put AlgorithmFactory::subscribe back into .h, extra test errors removed

comment:5 Changed 12 years ago by Dickon Champion

(In [883]) re #110

last case of int version

comment:6 Changed 12 years ago by Dickon Champion

(In [884]) re #110

try out declaration of Algorithm.h in AlgorithmFactory.cpp

comment:7 Changed 12 years ago by Dickon Champion

(In [886]) re #110

small typo in test function

comment:8 Changed 12 years ago by Nick Draper

(In [887]) re #110

This should work better in linux now

comment:9 Changed 12 years ago by Dickon Champion

(In [888]) re #110 stupid stupid HelloWorldAlgorithm

comment:10 Changed 12 years ago by Nick Draper

(In [889]) re #110

One more try, I'm suprised VS allowed worked without the correct scope being defined

comment:11 Changed 12 years ago by Nick Draper

(In [890]) re #110

More of the same thins but now in the cpp

comment:12 Changed 12 years ago by Dickon Champion

  • Status changed from new to closed
  • Resolution set to fixed

(In [891]) fixes #110

final fix of HelloWorldAlgorithm

comment:13 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 958

Note: See TracTickets for help on using tickets.