Ejemplo n.º 1
0
ConstObjectIterator Manager::objects(void) const {
    ConstObjectIterator it;
    if (nm_mgr_nodes(&it._it, *this) != 0) {
        throw ::std::runtime_error("get named objects of Manager fail!");
    }
    it._next = it.next_i();
    return it;
}
Ejemplo n.º 2
0
ConstObjectIterator
Object::groups(void) const {
    ConstObjectIterator it;
    if (nm_node_groups(&it._it, *this) != 0) {
        ::std::ostringstream os;
        os << "get groups of named object " << name() << " fail!";
        throw ::std::runtime_error(os.str());
    }
    it._next = it.next_i();
    return it;
}