Make Dimension+UnitSystem no longer use shared_ptr
This commit is contained in:
@@ -25,9 +25,9 @@
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
|
||||
namespace Opm {
|
||||
#include <opm/parser/eclipse/Units/Dimension.hpp>
|
||||
|
||||
class Dimension;
|
||||
namespace Opm {
|
||||
|
||||
class UnitSystem {
|
||||
public:
|
||||
@@ -72,13 +72,16 @@ namespace Opm {
|
||||
UnitType getType() const;
|
||||
|
||||
void addDimension(const std::string& dimension, double SIfactor, double SIoffset = 0.0);
|
||||
void addDimension(std::shared_ptr<const Dimension> dimension);
|
||||
std::shared_ptr<const Dimension> getNewDimension(const std::string& dimension);
|
||||
std::shared_ptr<const Dimension> getDimension(const std::string& dimension) const;
|
||||
void addDimension( Dimension );
|
||||
const Dimension& getNewDimension(const std::string& dimension);
|
||||
const Dimension& getDimension(const std::string& dimension) const;
|
||||
bool hasDimension(const std::string& dimension) const;
|
||||
bool equal(const UnitSystem& other) const;
|
||||
|
||||
std::shared_ptr<const Dimension> parse(const std::string& dimension) const;
|
||||
bool operator==( const UnitSystem& ) const;
|
||||
bool operator!=( const UnitSystem& ) const;
|
||||
|
||||
Dimension parse(const std::string& dimension) const;
|
||||
|
||||
double from_si( measure, double ) const;
|
||||
double to_si( measure, double ) const;
|
||||
@@ -90,11 +93,11 @@ namespace Opm {
|
||||
static UnitSystem * newFIELD();
|
||||
static UnitSystem * newLAB();
|
||||
private:
|
||||
std::shared_ptr<const Dimension> parseFactor(const std::string& dimension) const;
|
||||
Dimension parseFactor( const std::string& ) const;
|
||||
|
||||
std::string m_name;
|
||||
UnitType m_unittype;
|
||||
std::map<std::string , std::shared_ptr<const Dimension> > m_dimensions;
|
||||
std::map< std::string , Dimension > m_dimensions;
|
||||
const double* measure_table_from_si;
|
||||
const double* measure_table_to_si;
|
||||
const char* const* unit_name_table;
|
||||
|
||||
Reference in New Issue
Block a user