Пример #1
0
        bool enterSection( std::string const& name ) {
            TrackedSection* child = m_currentSection->acquireChild( name );
            if( m_completedASectionThisRun || child->runState() == TrackedSection::Completed )
                return false;

            m_currentSection = child;
            m_currentSection->enter();
            return true;
        }
 bool enterSection( std::string const& name ) {
     if( m_completedASectionThisRun )
         return false;
     if( m_currentSection->runState() == TrackedSection::Executing ) {
         m_currentSection->addChild( name );
         return false;
     }
     else {
         TrackedSection* child = m_currentSection->getChild( name );
         if( child->runState() != TrackedSection::Completed ) {
             m_currentSection = child;
             m_currentSection->enter();
             return true;
         }
         return false;
     }
 }