LoopScriptNodes.h

Go to the documentation of this file.
00001 /*
00002  *      LoopScriptNodes.h -
00003  *
00004  *  Copyright (C) 2002-2003 The Pentagram Team
00005  *
00006  *  This program is free software; you can redistribute it and/or modify
00007  *  it under the terms of the GNU General Public License as published by
00008  *  the Free Software Foundation; either version 2 of the License, or
00009  *  (at your option) any later version.
00010  *
00011  *  This program is distributed in the hope that it will be useful,
00012  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  *  GNU General Public License for more details.
00015  *
00016  *  You should have received a copy of the GNU General Public License
00017  *  along with this program; if not, write to the Free Software
00018  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00019  */
00020 
00021 #ifndef LOOPSCRIPTNODES_H
00022 #define LOOPSCRIPTNODES_H
00023 
00024 #include "GenericNodes.h"
00025 
00026 
00027 class LoopScriptNode : public Node
00028 {
00029         public:
00030                 LoopScriptNode(const uint32 opcode, const uint32 offset, const uint32 newScriptTok)
00031                         : Node(opcode, offset, Type(Type::T_INVALID)), scriptTok(newScriptTok)
00032                         {
00033                                 assert(acceptOp(opcode, 0x74));
00034                         };
00035                 ~LoopScriptNode() {};
00036                 
00037                 void print_unk(Console &o, const uint32 isize) const;
00038                 void print_asm(Console &o) const;
00039                 void print_bin(ODequeDataSource &o) const;
00040                 bool fold(DCUnit *unit, std::deque<Node *> &nodes);
00041                 
00042                 const uint32 lsTok() const { return scriptTok; };
00043 
00044         protected:
00045 
00046         private:
00047                 uint32 scriptTok;
00048 };
00049 
00050 class LoopNode : public ColNode
00051 {
00052         public:
00053                 LoopNode() : ColNode() {};
00054                 LoopNode(const uint32 opcode, const uint32 offset, const uint32 newCurrObj, const uint32 newStrSize, const uint32 newSearchType)
00055                         : ColNode(opcode, offset, Type(Type::T_VOID)), currObj(newCurrObj), strSize(newStrSize), searchType(newSearchType)
00056                         {
00057                                 assert(acceptOp(opcode, 0x70));
00058                         };
00059                 ~LoopNode() {};
00060 
00061                 void print_unk(Console &o, const uint32 isize) const;
00062                 void print_asm(Console &o) const;
00063                 void print_bin(ODequeDataSource &o) const;
00064 
00065                 bool fold(DCUnit *unit, std::deque<Node *> &nodes);
00066 
00067         protected:
00068 
00069         private:
00070                 uint32 currObj;
00071                 uint32 strSize;
00072                 uint32 searchType;
00073 };
00074 
00075 class LoopNextNode : public Node
00076 {
00077         public:
00078                 LoopNextNode(const uint32 opcode, const uint32 offset)
00079                         : Node(opcode, offset, Type(Type::T_INVALID))
00080                         {
00081                                 assert(acceptOp(opcode, 0x73));
00082                         };
00083                 ~LoopNextNode() {};
00084                 
00085                 void print_unk(Console &o, const uint32 isize) const;
00086                 void print_asm(Console &o) const;
00087                 void print_bin(ODequeDataSource &o) const;
00088                 bool fold(DCUnit *unit, std::deque<Node *> &nodes);
00089                 
00090         protected:
00091 
00092         private:
00093 };
00094 
00095 #endif

Generated on Fri Jul 27 22:27:23 2007 for pentagram by  doxygen 1.4.7