Added virtual function push_backDimension() and getDimension() to parserItem.
This commit is contained in:
@@ -50,6 +50,9 @@ namespace Opm {
|
||||
throw std::invalid_argument("Should not call this ... \n");
|
||||
}
|
||||
|
||||
void ParserItem::push_backDimension(const std::string& dimension) {
|
||||
throw std::invalid_argument("Should not call this ... \n");
|
||||
}
|
||||
|
||||
ParserItem::ParserItem(const Json::JsonObject& jsonConfig) {
|
||||
if (jsonConfig.has_item("name"))
|
||||
|
||||
@@ -41,7 +41,8 @@ namespace Opm {
|
||||
ParserItem(const std::string& itemName);
|
||||
ParserItem(const std::string& itemName, ParserItemSizeEnum sizeType);
|
||||
ParserItem(const Json::JsonObject& jsonConfig);
|
||||
|
||||
|
||||
virtual void push_backDimension(const std::string& dimension);
|
||||
virtual const std::string& getDimension(size_t index) const;
|
||||
virtual DeckItemConstPtr scan(RawRecordPtr rawRecord) const = 0;
|
||||
virtual bool hasDimension() const;
|
||||
|
||||
@@ -523,6 +523,7 @@ BOOST_AUTO_TEST_CASE(ParserIntItemGetDimensionThrows) {
|
||||
ParserIntItem intItem(std::string("SOMEINT"));
|
||||
|
||||
BOOST_CHECK_THROW( intItem.getDimension(0) , std::invalid_argument );
|
||||
BOOST_CHECK_THROW( intItem.push_backDimension("L") , std::invalid_argument );
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user