Beispiel #1
0
void gcomm::gmcast::Proto::send_topology_change(LinkMap& um)
{
    Message::NodeList nl;
    for (LinkMap::const_iterator i = um.begin(); i != um.end(); ++i)
    {
        if (LinkMap::key(i) == UUID::nil() ||
            LinkMap::value(i).addr() == "")
            gu_throw_fatal << "nil uuid or empty address";

        nl.insert_unique(
            std::make_pair(LinkMap::key(i),
                           Node(LinkMap::value(i).addr())));
    }

    Message msg(version_, Message::T_TOPOLOGY_CHANGE, local_uuid_,
                group_name_, nl);

    send_msg(msg);
}
Beispiel #2
0
USDLUX_API
bool
UsdLuxLinkingAPI::DoesLinkPath(const LinkMap &linkMap, const SdfPath &path)
{
    if (!path.IsAbsolutePath()) {
        TF_CODING_ERROR("Path %s must be absolute\n",
                        path.GetText());
        return false;
    }
    // Scan for closest containing opinion
    for (SdfPath p = path; p != SdfPath::EmptyPath(); p = p.GetParentPath()) {
        const LinkMap::const_iterator i = linkMap.find(p);
        if (i != linkMap.end()) {
            return i->second;
        }
    }
    // Any path not explicitly mentioned, and that does not inherit
    // its setting from a prefix path, is included.
    return true;
}