19 using namespace boost;
25 int main(
int argc,
char * argv[])
29 shared_ptr<Group> world = allocate_component<Group>(
"World");
56 Handle<Link> current_country = world->create_component<
Link>(
"Current_Country");
57 current_country->
link_to(*belgium);
58 CFinfo <<
"Current country : " << current_country->follow()->uri() <<
CFendl;
76 asia->remove_component(
"Thailand");
88 Handle<Component> a_country = world->access_component(
"cpath:/Europe/United_Kingdom");
92 Handle<Group> found_canada = find_component_ptr_recursively_with_name<Group>(*world,
"Canada");
#define CFinfo
these are always defined
Safe pointer to an object. This is the supported method for referring to components.
external boost library namespace
Link & link_to(Component &lnkto)
void move_to(Component &to_parent)
URI uri() const
Construct the full path.
const std::string & name() const
Access the name of the component.
int main(int argc, char *argv[])
Holds the Component class, as well as the ComponentIterator class plus some functions related to comp...
Component for grouping other components.
Top-level namespace for coolfluid.
Most basic kernel library.
bool is_not_null(T ptr)
predicate for comparison to nullptr