Flow123d  JS_before_hm-2198-g122e1f2e2
Classes | Public Member Functions | Protected Attributes | List of all members
Input::Address Class Reference

#include <accessors.hh>

Classes

struct  AddressData
 

Public Member Functions

 Address ()
 
 Address (const StorageBase *storage_root, const Type::TypeBase *type_root)
 
 Address (const Address &other)
 
std::shared_ptr< Addressdown (unsigned int idx) const
 
const StorageBasestorage_head () const
 
std::string make_full_address () const
 

Protected Attributes

std::shared_ptr< AddressDatadata_
 

Detailed Description

Class for storing and formating input address of an accessor (necessary for input errors detected after readed).

To get full path of an accessor we need:

TODO:

Definition at line 165 of file accessors.hh.

Constructor & Destructor Documentation

◆ Address() [1/3]

Input::Address::Address ( )

Empty constructor.

Constructor should be called only by empty accessors.

Definition at line 54 of file accessors.cc.

◆ Address() [2/3]

Input::Address::Address ( const StorageBase storage_root,
const Type::TypeBase type_root 
)

Basic constructor. We forbids default one since we always need the root input type.

Definition at line 64 of file accessors.cc.

◆ Address() [3/3]

Input::Address::Address ( const Address other)

Copy constructor. TODO: For optimization we can use one vector of storage pointers shared (using shared_ptr) by all accessors along the path.

Definition at line 80 of file accessors.cc.

Member Function Documentation

◆ down()

std::shared_ptr< Address > Input::Address::down ( unsigned int  idx) const

Dive deeper in the storage tree following index idx. Assumes that actual node is an StorageArray, has to be asserted.

Definition at line 94 of file accessors.cc.

◆ make_full_address()

std::string Input::Address::make_full_address ( ) const

Produce a full address, i.e. sequence of keys and indices separated by '/', that leads from the root storage and root Input::Type::TypeBase to the actual node in the storage that is nodes_[actual_node_].

Definition at line 105 of file accessors.cc.

Here is the caller graph for this function:

◆ storage_head()

const StorageBase* Input::Address::storage_head ( ) const
inline

Getter. Returns actual storage node.

Definition at line 224 of file accessors.hh.

Here is the caller graph for this function:

Member Data Documentation

◆ data_

std::shared_ptr<AddressData> Input::Address::data_
protected

Shared part of address.

Definition at line 242 of file accessors.hh.


The documentation for this class was generated from the following files: