Added abstract base class History, so StaticLengthHistory and DynamicLengthHistory can inherit from it
Description
Description
Details
Details
- Auditors
• juhasz goetzinger - Provenance
• btutzer Authored on May 15 2019, 2:10 PM • btutzer Pushed on May 15 2019, 2:10 PM - Parents
- R20:ac04eeeb6325: Coding style fixes
- Branches
- Unknown
- Tags
Event Timeline
Comment Actions
Please have a look. History is now an abstract class and StaticLengthHistory and DynamicLengthHistory inherit from it.
@juhasz this branch also fixes some cosmetics that clang-tidy complained about. If any of them were intentional please let me know and I'll revert them.
Comment Actions
I had a quick look, and it seems OK except for my inline comment about History::~History().
I also wonder why History::lengthOfHistory and History::policyOfHistory? I think simply History::length() and History::policy() would be just as understandable and much less characters.
Thanks for the cosmetic fixes! There were nothing intentional about them. (Intentionally diverging from the coding standard would be done by explicitly disabling clang-tidy and/or clang-format, see Dev.rst on Coding Standards.)
/include/rosa/agent/History.hpp | ||
---|---|---|
47 | This must be virtual for instances of derived classes to be destructed correctly via reference and pointer of History. |
Comment Actions
I also wonder why History::lengthOfHistory and History::policyOfHistory? I think simply History::length() and History::policy() would be just as understandable and much less characters.
I think I'll go for 'History::maxLength' instead of 'History::length'. Otherwise one might confuse it with the current length ('History::numberOfEntries').
Thanks for the cosmetic fixes! There were nothing intentional about them. (Intentionally diverging from the coding standard would be done by explicitly disabling clang-tidy and/or clang-format, see Dev.rst on Coding Standards.)
Great!