//////////////////////////////////////////////////////////////////////////////////// /// /// \return List of manually created connections to JAUS components. These /// are connections not made through the discovery process and cannot /// be closed through discovery either (only manually). /// //////////////////////////////////////////////////////////////////////////////////// Address::List JUDP::GetManualConnections() const { Address::List copy; { Mutex::ScopedLock lock(&mClientsMutex); std::map<Address, bool>::const_iterator p; for(p = mPermanentConnections.begin(); p != mPermanentConnections.end(); p++) { copy.push_back(p->first); } } return copy; }
//////////////////////////////////////////////////////////////////////////////////// /// /// \return List of all components currently controlled by the service. /// //////////////////////////////////////////////////////////////////////////////////// Address::List AccessControl::GetControlledComponents() const { Mutex::ScopedLock lock(&mControlMutex); Address::List result; std::map<Address, bool>::const_iterator flags; for(flags = mControlFlags.begin(); flags != mControlFlags.end(); flags++) { if(flags->second) { result.push_back(flags->first); } } return result; }
//////////////////////////////////////////////////////////////////////////////////// /// /// \brief Gets the Subsystem::Configuration of the subsystem. /// //////////////////////////////////////////////////////////////////////////////////// Address::List Subsystem::GetAddressList() const { Address::List results; Configuration::const_iterator node; for(node = mConfiguration.begin(); node != mConfiguration.end(); node++) { Component::Set::const_iterator component; for(component = node->second.begin(); component != node->second.end(); component++) { results.push_back(component->mID); } } return results; }
bool Document::SetMultiCell(Address const& rAddr, MultiCell* pMultiCell, bool Force) { if (Force == false) { MultiCell::Map::iterator itMultiCell = m_MultiCells.find(rAddr); if (itMultiCell != m_MultiCells.end()) return false; } m_MultiCells[rAddr] = pMultiCell; m_spDatabase->AddMultiCell(rAddr, *pMultiCell); m_DocumentUpdatedSignal(); Address::List AddressList; AddressList.push_back(rAddr); m_AddressUpdatedSignal(AddressList); return true; }
//////////////////////////////////////////////////////////////////////////////////// /// /// \param[in] name Name of Service to look for. /// /// \return List of component IDs for those supporting a specific Service. /// //////////////////////////////////////////////////////////////////////////////////// Address::List Subsystem::GetComponentsWithService(const std::string& name) const { Address::List results; Configuration::const_iterator node; for(node = mConfiguration.begin(); node != mConfiguration.end(); node++) { Component::Set::const_iterator component; for(component = node->second.begin(); component != node->second.end(); component++) { Service::ID::Set::const_iterator service; service = component->mServices.find(Service::ID(name)); if(service != component->mServices.end()) { results.push_back(component->mID); } } } return results; }