Removed m_deckIndex property from DeckKeyword

This commit is contained in:
Joakim Hove 2014-12-09 11:26:01 +01:00
parent e03413f149
commit 081b87b5b4
5 changed files with 0 additions and 25 deletions

View File

@ -24,7 +24,6 @@ namespace Opm {
DeckKeyword::DeckKeyword(const std::string& keywordName) { DeckKeyword::DeckKeyword(const std::string& keywordName) {
m_knownKeyword = true; m_knownKeyword = true;
m_keywordName = keywordName; m_keywordName = keywordName;
m_deckIndex = -1;
m_isDataKeyword = false; m_isDataKeyword = false;
m_fileName = ""; m_fileName = "";
m_lineNumber = -1; m_lineNumber = -1;
@ -33,7 +32,6 @@ namespace Opm {
DeckKeyword::DeckKeyword(const std::string& keywordName, bool knownKeyword) { DeckKeyword::DeckKeyword(const std::string& keywordName, bool knownKeyword) {
m_knownKeyword = knownKeyword; m_knownKeyword = knownKeyword;
m_keywordName = keywordName; m_keywordName = keywordName;
m_deckIndex = -1;
m_isDataKeyword = false; m_isDataKeyword = false;
m_fileName = ""; m_fileName = "";
m_lineNumber = -1; m_lineNumber = -1;
@ -75,14 +73,6 @@ namespace Opm {
} }
ssize_t DeckKeyword::getDeckIndex() const {
return m_deckIndex;
}
void DeckKeyword::setDeckIndex(size_t deckIndex) {
m_deckIndex = deckIndex;
}
std::string DeckKeyword::name() const { std::string DeckKeyword::name() const {
return m_keywordName; return m_keywordName;
} }

View File

@ -47,9 +47,6 @@ namespace Opm {
bool isKnown() const; bool isKnown() const;
bool isDataKeyword() const; bool isDataKeyword() const;
ssize_t getDeckIndex() const;
void setDeckIndex(size_t deckIndex);
const std::vector<int>& getIntData() const; const std::vector<int>& getIntData() const;
const std::vector<double>& getRawDoubleData() const; const std::vector<double>& getRawDoubleData() const;
const std::vector<double>& getSIDoubleData() const; const std::vector<double>& getSIDoubleData() const;
@ -68,7 +65,6 @@ namespace Opm {
std::shared_ptr<const ParserKeyword> m_parserKeyword; std::shared_ptr<const ParserKeyword> m_parserKeyword;
std::vector<DeckRecordConstPtr> m_recordList; std::vector<DeckRecordConstPtr> m_recordList;
bool m_knownKeyword; bool m_knownKeyword;
ssize_t m_deckIndex;
bool m_isDataKeyword; bool m_isDataKeyword;
}; };
typedef std::shared_ptr<DeckKeyword> DeckKeywordPtr; typedef std::shared_ptr<DeckKeyword> DeckKeywordPtr;

View File

@ -37,7 +37,6 @@ namespace Opm {
} }
void KeywordContainer::addKeyword(DeckKeywordPtr keyword) { void KeywordContainer::addKeyword(DeckKeywordPtr keyword) {
keyword->setDeckIndex( m_keywordList.size());
m_keywordList.push_back(keyword); m_keywordList.push_back(keyword);
if (!hasKeyword(keyword->name())) { if (!hasKeyword(keyword->name())) {

View File

@ -87,12 +87,6 @@ BOOST_AUTO_TEST_CASE(setUnknown_wasknown_nowunknown) {
} }
BOOST_AUTO_TEST_CASE(DeckIndex) {
DeckKeywordPtr deckKeyword(new DeckKeyword("KW"));
BOOST_CHECK_EQUAL( -1 , deckKeyword->getDeckIndex());
deckKeyword->setDeckIndex( 10);
BOOST_CHECK_EQUAL(10 , deckKeyword->getDeckIndex());
}

View File

@ -43,10 +43,6 @@ BOOST_AUTO_TEST_CASE( parse_EQUIL_OK ) {
DeckKeywordConstPtr kw1 = deck->getKeyword("EQUIL" , 0); DeckKeywordConstPtr kw1 = deck->getKeyword("EQUIL" , 0);
BOOST_CHECK_EQUAL( 3U , kw1->size() ); BOOST_CHECK_EQUAL( 3U , kw1->size() );
BOOST_CHECK_EQUAL(0 , kw0->getDeckIndex());
BOOST_CHECK_EQUAL(1 , kw1->getDeckIndex());
DeckRecordConstPtr rec1 = kw1->getRecord(0); DeckRecordConstPtr rec1 = kw1->getRecord(0);
BOOST_CHECK_EQUAL( 9U , rec1->size() ); BOOST_CHECK_EQUAL( 9U , rec1->size() );