Flow123d
release_2.2.0-34-g18a8075
|
#include <accessors.hh>
Public Types | |
typedef T | DispatchType |
Converts C++ type T (template parameter) to 'DispatchType' from smaller set of types. More... | |
typedef internal::TypeDispatch< DispatchType >::ReadType | OutputType |
typedef internal::TypeDispatch< DispatchType >::InputType | InputType |
Public Member Functions | |
Iterator () | |
Iterator (const Input::Type::TypeBase &type, const Address &address, const unsigned int index) | |
Iterator< T > & | operator++ () |
Prefix. Advance operator. More... | |
Iterator< T > & | operator-- () |
Prefix. Back operator. More... | |
OutputType | operator* () const |
OutputType * | operator-> () const |
Public Member Functions inherited from Input::IteratorBase | |
IteratorBase (const Address &address, const unsigned int index) | |
bool | operator== (const IteratorBase &that) const |
Comparison of two Iterators. Do no compare types only position in the storage. More... | |
bool | operator!= (const IteratorBase &that) const |
operator bool () const | |
unsigned int | idx () const |
const Address & | get_address () const |
Static Private Member Functions | |
static InputType | type_check_and_convert (const Input::Type::TypeBase &type) |
Private Attributes | |
InputType | type_ |
Input type declaration. More... | |
internal::TypeDispatch< DispatchType >::TmpType | temporary_value_ |
Additional Inherited Members | |
Protected Attributes inherited from Input::IteratorBase | |
Address | address_ |
unsigned int | index_ |
This class behaves like iterator to type T
(the template parameter), but in fact it is iterator into input storage and also into tree of declarations through Input::Type classes.
This class provides only limited functionality of iterators, namely prefix advance operator ++(), dereference operator * (), dereference operator -> (), comparison operators == and != and implicit conversion to bool (false in the case of the 'null' iterator).
Definition at line 144 of file accessors.hh.
typedef T Input::Iterator< T >::DispatchType |
Converts C++ type T
(template parameter) to 'DispatchType' from smaller set of types.
Definition at line 732 of file accessors.hh.
typedef internal::TypeDispatch<DispatchType>::InputType Input::Iterator< T >::InputType |
A descendant of Input::Type::TypeBase that is appropriate to template parameter T
.
Definition at line 741 of file accessors.hh.
typedef internal::TypeDispatch<DispatchType>::ReadType Input::Iterator< T >::OutputType |
For small set of C++ types and accessor classes Record, AbstractRecord, and Array, returns type of value given by dereference of the iterator (just add const to C++ types).
Definition at line 737 of file accessors.hh.
|
inline |
Iterator is not default constructible.
Constructor uses empty Address which causes error in program, Address has to be filled.
Definition at line 749 of file accessors.hh.
|
inline |
Constructor. Creates iterator effectively pointing to data address_->get_storage()->get_item(index), that is parameter address
points to StorageArray and parameter index
gives index into this array. Parameter type
is Input::Type of object the iterator points to.
Definition at line 758 of file accessors.hh.
|
inline |
Dereference operator * ; Shouldn't we return type T, i.e. try to cast from OutputType to T ??
Definition at line 228 of file accessors_impl.hh.
|
inline |
Prefix. Advance operator.
Definition at line 212 of file accessors_impl.hh.
|
inline |
Prefix. Back operator.
Definition at line 220 of file accessors_impl.hh.
|
inline |
Dereference operator can be used only for iterators to accessors Record, AbstractRecord, and Array.
Definition at line 238 of file accessors_impl.hh.
|
staticprivate |
Check that Type::TypeBase reference is in fact object of InputType and returns converted copy (note that Type declaration objects are only handles.
Definition at line 252 of file accessors_impl.hh.
|
mutableprivate |
temporary for -> operator, necessary only for T == DispatchType == OutputType == any accessor: Record, AbstractRecord, Array
for other types this is just an int.
Definition at line 796 of file accessors.hh.
|
private |
Input type declaration.
Definition at line 788 of file accessors.hh.