/* Copyright 2013 Statoil ASA. This file is part of the Open Porous Media project (OPM). OPM is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. OPM is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OPM. If not, see . */ #ifndef DECKFLOATITEM_HPP #define DECKFLOATITEM_HPP #include #include #include #include #include #include namespace Opm { class DeckFloatItem : public DeckItem { public: DeckFloatItem(std::string name) : DeckItem(name) {} float getRawFloat(size_t index) const; //const std::vector& getRawFloatData() const; float getSIFloat(size_t index) const; const std::vector& getSIFloatData() const; void push_back(std::deque data , size_t items); void push_back(std::deque data); void push_back(float value); void push_backDefault(float value); void push_backMultiple(float value, size_t numValues); void push_backDimension(std::shared_ptr activeDimension , std::shared_ptr defaultDimension); size_t size() const; private: void assertSIData() const; std::vector m_data; // mutable is required because the data is "lazily" converted // to SI units in asserSIData() which needs to be callable by // 'const'-decorated methods mutable std::vector m_SIdata; std::vector > m_dimensions; }; typedef std::shared_ptr DeckFloatItemPtr; typedef std::shared_ptr< const DeckFloatItem> DeckFloatItemConstPtr; } #endif // DECKFLOATITEM_HPP