X-Git-Url: https://git.ucc.asn.au/?p=ipdf%2Fcode.git;a=blobdiff_plain;f=src%2Fdebugscript.h;fp=src%2Fdebugscript.h;h=8b62b5ccbba15c03c2f4b8a708582377bf8a79a1;hp=369720106507f695ea2c5b26011b96f79a326ed9;hb=b29310a04a51cd7d39d0858e2dec8a75c15cf097;hpb=748d002a813bbe6309dd22259bdce3278c02b0c8 diff --git a/src/debugscript.h b/src/debugscript.h index 3697201..8b62b5c 100644 --- a/src/debugscript.h +++ b/src/debugscript.h @@ -13,6 +13,8 @@ namespace IPDF class DebugScript { public: + DebugScript() : inp(), currentAction(), m_actions(), m_labels(), m_index(0) {} + virtual ~DebugScript() {} void Load(const char *filename) { inp.open(filename); @@ -31,6 +33,9 @@ private: AT_EnableLazyRendering, AT_DisableLazyRendering, AT_LoadSVG, + AT_Label, + AT_Goto, + AT_Debug, AT_Quit }; @@ -42,14 +47,16 @@ private: Real z; int iz; int loops; - std::string filename; - Action() : type(AT_WaitFrame), x(0), y(0), ix(0), iy(0), z(0), loops(0) {} + std::string textargs; + Action() : type(AT_WaitFrame), x(0), y(0), ix(0), iy(0), z(0), loops(0), textargs("") {} }; std::ifstream inp; Action currentAction; - + std::vector m_actions; + std::map m_labels; + unsigned m_index; void ParseAction(); };