Example #1
0
Stoppable::Stoppable (std::string name, Stoppable& parent)
    : m_name (std::move (name))
    , m_root (parent.m_root)
    , m_child (this)
{
    // Must not have stopping parent.
    assert (! parent.isStopping());

    parent.m_children.push_front (&m_child);
}
Example #2
0
Stoppable::Stoppable (char const* name, Stoppable& parent)
    : m_name (name)
    , m_root (parent.m_root)
    , m_child (this)
    , m_stopped (false)
    , m_childrenStopped (false)
{
    // Must not have stopping parent.
    bassert (! parent.isStopping());

    parent.m_children.push_front (&m_child);
}
bool
DepotMatchingRepositoryListener::Handle(DumpExportRepository* repository)
{
	int32 i;

	for (i = 0; i < repository->CountRepositorySources(); i++) {
		repository_and_repository_source repositoryAndRepositorySource;
		repositoryAndRepositorySource.repository = repository;
		repositoryAndRepositorySource.repositorySource =
			repository->RepositorySourcesItemAt(i);

		BString* repoInfoURL = repositoryAndRepositorySource
			.repositorySource->RepoInfoUrl();

		if (!repoInfoURL->IsEmpty()) {
			fModel->ReplaceDepotByUrl(*repoInfoURL, this,
				&repositoryAndRepositorySource);
		}
	}

	return !fStoppable->WasStopped();
}