BornAgain  1.18.0
Simulate and fit neutron and x-ray scattering at grazing incidence
NodeUtils.h
Go to the documentation of this file.
1 // ************************************************************************** //
2 //
3 // BornAgain: simulate and fit scattering at grazing incidence
4 //
5 //! @file Param/Node/NodeUtils.h
6 //! @brief Defines collection of utility functions for INode.
7 //!
8 //! @homepage http://www.bornagainproject.org
9 //! @license GNU General Public License v3 or higher (see COPYING)
10 //! @copyright Forschungszentrum Jülich GmbH 2018
11 //! @authors Scientific Computing Group at MLZ (see CITATION, AUTHORS)
12 //
13 // ************************************************************************** //
14 
15 #ifndef BORNAGAIN_CORE_PARAMETRIZATION_NODEUTILS_H
16 #define BORNAGAIN_CORE_PARAMETRIZATION_NODEUTILS_H
17 
18 #include <string>
19 
20 class INode;
21 
22 namespace NodeUtils
23 {
24 
25 //! Returns multiline string representing tree structure starting from given node.
26 std::string nodeToString(const INode& node);
27 
28 //! Returns path composed of node's displayName, with respect to root node
29 std::string nodePath(const INode& node, const INode* root = nullptr);
30 
31 } // namespace NodeUtils
32 
33 #endif // BORNAGAIN_CORE_PARAMETRIZATION_NODEUTILS_H
Base class for tree-like structures containing parameterized objects.
Definition: INode.h:49
std::string nodePath(const INode &node, const INode *root=nullptr)
Returns path composed of node's displayName, with respect to root node.
Definition: NodeUtils.cpp:82
std::string nodeToString(const INode &node)
Returns multiline string representing tree structure starting from given node.
Definition: NodeUtils.cpp:67