???
This commit is contained in:
parent
2d68ebe94c
commit
0aa416675a
@ -64,13 +64,14 @@ namespace Opm {
|
||||
DeckItemConstPtr ParserIntItem::scan(RawRecordPtr rawRecord) const {
|
||||
DeckIntItemPtr deckItem(new DeckIntItem(name()));
|
||||
int defaultValue = m_default;
|
||||
|
||||
if (sizeType() == ALL) { // This can probably not be combined with a default value ....
|
||||
// The '*' should be interpreted as a multiplication sign
|
||||
while (rawRecord->size() > 0) {
|
||||
std::string token = rawRecord->pop_front();
|
||||
if (tokenContainsStar( token )) {
|
||||
StarToken<int> st(token);
|
||||
int value = defaultValue;
|
||||
int value = defaultValue; // This probably does never apply
|
||||
if (st.hasValue())
|
||||
value = st.value();
|
||||
deckItem->push_backMultiple( value , st.multiplier() );
|
||||
|
@ -37,7 +37,7 @@ namespace Opm {
|
||||
ParserIntItem(const std::string& itemName, ParserItemSizeEnum sizeType);
|
||||
ParserIntItem(const std::string& itemName, int defaultValue);
|
||||
ParserIntItem(const std::string& itemName, ParserItemSizeEnum sizeType, int defaultValue);
|
||||
ParserIntItem( const Json::JsonObject& jsonConfig);
|
||||
ParserIntItem(const Json::JsonObject& jsonConfig);
|
||||
|
||||
DeckItemConstPtr scan(RawRecordPtr rawRecord) const;
|
||||
bool equal(const ParserIntItem& other) const;
|
||||
@ -54,6 +54,13 @@ namespace Opm {
|
||||
|
||||
typedef boost::shared_ptr<const ParserIntItem> ParserIntItemConstPtr;
|
||||
typedef boost::shared_ptr<ParserIntItem> ParserIntItemPtr;
|
||||
|
||||
|
||||
template<class T>
|
||||
class ParserXItem : public ParserItem{
|
||||
public:
|
||||
ParserXItem(const std::string& itemName) { };
|
||||
};
|
||||
}
|
||||
|
||||
#endif /* PARSERINTITEM_HPP */
|
||||
|
@ -67,6 +67,8 @@ namespace Opm {
|
||||
|
||||
typedef boost::shared_ptr<const ParserItem> ParserItemConstPtr;
|
||||
typedef boost::shared_ptr<ParserItem> ParserItemPtr;
|
||||
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user