46 lines
1.4 KiB
C++
46 lines
1.4 KiB
C++
#pragma once
|
|
|
|
#include "dtcore/inc/dttest.h"
|
|
#include "dtcore/inc/dtscriptobject.h"
|
|
#include "dtcore/inc/dtstreamtextoutput.h"
|
|
#include "dtcore/inc/dtlogger.h"
|
|
|
|
namespace dt
|
|
{
|
|
|
|
class ScriptStatement;
|
|
class ScriptStatementCompound;
|
|
class ClientService;
|
|
class ConnectionDescriptor;
|
|
class ScriptStateImpl;
|
|
class MessageSynchronizeScriptStatementStart;
|
|
class MessageScriptSynchronize;
|
|
|
|
class ScriptState
|
|
{
|
|
public:
|
|
ScriptState(ClientService* service);
|
|
~ScriptState();
|
|
bool TryGetVariable(const String& name, const ScriptStatementCompound* parent, const ScriptObject** value);
|
|
const ScriptObject& GetVariable(const String& name, const ScriptStatementCompound* parent);
|
|
void SetVariable(const String& name, const ScriptStatementCompound* parent, const ScriptObject& value);
|
|
void DeclareVariable(const String& name, const ScriptStatementCompound* parent);
|
|
ShowProgressionMode GetShowProgressionMode() const;
|
|
void SetShowProgressionMode(ShowProgressionMode value);
|
|
|
|
Vector<int> GetStack() const;
|
|
|
|
private:
|
|
friend class ScriptStatement;
|
|
void PushStack(ScriptStatement* stm);
|
|
void PopStack(ScriptStatement* stm);
|
|
void Synchronize(int stmId);
|
|
bool IsSynchronized() const;
|
|
void SynchronizationEnable(ScriptStatement* stm);
|
|
void SynchronizationDisable(ScriptStatement* stm);
|
|
|
|
ScriptStateImpl* m_Impl;
|
|
};
|
|
|
|
}
|
|
|