summaryrefslogtreecommitdiff
path: root/indra/llcommon/lltracerecording.h
diff options
context:
space:
mode:
authorRichard Linden <none@none>2013-01-17 20:12:10 -0800
committerRichard Linden <none@none>2013-01-17 20:12:10 -0800
commitb030b6b00e8913e025f248c90438919fa691f0f9 (patch)
treeec56192a6c008ee6f5beffcaa17d7638c5229c46 /indra/llcommon/lltracerecording.h
parent43a92d01afdb4f1dd4003059b79f87e9687527a1 (diff)
parent670d03ceb83b92c9bb98d10bb37fba6f75971a2f (diff)
Merge
Diffstat (limited to 'indra/llcommon/lltracerecording.h')
-rw-r--r--indra/llcommon/lltracerecording.h21
1 files changed, 10 insertions, 11 deletions
diff --git a/indra/llcommon/lltracerecording.h b/indra/llcommon/lltracerecording.h
index aa3200e5ad..e6b5e85f90 100644
--- a/indra/llcommon/lltracerecording.h
+++ b/indra/llcommon/lltracerecording.h
@@ -39,7 +39,7 @@ class LLStopWatchControlsMixinCommon
public:
virtual ~LLStopWatchControlsMixinCommon() {}
- enum EStopWatchState
+ enum EPlayState
{
STOPPED,
PAUSED,
@@ -53,19 +53,18 @@ public:
virtual void restart();
virtual void reset();
- bool isStarted() const { return mState == STARTED; }
- bool isPaused() const { return mState == PAUSED; }
- bool isStopped() const { return mState == STOPPED; }
- EStopWatchState getPlayState() const { return mState; }
+ bool isStarted() const { return mPlayState == STARTED; }
+ bool isPaused() const { return mPlayState == PAUSED; }
+ bool isStopped() const { return mPlayState == STOPPED; }
+ EPlayState getPlayState() const { return mPlayState; }
+ // force play state to specific value by calling appropriate handle* methods
+ void setPlayState(EPlayState state);
protected:
LLStopWatchControlsMixinCommon()
- : mState(STOPPED)
+ : mPlayState(STOPPED)
{}
- // derived classes can call this from their copy constructor in order
- // to duplicate play state of source
- void initTo(EStopWatchState state);
private:
// trigger active behavior (without reset)
virtual void handleStart(){};
@@ -74,7 +73,7 @@ private:
// clear accumulated state, can be called while started
virtual void handleReset(){};
- EStopWatchState mState;
+ EPlayState mPlayState;
};
template<typename DERIVED>
@@ -245,7 +244,7 @@ namespace LLTrace
: public LLStopWatchControlsMixin<PeriodicRecording>
{
public:
- PeriodicRecording(S32 num_periods, EStopWatchState state = STOPPED);
+ PeriodicRecording(S32 num_periods, EPlayState state = STOPPED);
PeriodicRecording(PeriodicRecording& recording);
~PeriodicRecording();