Flow123d  release_3.0.0-967-g1590fa8
type_base.hh
Go to the documentation of this file.
1 /*!
2  *
3  * Copyright (C) 2015 Technical University of Liberec. All rights reserved.
4  *
5  * This program is free software; you can redistribute it and/or modify it under
6  * the terms of the GNU General Public License version 3 as published by the
7  * Free Software Foundation. (http://www.gnu.org/licenses/gpl-3.0.en.html)
8  *
9  * This program is distributed in the hope that it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11  * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
12  *
13  *
14  * @file type_base.hh
15  * @brief
16  */
17 
18 #ifndef TYPE_BASE_HH_
19 #define TYPE_BASE_HH_
20 
21 #include <limits>
22 #include <ios>
23 //#include <set>
24 #include <map>
25 #include <vector>
26 #include <string>
27 //#include <iomanip>
28 
29 #include <stdint.h> // for int64_t
30 #include <boost/exception/info.hpp> // for error_info::~error_info<Tag, T>
31 #include <memory> // for shared_ptr, __shared_ptr
32 #include <utility> // for pair
33 
34 
35 //#include <boost/type_traits.hpp>
36 //#include <boost/tokenizer.hpp>
37 //#include <boost/algorithm/string.hpp>
38 
39 //#include "system/global_defs.h"
40 //#include "system/system.hh"
41 #include "system/exceptions.hh"
42 #include "system/file_path.hh"
43 
44 
45 
46 
47 namespace Input {
48 
49 namespace Type {
50 
51 
52 
53 using namespace std;
54 
55 /**
56  * Declaration of common exceptions and error info types.
57  */
58 TYPEDEF_ERR_INFO( EI_KeyName, const string );
59 
60 TYPEDEF_ERR_INFO( EI_DefaultStr, const string);
61 TYPEDEF_ERR_INFO( EI_TypeName, const string);
62 TYPEDEF_ERR_INFO( EI_Desc, const string);
63 DECLARE_EXCEPTION( ExcWrongDefaultJSON, << "Consistency Error: Not valid JSON of Default value "
64  << EI_DefaultStr::qval << " of type " << EI_TypeName::qval << ";\n"
65  << "During declaration of the key: " << EI_KeyName::qval );
66 DECLARE_EXCEPTION( ExcWrongDefault, << "Consistency Error: " << EI_Desc::val << "Default value "
67  << EI_DefaultStr::qval << " do not match type: " << EI_TypeName::qval << ";\n"
68  << "During declaration of the key: " << EI_KeyName::qval );
69 DECLARE_EXCEPTION( ExcUnknownDescendant, << "Unknown descendant of TypeBase class, name: " << EI_TypeName::qval );
70 
71 
72 
73 
74 /**
75  * FinishStatus manages finish of elements in IST.
76  *
77  * Specifies:
78  * - finish status of IST elements
79  * - type of executing finish
80  */
82  none_, //< unfinished element / this type can't be used as type of finish
83  in_perform_, //< finish of element performs (used in recursion check) / this type can't be used as type of finish
84  regular_, //< finished element of IST / finish of IST executed recursively from root element
85  generic_, //< finished element in generic subtree / finish of generic subtree (executed from Instance object)
86  delete_ //< finished element marked as deleted (that doesn't appear in IST) / finish of unused elements (that can be removed)
87 };
88 
89 
90 /**
91  * @brief Base of classes for declaring structure of the input data.
92  *
93  * Provides methods and class members common to all types. Namely, the type name, finished status (nontrivial only
94  * for types with complex initialization - Record, AbstractRecosd, Selection), attributes, data of generic types
95  * and output of the documentation.
96  *
97  * @ingroup input_types
98  */
99 class TypeBase {
100 public:
101  /// Type returned by content_hash methods.
102  typedef std::size_t TypeHash;
103  const static TypeHash none_hash = std::numeric_limits<TypeHash>::max();
104 
105  /// String stored in JSON format.
106  typedef std::string json_string;
107  /// Defines map of Input::Type attributes.
109 
110  /// Defines pairs of (name, Input::Type), that are used for replace of parameters in generic types.
111  typedef std::pair< std::string, std::shared_ptr<TypeBase> > ParameterPair;
112  /// Define vector of parameters passed to the overloaded make_instance method.
114 
115  /// Defines map of used parameters
117  /// Return type of make_instance methods, contains instance of generic type and map of used parameters
118  typedef std::pair< std::shared_ptr<TypeBase>, ParameterMap > MakeInstanceReturnType;
119 
120 
121  /**
122  * @brief Returns true if the type is fully specified and ready for read access.
123  *
124  * For Record and Array types this say nothing about child types referenced in particular type object.
125  * In particular for Record and Selection, it returns true after @p finish() method is called.
126  */
127  virtual FinishStatus finish_status() const;
128 
129  virtual bool is_finished() const;
130 
131  /**
132  * @brief Returns true if the type is closed.
133  */
134  virtual bool is_closed() const;
135 
136  /// Returns an identification of the type. Useful for error messages.
137  virtual string type_name() const;
138  /// Returns an identification of the class. Useful for output of the documentation.
139  virtual string class_name() const;
140 
141  /**
142  * @brief Returns string with Type extensive documentation.
143  *
144  * We need this to pass Type description at throw points since the Type object can be deallocated during stack
145  * unrolling so it is not good idea to pass pointer. Maybe we can pass smart pointers. Actually this method is
146  * used in various exceptions in json_to_storage.
147  *
148  * TODO: Some old note on this topic:
149  * !!! how to pass instance of descendant of TypeBase through EI -
150  * - can not pass it directly since TypeBase is not copyconstructable
151  * - can not use shared_ptr for same reason
152  * - can not use C pointers since the referred object can be temporary
153  * solutions:
154  * - consistently move TypeBase to Pimpl design
155  * - provide virtual function make_copy, that returns valid shared_ptr
156  *
157  */
158  string desc() const;
159 
160 
161 
162  /**
163  * @brief Comparison of types.
164  *
165  * It compares kind of type (Integer, Double, String, Record, ..), for complex types it also compares names.
166  * For arrays compare subtypes.
167  */
168  virtual bool operator==(const TypeBase &other) const;
169 
170  /// Comparison of types.
171  bool operator!=(const TypeBase & other) const;
172 
173  /// Destructor
174  virtual ~TypeBase();
175 
176 
177 
178  /**
179  * @brief Finishes and marks all types registered in type repositories and unused in IST.
180  *
181  * Steps of this method:
182  * 1) finishes all types unused in IST, marks them as deleted (FinishStatus::deleted_)
183  * 2) iterates these deleted types once more, checks shared pointers link to Record keys, descendants of Abstract etc.
184  * - if count == 1, it's OK, method resets shared pointer
185  * - in other cases throws error
186  */
187  static void delete_unfinished_types();
188 
189 
190  /**
191  * @brief Finish method. Finalize construction of "Lazy types": Record, Selection, Abstract and generic type.
192  *
193  * These input types are typically defined by means of static generating methods, whose allows initialization
194  * any of other input types. Since e.g. a Record can link to other input types through its keys at the
195  * initialization phase. But some setting (e.g. add descendants to Abstract) can't be done in initialization
196  * phase. Therefore, the remaining part of initialization can be done later, in finalization phase, typically
197  * from main(), by calling the method finish().
198  *
199  * Method allows finish in different cases that is managed by @p finish_type:
200  *
201  * - base finish of IST requires FinishStatus::regular_ and typically finish of root type is called in this case
202  * - finish of generic types can be different of other Input::Types (e. g. for Record) and needs set @p finish_type
203  * to FinishStatus::generic_
204  * - input types unused in IST can be finished with parameter FinishStatus::delete_. These types can be then safely
205  * deleted from \p Input::TypeRepository (see also \p delete_unfinished_types)
206  *
207  */
208  virtual FinishStatus finish(FinishStatus finish_type = FinishStatus::regular_);
209 
210  /**
211  * @brief Hash of the type specification.
212  *
213  * Provides unique id computed from its content (definition) so that same types have same hash.
214  *
215  * Hash is counted using type, name and other class members specific for descendants.
216  */
217  virtual TypeHash content_hash() const =0;
218 
219  /**
220  * @brief Format given hash for output.
221  *
222  * Use hex format and double quotas.
223  */
224  static std::string hash_str(TypeHash hash);
225 
226  /// Format the hash of this type.
227  inline std::string hash_str() const {
228  return hash_str(content_hash());
229  }
230 
231  /**
232  * Create instance of generic type.
233  *
234  * Replace parameters in input tree by type stored in @p vec.
235  */
236  virtual MakeInstanceReturnType make_instance(ParameterVector vec = ParameterVector()) =0;
237 
238  /// Indicates if type is marked with flag @p root_of_generic_subtree_
240  return root_of_generic_subtree_;
241  }
242 
243 protected:
244 
245  /// The default constructor.
246  TypeBase();
247 
248  /// Copy constructor.
249  TypeBase(const TypeBase& other);
250 
251  /**
252  * @brief Add attribute of given @p name to attribute map.
253  *
254  * Parameter @p val must contain valid JSON string.
255  */
256  void add_attribute_(std::string name, json_string val);
257 
258 
259 
260  /**
261  * @brief The type of hash values used in associative array that translates key names to indices in Record and Selection.
262  *
263  * For simplicity, we currently use whole strings as "hash".
264  */
265  typedef string KeyHash;
266 
267  /// Hash function.
268  inline static KeyHash key_hash(const string &str) {
269  return (str);
270  }
271 
272  /**
273  * @brief Check that a @p key is valid identifier.
274  *
275  * I.e. consists only of valid characters, that are lower-case letters, digits and underscore,
276  * we allow identifiers starting with a digit, but it is discouraged since it slows down parsing of the input file.
277  */
278  static bool is_valid_identifier(const string& key);
279 
280  /// Check if @p str is valid JSON string
281  bool validate_json(json_string str) const;
282 
283  /// Create JSON output from @p parameter_map formatted as value of attribute.
284  json_string print_parameter_map_to_json(ParameterMap parameter_map) const;
285 
286  /**
287  * JSON format of the vector of parameter names. Used for generic composed types.
288  * TODO: use ParameterVector instead of ParameterMap and merge this method with the previous one.
289  */
290  json_string print_parameter_map_keys_to_json(ParameterMap param_map) const;
291 
292  /**
293  * Extract and set attributes from the ParameterMap containing parameters of the subtree.
294  * Used in implementations of the make_instance method.
295  */
296  void set_generic_attributes(ParameterMap param_map);
297 
298  /**
299  * Copy attributes to the instance of the generic type. Remove all internal attributes starting with '_'.
300  */
301  void copy_attributes(attribute_map other_attributes);
302 
303 
304  /// map of type attributes (e. g. input_type, name etc.)
305  std::shared_ptr<attribute_map> attributes_;
306 
307  /// flag is true if type should be root of generic subtree
309 
310  /// hash string of generic type if type is derived, or empty string
312 
313  /// map of parameters if type is part of generic subtree
314  ParameterMap parameter_map_;
315 
316  friend class Array;
317  friend class Record;
318  friend class OutputBase;
319 };
320 
321 /**
322  * @brief For convenience we provide also redirection operator for output documentation of Input:Type classes.
323  */
324 std::ostream& operator<<(std::ostream& stream, const TypeBase& type);
325 
326 
327 //class Record;
328 //class Selection;
329 
330 
331 /**
332  * @brief Class for declaration of inputs sequences.
333  *
334  * The type is fully specified after its constructor is called. All elements of the Array has same type, however you
335  * can use elements of Abstract.
336  *
337  * If you not disallow Array size 1, the input reader will try to convert any other type
338  * on input into array with one element, e.g.
339  @code
340  int_array=1 # is equivalent to
341  int_array=[ 1 ]
342  @endcode
343  *
344  * @ingroup input_types
345  */
346 class Array : public TypeBase {
347  friend class OutputBase;
348 
349 protected:
350 
351  /**
352  * @brief Actual data of the Array.
353  */
354  class ArrayData {
355  public:
356 
357  /// Constructor
358  ArrayData(unsigned int min_size, unsigned int max_size);
359  /// Finishes initialization of the ArrayData.
360  FinishStatus finish(FinishStatus finish_type = FinishStatus::regular_);
361  /// Type of Array
362  std::shared_ptr<TypeBase> type_of_values_;
363  /// Minimal size of Array
364  unsigned int lower_bound_;
365  /// Maximal size of Array
366  unsigned int upper_bound_;
367  /// Flag specified if Array is finished
369 
370  };
371 
372 public:
373  /**
374  * @brief Constructor with a @p type of array items given as pure reference.
375  *
376  * In this case \p type has to by descendant of \p TypeBase different from 'complex' types
377  * @p Record and @p Selection. You can also specify minimum and maximum size of the array.
378  */
379  template <class ValueType>
380  Array(const ValueType &type, unsigned int min_size=0, unsigned int max_size=std::numeric_limits<unsigned int>::max() );
381 
382  /**
383  * @brief Constructor with a shared pointer @p type of array.
384  */
385  Array(std::shared_ptr<TypeBase> type, unsigned int min_size=0, unsigned int max_size=std::numeric_limits<unsigned int>::max() );
386 
387  /**
388  * @brief Implements @p TypeBase::content_hash.
389  *
390  * Hash is calculated by type name, bounds, hash of stored type and hash of attributes.
391  */
392  TypeHash content_hash() const override;
393 
394  /// Finishes initialization of the Array type because of lazy evaluation of type_of_values.
395  FinishStatus finish(FinishStatus finish_type = FinishStatus::regular_) override;
396 
397  /// Override @p Type::TypeBase::finish_status.
398  FinishStatus finish_status() const override;
399 
400  /// Override @p Type::TypeBase::is_finished.
401  bool is_finished() const override;
402 
403  /// Getter for the type of array items.
404  inline const TypeBase &get_sub_type() const {
405  return *data_->type_of_values_; }
406 
407  /// Checks size of particular array.
408  inline bool match_size(unsigned int size) const {
409  return size >=data_->lower_bound_ && size<=data_->upper_bound_; }
410 
411  /**
412  * @brief Implements @p Type::TypeBase::type_name.
413  *
414  * Name has form \p array_of_'subtype_name'.
415  */
416  string type_name() const override;
417  /// Override @p Type::TypeBase::class_name.
418  string class_name() const override;
419 
420  /// @brief Implements @p Type::TypeBase::operator== Compares also subtypes.
421  bool operator==(const TypeBase &other) const override;
422 
423  /// Implements @p TypeBase::make_instance.
425 
426  /**
427  * @brief Create deep copy of Array.
428  *
429  * Copy all data stored in shared pointers etc.
430  */
431  Array deep_copy() const;
432 
433 protected:
434 
435  /// Handle to the actual array data.
436  std::shared_ptr<ArrayData> data_;
437 private:
438  /// Forbids default constructor in order to prevent empty data_.
439  Array();
440 };
441 
442 
443 
444 /**
445  * @brief Base of all scalar types.
446  *
447  * @ingroup input_types
448  */
449 class Scalar : public TypeBase {};
450 
451 
452 /**
453  * @brief Class for declaration of the input of type Bool.
454  *
455  * String names of boolean values are \p 'true' and \p 'false'.
456  *
457  * @ingroup input_types
458  */
459 class Bool : public Scalar {
460 public:
461  /// Constructor.
463  {}
464 
465  /// Implements @p TypeBase::content_hash.
466  TypeHash content_hash() const override;
467 
468 
469  /**
470  * @brief Implements @p Type::TypeBase::type_name.
471  *
472  * Name has form \p Bool.
473  */
474  string type_name() const override;
475  /// Override @p Type::TypeBase::class_name.
476  string class_name() const override;
477 
478  /// Implements @p TypeBase::make_instance.
480 };
481 
482 
483 /**
484  * @brief Class for declaration of the integral input data.
485  *
486  * The data are stored in an \p signed \p int variable. You can specify bounds for the valid input data.
487  *
488  * @ingroup input_types
489  */
490 class Integer : public Scalar {
491  friend class OutputBase;
492 
493 public:
494  /**
495  * @brief Constructor.
496  *
497  * You can also specify minimum and maximum value.
498  */
499  Integer(int lower_bound=std::numeric_limits<int>::min(), int upper_bound=std::numeric_limits<int>::max());
500 
501  /**
502  * @brief Implements @p TypeBase::content_hash.
503  *
504  * Hash is calculated by type name and bounds.
505  */
506  TypeHash content_hash() const override;
507 
508  /**
509  * @brief Check valid value of Integer.
510  *
511  * Returns true if the given integer value conforms to the Type::Integer bounds.
512  */
513  bool match(std::int64_t value) const;
514 
515  /**
516  * @brief Implements @p Type::TypeBase::type_name.
517  *
518  * Name has form \p Integer.
519  */
520  string type_name() const override;
521  /// Override @p Type::TypeBase::class_name.
522  string class_name() const override;
523 
524  /// Implements @p TypeBase::make_instance.
526 private:
527 
528  std::int64_t lower_bound_; ///< Minimal value of Integer.
529  std::int64_t upper_bound_; ///< Maximal value of Integer.
530 
531 };
532 
533 
534 /**
535  * @brief Class for declaration of the input data that are floating point numbers.
536  *
537  * The data are stored in an \p double variable. You can specify bounds for the valid input data.
538  *
539  * @ingroup input_types
540  */
541 class Double : public Scalar {
542  friend class OutputBase;
543 
544 public:
545  /**
546  * @brief Constructor.
547  *
548  * You can also specify minimum and maximum value.
549  */
550  Double(double lower_bound= -std::numeric_limits<double>::max(), double upper_bound=std::numeric_limits<double>::max());
551 
552  /**
553  * @brief Implements @p TypeBase::content_hash.
554  *
555  * Hash is calculated by type name and bounds.
556  */
557  TypeHash content_hash() const override;
558 
559  /// Returns true if the given integer value conforms to the Type::Double bounds.
560  bool match(double value) const;
561 
562  /**
563  * @brief Implements @p Type::TypeBase::type_name.
564  *
565  * Name has form \p Double.
566  */
567  string type_name() const override;
568  /// Override @p Type::TypeBase::class_name.
569  string class_name() const override;
570 
571  /// Implements @p TypeBase::make_instance.
573 private:
574 
575  double lower_bound_; ///< Minimal value of Integer.
576  double upper_bound_; ///< Maximal value of Integer.
577 
578 };
579 
580 
581 
582 /**
583  * @brief Class for declaration of the input data that are in string format.
584  *
585  * Just for consistency, but is essentially same as Scalar.
586  *
587  * @ingroup input_types
588  */
589 class String : public Scalar {
590 public:
591  /**
592  * @brief Implements @p Type::TypeBase::type_name.
593  *
594  * Name has form \p String.
595  */
596  virtual string type_name() const override;
597  /// Override @p Type::TypeBase::class_name.
598  string class_name() const override;
599 
600  /// Implements @p TypeBase::content_hash.
601  TypeHash content_hash() const override;
602 
603  /// Particular descendants can check validity of the string.
604  virtual bool match(const string &value) const;
605 
606  /// Implements @p TypeBase::make_instance.
607  virtual MakeInstanceReturnType make_instance(std::vector<ParameterPair> vec = std::vector<ParameterPair>()) override;
608 };
609 
610 
611 /**
612  * @brief Class for declaration of the input data that are file names.
613  *
614  * We strictly distinguish filenames for input and output files.
615  *
616  * @ingroup input_types
617  */
618 class FileName : public String {
619 public:
620 
621  /// Implements @p TypeBase::content_hash.
622  TypeHash content_hash() const override;
623 
624  /**
625  * @brief The factory function for declaring type FileName for input files.
626  */
627  static FileName input();
628 
629  /**
630  * @brief The factory function for declaring type FileName for input files.
631  */
632  static FileName output();
633 
634  /**
635  * @brief Implements @p Type::TypeBase::type_name.
636  *
637  * Name has form \p FileName_input or \p FileName_output
638  */
639  string type_name() const override;
640  /// Override @p Type::TypeBase::class_name.
641  string class_name() const override;
642 
643  /// Comparison of types.
644  bool operator==(const TypeBase &other) const override;
645 
646  /// Checks relative output paths.
647  bool match(const string &str) const override;
648 
649 
650  /**
651  * @brief Returns type of the file input/output.
652  */
653  ::FilePath::FileType get_file_type() const;
654 
655  /// Implements @p TypeBase::make_instance.
657 
658 
659 
660 private:
661  /// The type of file (input or output).
663 
664  /// Forbids default constructor.
665  FileName();
666 
667  /// Forbids direct construction.
668  FileName(enum ::FilePath::FileType type);
669 
670 };
671 
672 } // closing namespace Type
673 } // closing namespace Input
674 
675 
676 
677 
678 
679 #endif /* TYPE_BASE_HH_ */
Bool()
Constructor.
Definition: type_base.hh:462
std::int64_t lower_bound_
Minimal value of Integer.
Definition: type_base.hh:528
Base of classes for declaring structure of the input data.
Definition: type_base.hh:99
bool is_root_of_generic_subtree()
Indicates if type is marked with flag root_of_generic_subtree_.
Definition: type_base.hh:239
FinishStatus finish_status
Flag specified if Array is finished.
Definition: type_base.hh:368
std::string hash_str() const
Format the hash of this type.
Definition: type_base.hh:227
bool root_of_generic_subtree_
flag is true if type should be root of generic subtree
Definition: type_base.hh:308
TYPEDEF_ERR_INFO(EI_KeyName, const string)
Class for declaration of the input of type Bool.
Definition: type_base.hh:459
FileType
Possible types of file.
Definition: file_path.hh:67
std::pair< std::shared_ptr< TypeBase >, ParameterMap > MakeInstanceReturnType
Return type of make_instance methods, contains instance of generic type and map of used parameters...
Definition: type_base.hh:118
Abstract linear system class.
Definition: balance.hh:35
unsigned int upper_bound_
Maximal size of Array.
Definition: type_base.hh:366
::FilePath::FileType type_
The type of file (input or output).
Definition: type_base.hh:662
Base abstract class for output description of the Input::Type tree.
Definition: type_output.hh:65
Base of all scalar types.
Definition: type_base.hh:449
static KeyHash key_hash(const string &str)
Hash function.
Definition: type_base.hh:268
Class for declaration of the input data that are file names.
Definition: type_base.hh:618
std::shared_ptr< attribute_map > attributes_
map of type attributes (e. g. input_type, name etc.)
Definition: type_base.hh:305
Class for declaration of the integral input data.
Definition: type_base.hh:490
Class for declaration of inputs sequences.
Definition: type_base.hh:346
double upper_bound_
Maximal value of Integer.
Definition: type_base.hh:576
static constexpr bool value
Definition: json.hpp:87
ParameterMap parameter_map_
map of parameters if type is part of generic subtree
Definition: type_base.hh:314
string KeyHash
The type of hash values used in associative array that translates key names to indices in Record and ...
Definition: type_base.hh:265
std::shared_ptr< ArrayData > data_
Handle to the actual array data.
Definition: type_base.hh:436
bool operator==(const Null &, const Null &)
Class for declaration of the input data that are floating point numbers.
Definition: type_base.hh:541
std::map< std::string, TypeHash > ParameterMap
Defines map of used parameters.
Definition: type_base.hh:116
std::int64_t upper_bound_
Maximal value of Integer.
Definition: type_base.hh:529
std::map< std::string, json_string > attribute_map
Defines map of Input::Type attributes.
Definition: type_base.hh:108
bool match_size(unsigned int size) const
Checks size of particular array.
Definition: type_base.hh:408
std::pair< std::string, std::shared_ptr< TypeBase > > ParameterPair
Defines pairs of (name, Input::Type), that are used for replace of parameters in generic types...
Definition: type_base.hh:111
TypeHash generic_type_hash_
hash string of generic type if type is derived, or empty string
Definition: type_base.hh:311
std::shared_ptr< TypeBase > type_of_values_
Type of Array.
Definition: type_base.hh:362
Actual data of the Array.
Definition: type_base.hh:354
const TypeBase & get_sub_type() const
Getter for the type of array items.
Definition: type_base.hh:404
DECLARE_EXCEPTION(ExcWrongDefaultJSON,<< "Consistency Error: Not valid JSON of Default value "<< EI_DefaultStr::qval<< " of type "<< EI_TypeName::qval<< ";\n"<< "During declaration of the key: "<< EI_KeyName::qval)
double lower_bound_
Minimal value of Integer.
Definition: type_base.hh:575
std::string json_string
String stored in JSON format.
Definition: type_base.hh:106
std::ostream & operator<<(std::ostream &stream, const TypeBase &type)
For convenience we provide also redirection operator for output documentation of Input:Type classes...
Definition: type_base.cc:240
Record type proxy class.
Definition: type_record.hh:182
unsigned int lower_bound_
Minimal size of Array.
Definition: type_base.hh:364
Class for declaration of the input data that are in string format.
Definition: type_base.hh:589
std::size_t TypeHash
Type returned by content_hash methods.
Definition: type_base.hh:102
std::vector< ParameterPair > ParameterVector
Define vector of parameters passed to the overloaded make_instance method.
Definition: type_base.hh:113