trying to find a consistent and C++1x styled graph representation
This commit is contained in:
parent
f6c7f1adbb
commit
2e151b87c6
13 changed files with 528 additions and 31 deletions
|
@ -40,13 +40,14 @@ int main(int argc,char **argv) {
|
|||
|
||||
using namespace pw;
|
||||
|
||||
node::ref root(std::make_shared<node>("root"));
|
||||
root->add_child(std::make_shared<node>("sub-1"));
|
||||
node::ref root(std::make_shared<node>());
|
||||
root->set_name("root");
|
||||
root->add_child()->set_name("sub-1");
|
||||
|
||||
node::ref sub_2_1 = std::make_shared<node>("sub-2-1");
|
||||
// node::ref sub_2_1 = std::make_shared<node>("sub-2-1");
|
||||
|
||||
root->add_child(std::make_shared<node>("sub-3"))->add_child(sub_2_1);
|
||||
root->add_child(std::make_shared<node>("sub-2"))->add_child(std::make_shared<node>("sub-2-2"));
|
||||
// root->add_child(std::make_shared<node>("sub-3"))->add_child(sub_2_1);
|
||||
// root->add_child(std::make_shared<node>("sub-2"))->add_child(std::make_shared<node>("sub-2-2"));
|
||||
|
||||
// std::cout << "sub-2-1 parent count: " << sub_2_1->parents().size() << std::endl;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue