Issue827

Title Move option parser code from .h to .cc files
Priority feature Status resolved
Superseder Nosy List cedric, jendrik, malte, salome
Assigned To salome Keywords
Optional summary

Created on 2018-09-18.12:42:32 by salome, last changed by salome.

Messages
msg7541 (view) Author: salome Date: 2018-09-18.20:18:51
The issue is now merged.
msg7523 (view) Author: jendrik Date: 2018-09-18.15:39:15
I left some comments on Bitbucket.
msg7521 (view) Author: malte Date: 2018-09-18.15:30:50
Simplifying a bit: if a template function is mentioned in the header file, we
must also define it there. So the main way to get rid of code is to avoid
templated public methods, and to keep those that we must have as simple as
possible. (The main thing that pimpl can do is to essentially hide away prive
methods.)

In any case, every step towards simpler *.h files is good, even if it is not a
giant step. :-)
msg7518 (view) Author: salome Date: 2018-09-18.15:14:53
On a side note: I did not touch the files option_parser.h and token_parser.h,
since Cedric and Patrick are changing those in issue826.
msg7517 (view) Author: salome Date: 2018-09-18.15:12:40
I had a first go at this an created a pull request:
https://bitbucket.org/salome_eriksson/downward-issues/pull-requests/1/issue827/diff

Sadly as far as I could see there is not too much that can be pulled in cc
files, since most functions/classes are templated. I did however not yet look
into the pimpl idiom too deep - could this be used to encapsulate the
implementation of templated stuff? I think somehow separating declaration and
definition of templated classes and functions would greatly increase readability.
msg7509 (view) Author: salome Date: 2018-09-18.12:42:32
In order to make the option parser code more readable, we want to split as much
code as possible off from .h files to .cc files. We possibly also want to apply
the pimpl idiom for this.

This is a subissue of issue588 (option parser refactoring).
History
Date User Action Args
2018-09-18 20:18:51salomesetstatus: in-progress -> resolved
messages: + msg7541
2018-09-18 15:52:16cedricsetnosy: + cedric
2018-09-18 15:39:15jendriksetmessages: + msg7523
2018-09-18 15:30:50maltesetmessages: + msg7521
2018-09-18 15:14:53salomesetmessages: + msg7518
2018-09-18 15:12:40salomesetmessages: + msg7517
2018-09-18 13:33:01jendriksetnosy: + jendrik
2018-09-18 12:42:32salomecreate