39 DeckItem(
const std::string&,
int);
41 DeckItem(
const std::string&, std::string);
42 DeckItem(
const std::string&,
double) =
delete;
43 DeckItem(
const std::string&,
UDAValue) =
delete;
44 DeckItem(
const std::string&,
UDAValue,
const std::vector<Dimension>& active_dim,
const std::vector<Dimension>& default_dim);
45 DeckItem(
const std::string&,
double,
const std::vector<Dimension>& active_dim,
const std::vector<Dimension>& default_dim);
47 static DeckItem serializationTestObject();
48 DeckItem emptyStructuralCopy()
const;
50 const std::string& name()
const;
53 bool defaultApplied(
size_t )
const;
58 bool hasValue(
size_t )
const;
66 size_t data_size()
const;
69 T get(
size_t index )
const;
72 double getSIDouble(
size_t )
const;
73 std::string getTrimmedString(
size_t )
const;
75 template <
typename T> std::vector<T>& getData();
76 template <
typename T>
const std::vector<T>& getData()
const;
78 const std::vector< double >& getSIDoubleData()
const;
79 const std::vector<value::status>& getValueStatus()
const;
80 const std::vector<Dimension>& getActiveDimensions()
const
82 return this->active_dimensions;
90 void push_back(
int );
91 void push_back(
double );
92 void push_back( std::string );
95 void push_back(
int,
size_t );
96 void push_back(
double,
size_t );
97 void push_back( std::string,
size_t );
98 void push_backDefault(
UDAValue, std::size_t n = 1 );
99 void push_backDefault(
int, std::size_t n = 1 );
100 void push_backDefault(
double, std::size_t n = 1 );
101 void push_backDefault( std::string, std::size_t n = 1 );
102 void push_backDefault(
RawString, std::size_t n = 1 );
105 template <
typename T>
106 void push_backDummyDefault( std::size_t n = 1 );
108 type_tag getType()
const;
111 friend std::ostream& operator<<(std::ostream& os,
const DeckItem& item);
124 bool equal(
const DeckItem& other,
bool cmp_default,
bool cmp_numeric)
const;
130 bool operator==(
const DeckItem& other)
const;
131 bool operator!=(
const DeckItem& other)
const;
132 static bool to_bool(std::string string_value);
134 bool is_uda() {
return (type == get_type< UDAValue >()); };
135 bool is_double() {
return type == get_type< double >(); };
136 bool is_int() {
return type == get_type< int >() ; };
137 bool is_string() {
return type == get_type< std::string >(); };
138 bool is_raw_string() {
return type == get_type< RawString >(); };
140 UDAValue& get_uda() {
return uval[0]; };
142 template<
class Serializer>
151 serializer(item_name);
152 serializer(value_status);
153 serializer(raw_data);
154 serializer(active_dimensions);
155 serializer(default_dimensions);
158 void reserve_additionalRawString(std::size_t);
161 mutable std::vector< double > dval;
162 std::vector< int > ival;
163 std::vector< std::string > sval;
164 std::vector< RawString > rsval;
165 std::vector< UDAValue > uval;
167 type_tag type = type_tag::unknown;
169 std::string item_name;
170 std::vector<value::status> value_status;
176 mutable bool raw_data =
true;
177 std::vector< Dimension > active_dimensions;
178 std::vector< Dimension > default_dimensions;
180 template<
typename T > std::vector< T >& value_ref();
181 template<
typename T >
const std::vector< T >& value_ref()
const;
182 template<
typename T >
void push( T );
183 template<
typename T >
void push( T,
size_t );
184 template<
typename T >
void push_default( T, std::size_t n );
185 template<
typename T >
void write_vector(
DeckOutput& writer,
const std::vector<T>& data)
const;