ObjectIterator Connection::execQuery(const tchar* query) const { ASSERT(isOpen()); WCL::ComStr language(L"WQL"); WCL::ComStr queryText(query); long flags(WBEM_FLAG_RETURN_IMMEDIATELY | WBEM_FLAG_FORWARD_ONLY); IEnumWbemClassObjectPtr enumerator; // Execute it. HRESULT result = m_services->ExecQuery(language.Get(), queryText.Get(), flags, nullptr, AttachTo(enumerator)); if (FAILED(result)) throw Exception(result, m_services, TXT("Failed to execute a WMI query")); return ObjectIterator(enumerator, *this); }
//----------------------------------------------------------------------- SceneNode::ObjectIterator SceneNode::getAttachedObjectIterator(void) { return ObjectIterator(mObjectsByName.begin(), mObjectsByName.end()); }
/** * Specification says it's undefined. In the current implementation * though, jobj_iter_init_last will return a NULL pointer when this isn't * an object (it also takes care of printing errors to the log) * * Specification says undefined if we try to iterate - current implementation * won't let you iterate once you hit end. */ JValue::ObjectIterator JValue::end() { return ObjectIterator(); }
/** * specification says it's undefined. in the current implementation * though, jobj_iter_init should return end() when this isn't an object * (it also takes care of printing errors to the log) */ JValue::ObjectIterator JValue::begin() { return ObjectIterator(m_jval); }
DiCullNode::ObjectIterator DiCullNode::GetAttachedObjectIterator() { return ObjectIterator(mObjectsByName.begin(), mObjectsByName.end()); }