Add Means of Retrieving Node Names from Extended Network

This commit adds a new member function

    ExtNetwork::node_names() const

which collects the names (std::string) of all nodes in a network.
The immediate use case is creating summary config nodes for network
level quantities specified without explicit lists of nodes, e.g.,

    GPR
    /

Add a simple unit test for demonstration.
This commit is contained in:
Bård Skaflestad
2020-09-19 00:13:13 +02:00
parent 6ea0e73512
commit dbfd013cf4
3 changed files with 67 additions and 3 deletions

View File

@@ -45,7 +45,7 @@ public:
const Node& root() const;
std::vector<Branch> downtree_branches(const std::string& node) const;
std::optional<Branch> uptree_branch(const std::string& node) const;
std::vector<std::string> node_names() const;
bool operator==(const ExtNetwork& other) const;
static ExtNetwork serializeObject();