Author Topic: [patch] New statistics class  (Read 3620 times)

0 Members and 1 Guest are viewing this topic.

Offline gerw

[patch] New statistics class
« on: August 12, 2009, 04:27:51 PM »
This patch introduces statistic_t, which is a small class containing the important parts for statistics. All statistics are now a statistic_t object. In addition, the statistics for world, cities and players are unlimited, i.e. they will save the _complete_ history (The charts show only the last 24 entries).

What is missing:
- a GUI + routines to save the history to a csv file.

tu-chemnitz.de/~gerw/patches/new_statistics.patch

Please tell me, if the patch applies fine with Tortoise - then I will publish my little 'git-svn-diff' script.

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4247
  • Total likes: 175
  • Helpful: 149
  • Languages: EN, DE, AT
Re: [patch] New statistics class
« Reply #1 on: August 18, 2009, 08:00:51 PM »
What an amount of work  :o

But why did you rename all the variables (ie from karte_t::get_finance_history_year() to karte_t::get_world_history_year) ? Imho the old name is much more descriptive than the new one, which contains even redundant information (ie world, convoi etc).
Parsley, sage, rosemary, and maggikraut.

Offline gerw

Re: [patch] New statistics class
« Reply #2 on: August 18, 2009, 08:09:47 PM »
But why did you rename all the variables (ie from karte_t::get_finance_history_year() to karte_t::get_world_history_year) ? Imho the old name is much more descriptive than the new one, which contains even redundant information (ie world, convoi etc).

With the renaming, you would know, what a history you get (since all histories has different entries). The old name get_finance_history_* wasn't better, imho. Renaming it to get_history_{month,year} shouldn't be much effort...

Maybe I got 'inspired' by something like
Code: [Select]
bev += (*i)->get_finance_history_month( 0, HIST_CITICENS );