Exemple #1
0
OP_STATUS IndexGroupWatched::IndexAdded(Indexer *indexer, UINT32 index_id)
{
	if (m_or_range_start <= index_id && index_id < m_or_range_end)
	{
		Index* index = indexer->GetIndexById(index_id);

		if (index && index->IsWatched())
		{
			return AddIndex(index_id);
		}
	}

	return OpStatus::OK;
}
Exemple #2
0
OP_STATUS IndexGroupWatched::IndexVisibleChanged(Indexer *indexer, UINT32 index_id)
{
	if (m_or_range_start <= index_id && index_id < m_or_range_end)
	{
		Index* index = indexer->GetIndexById(index_id);
		if (index)
		{
			if (index->IsWatched())
			{
				return AddIndex(index_id);
			}
			else if (m_indexes.Contains(index_id))
				return IndexRemoved(indexer, index_id);
		}
	}
	
	return OpStatus::OK;
}
Exemple #3
0
IndexGroupWatched::IndexGroupWatched(index_gid_t index_id, index_gid_t range_start, index_gid_t range_end)
	: UnionIndexGroup(index_id)
	, m_or_range_start(range_start)
	, m_or_range_end(range_end)
{
	// Or all indexes currently in the range that are being watched
	INT32 it = -1;
	Index* index = m_indexer->GetRange(range_start, range_end, it);

	while (index)
	{
		if (index->IsWatched())
		{
			AddIndex(index->GetId());
		}
		index = m_indexer->GetRange(range_start, range_end, it);
	}
}