66 const char* SectionToCStr(Section section);
72 using MapPerSection = std::map<Section, Part>;
73 using Map = std::map<uint, MapPerSection>;
75 using ListRef = std::list<Part*>;
79 unsigned maxTickCount;
81 std::atomic<unsigned> tickCount;
83 unsigned lastTickCount;
86 Yuni::CString<40, false> caption;
98 pProgression.end(pPart);
107 Task& operator+=(
unsigned value)
109 pPart.tickCount += value;
141 void add(uint year, Section section,
unsigned nbTicks);
143 void add(Section section,
int nbTicks);
145 bool saveToFile(
const Yuni::String& filename,
IResultWriter& writer);
147 void setNumberOfParallelYears(uint nb);
163 Part& begin(uint year, Section section);
164 void end(Part& part);
167 class Meter final:
public Yuni::Thread::Timer
172 virtual ~Meter() =
default;
177 void taskCount(uint n);
180 virtual bool onInterval(uint)
override;
183 Progression::Part::Map parts;
186 uint nbParallelYears;
188 std::vector<Yuni::CString<256, false>> logsContainer;
194 Meter pProgressMeter;
void add(uint year, Section section, unsigned nbTicks)
Declare a new part of the progression.
Definition progression.cpp:45