|
Flow123d
jenkins-Flow123d-linux-release-multijob-282
|
Class for declaration of inputs sequences. More...
#include <type_base.hh>


Classes | |
| class | ArrayData |
Public Member Functions | |
| template<class ValueType > | |
| Array (const ValueType &type, unsigned int min_size=0, unsigned int max_size=std::numeric_limits< unsigned int >::max()) | |
| std::size_t | content_hash () const override |
| virtual bool | finish () |
| Finishes initialization of the Array type because of lazy evaluation of type_of_values. More... | |
| virtual bool | is_finished () const |
| const TypeBase & | get_sub_type () const |
| Getter for the type of array items. More... | |
| bool | match_size (unsigned int size) const |
| Checks size of particular array. More... | |
| virtual string | type_name () const |
Implements Type::TypeBase::type_name. Name has form array_of_'subtype name'. More... | |
| virtual string | full_type_name () const |
Implements Type::TypeBase::full_type_name. More... | |
| virtual bool | operator== (const TypeBase &other) const |
Implements Type::TypeBase::operator== Compares also subtypes. More... | |
| virtual bool | valid_default (const string &str) const |
Public Member Functions inherited from Input::Type::TypeBase | |
| string | desc () const |
| bool | operator!= (const TypeBase &other) const |
| Comparison of types. More... | |
| virtual | ~TypeBase () |
Protected Attributes | |
| boost::shared_ptr< ArrayData > | data_ |
| Handle to the actual array data. More... | |
Private Member Functions | |
| Array () | |
| Forbids default constructor in order to prevent empty data_. More... | |
Friends | |
| class | OutputBase |
Additional Inherited Members | |
Static Public Member Functions inherited from Input::Type::TypeBase | |
| static void | lazy_finish () |
| Finishes all registered lazy types. More... | |
Protected Types inherited from Input::Type::TypeBase | |
| typedef string | KeyHash |
| typedef std::vector < boost::shared_ptr< TypeBase > > | LazyTypeVector |
| typedef std::set< const TypeBase * > | LazyObjectsSet |
Protected Member Functions inherited from Input::Type::TypeBase | |
| TypeBase () | |
| TypeBase (const TypeBase &other) | |
Static Protected Member Functions inherited from Input::Type::TypeBase | |
| static KeyHash | key_hash (const string &str) |
| Hash function. More... | |
| static bool | is_valid_identifier (const string &key) |
| static LazyTypeVector & | lazy_type_list () |
| static LazyObjectsSet & | lazy_object_set () |
| static bool | was_constructed (const TypeBase *ptr) |
Class for declaration of inputs sequences.
The type is fully specified after its constructor is called. All elements of the Array has same type, however you can use elements of AbstractRecord.
If you not disallow Array size 1, the input reader will try to convert any other type on input into array with one element, e.g.
Definition at line 239 of file type_base.hh.
| Input::Type::Array::Array | ( | const ValueType & | type, |
| unsigned int | min_size = 0, |
||
| unsigned int | max_size = std::numeric_limits<unsigned int>::max() |
||
| ) |
Constructor with a type of array items given as pure reference. In this case type has to by descendant of TypeBase different from 'complex' types Record and Selection. You can also specify minimum and maximum size of the array.
Definition at line 226 of file type_base.cc.
|
private |
Forbids default constructor in order to prevent empty data_.
|
overridevirtual |
Hash of the type specification. Provides unique id computed from its content (definition) so that same types have same hash.
Implements Input::Type::TypeBase.
Definition at line 140 of file type_base.cc.

|
virtual |
Finishes initialization of the Array type because of lazy evaluation of type_of_values.
Reimplemented from Input::Type::TypeBase.
Definition at line 151 of file type_base.cc.
|
virtual |
Implements Type::TypeBase::full_type_name.
Reimplemented from Input::Type::TypeBase.
Definition at line 199 of file type_base.cc.

|
inline |
Getter for the type of array items.
Definition at line 277 of file type_base.hh.

|
inlinevirtual |
Returns true if the type is fully specified and ready for read access. For Record and Array types this say nothing about child types referenced in particular type object. In particular for Record and Selection, it returns true after finish() method is called.
Reimplemented from Input::Type::TypeBase.
Definition at line 273 of file type_base.hh.
|
inline |
Checks size of particular array.
Definition at line 282 of file type_base.hh.

|
virtual |
Implements Type::TypeBase::operator== Compares also subtypes.
Reimplemented from Input::Type::TypeBase.
Definition at line 205 of file type_base.cc.
|
virtual |
Implements Type::TypeBase::type_name. Name has form array_of_'subtype name'.
Reimplemented from Input::Type::TypeBase.
Definition at line 195 of file type_base.cc.
|
virtual |
Default values for an array creates array containing one element that is initialized by given default value. So this method check if the default value is valid for the sub type of the array.
Implements Input::Type::TypeBase.
Definition at line 212 of file type_base.cc.
|
friend |
Definition at line 240 of file type_base.hh.
|
protected |
Handle to the actual array data.
Definition at line 304 of file type_base.hh.
1.8.5