Commit Graph

15 Commits

Author SHA1 Message Date
Jørgen Kvalsvik
135f405e93 InitUnitSystem private; constness managed by .get
The const_cast in Deck::get*UnitSystem are potentially undefined
behaviour under a series of (plausible) conditions, and are deprecated
in favour of mutable members. Removes initUnitSystem from the public
interface, as the initialisation is handled on the first getUnitSystem
anyway, cleaning up the Deck interface slightly.

Adds proper constness to the use of unit systems that don't actually
modify the internal state in any way.
2016-04-06 15:09:32 +02:00
Jørgen Kvalsvik
f0ae5db131 opm-parser adoption of Deck automatic ownership
Since the Deck* family of classes have changed their interfaces to no
longer use shared_ptr, a lot of code broke. This patch fixes all
problems in tests, other signatures and accesses to now use the new Deck
interfaces.
2016-02-18 13:27:24 +01:00
Jørgen Kvalsvik
0781ec968d Change static private methods to static functions
Since these really aren't a part of the class, they're moved to the more
approperiate static function to not pollute the header.
2016-02-18 13:26:55 +01:00
Jørgen Kvalsvik
4b98943665 Replaces unecessary header includes with fwd decls
Every header is self-contained and includes only what it must to
function, relying on users include what they need in source files,
adopting a pay-what-you-use model (in particular for internal
dependencies).
2016-01-26 13:23:22 +01:00
Jørgen Kvalsvik
04900a4bb6 ParserKeywords.hpp -> ParserKeywordsX.hpp
To reduce compiler stress and be more explicit w.r.t. dependencies, all
files now includes only the keywords they need, instead of the
collection of all files.
2016-01-21 09:25:58 +01:00
Jørgen Kvalsvik
f404828d63 Cleans up headers to improve build preformance
This is an effort to improve build performance.  Several includes
scattered across the project are either unused or partially used (i.e.
just used to import a type name, not depending on the actual contents of
the header file).

Replaces a lot of these includes with forward declarations.
2016-01-21 09:22:06 +01:00
babrodtk
c113c80e42 Changed throw => catch to an if test instead 2015-09-02 13:49:32 +02:00
Joakim Hove
18ead807f7 Changed VFPPRod string -> enum conversion routines.
Main change is in VFPPRod::getALQTYpe() where we use the
DeckItem::defaultApplied() method instead of comparing with the special
default value ' '. The other functions are changed just to be consistent.
2015-08-07 16:33:02 +02:00
babrodtk
91eae36f00 Updated printout to be less verbose for not-so-nice data 2015-07-09 17:13:40 +02:00
babrodtk
e27b04692b Removed getNonEmptyItem function 2015-07-08 17:51:54 +02:00
babrodtk
109f47a001 More safety checks when reading VFPProdTables 2015-07-08 17:46:10 +02:00
André R. Brodtkorb
eb783df5a9 Changed int to size_t 2015-07-03 09:50:42 +02:00
babrodtk
c87b21f328 Added VFPInjTable 2015-07-03 08:53:22 +02:00
André R. Brodtkorb
08d5a92ae1 Added tests that check 'fail path' for VFPProdTable 2015-06-29 16:01:32 +02:00
André R. Brodtkorb
49bd072c61 Updated VFPProdTable to use compile-time constants and removed superfluous asserts 2015-06-29 14:53:20 +02:00