This is an example of how to use all API related to object attributes.
#include <iostream>
#include <string>
using T = int;
T* obj =
manager.construct<T>(
"obj")();
[[maybe_unused]] bool flag;
[[maybe_unused]] std::size_t n;
[[maybe_unused]] iterator_t itr;
{
n =
manager.get_instance_length<T>(obj);
manager.get_instance_description<T>(obj, &str);
manager.set_instance_description<T>(obj,
"foo");
}
{
flag = asn.good();
n = asn.num_objects();
n = asn.count("obj");
itr = asn.find("name");
itr = asn.begin();
itr = asn.end();
flag = asn.set_description("obj", "foo");
flag = asn.set_description(itr, "foo");
flag = asu.good();
n = asu.num_objects();
n = asu.count(typeid(T).name());
n = asu.count<T>(metall::unique_instance);
itr = asu.find(typeid(T).name());
itr = asu.find<T>(metall::unique_instance);
itr = asu.begin();
itr = asu.end();
asu.set_description(typeid(T).name(), "foo");
asu.set_description<T>(metall::unique_instance, "foo");
asu.set_description(itr, "foo");
flag = asa.good();
n = asa.num_objects();
itr = asa.begin();
itr = asa.end();
asa.set_description(itr, "foo");
}
{
itr->name();
n = itr->length();
itr->type_id();
itr->description();
flag = itr->is_type<T>();
}
return 0;
}
int main()
Definition: jgraph.cpp:24