Guest User

Untitled

a guest
Dec 9th, 2019
108
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. template<class T>
  2. class TreapNode{
  3. public:
  4.  
  5. // STEP-BY-STEP
  6.  
  7. static void loopLatency();
  8. static void changeLoopState();
  9. void changeStepByStepMode();
  10. void setDisableStepMode();
  11.  
  12. private:
  13. static bool stepLoopSwitcher;
  14. static bool stepButStepEnable;
  15.  
  16. };
  17. template<class T>
  18. void TreapNode<T>::changeLoopState(){
  19. stepLoopSwitcher = false;
  20. }
  21.  
  22. template<class T>
  23. void TreapNode<T>::changeStepByStepMode(){
  24. stepButStepEnable = true;
  25. }
  26.  
  27. template<class T>
  28. void TreapNode<T>::setDisableStepMode(){
  29. stepButStepEnable = false;
  30. }
  31.  
  32. template<class T>
  33. void TreapNode<T>::loopLatency(){
  34. qDebug() << "Loop latency for step-by-step started" << endl;
  35. for( ; ; ) {
  36. QApplication::processEvents();
  37. if(stepLoopSwitcher == false) break;
  38. }
  39. stepLoopSwitcher = true;
  40. }
RAW Paste Data