All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UT_CycleDetect< T >::AutoScope Class Reference

#include <UT_Algorithm.h>

Public Member Functions

 AutoScope (UT_CycleDetect< T > *cycle)
 ~AutoScope ()
void reset ()

Detailed Description

template<typename T>
class UT_CycleDetect< T >::AutoScope

Helper class for automatically saving and restoring the state of the cycle detection within a scope block.


T walk;
UT_CycleDetect<T> cycle;
    UT_CycleDetect<T>::AutoScope cycle_detect_scope(cycle);
    if (!cycle.detect(<some_object>))
        ... do some work that may recursively update the cycle ...
        ... cycle detected.  Do work to report/handle cycle ...


Definition at line 82 of file UT_Algorithm.h.

Constructor & Destructor Documentation

template<typename T>
UT_CycleDetect< T >::AutoScope::AutoScope ( UT_CycleDetect< T > *  cycle)

Definition at line 85 of file UT_Algorithm.h.

template<typename T>
UT_CycleDetect< T >::AutoScope::~AutoScope ( )

Definition at line 94 of file UT_Algorithm.h.

Member Function Documentation

template<typename T>
void UT_CycleDetect< T >::AutoScope::reset ( void  )

Definition at line 108 of file UT_Algorithm.h.

The documentation for this class was generated from the following file: