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);
}