Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

robbinary.h

00001 /*
00002  * robbinary.h
00003  * 
00004  * Copyright (c) 2000-2004 by Florian Fischer (florianfischer@gmx.de)
00005  * and Martin Trautmann (martintrautmann@gmx.de) 
00006  * 
00007  * This file may not be distributed.
00008  */
00009 
00010 #ifndef __RT_RBILOADER__
00011 #define __RT_RBILOADER__
00012 
00013 #include <rtstring.h>
00014 #include <rtdelphi.h>
00015 
00016 #include "robbase.h"
00017 #include "robvars.h"
00018 
00019 using namespace lrt;
00020 
00021 namespace rt {
00022 
00023 
00024 class RbiLoader : public ProgramLoader  
00025 {
00026         public:
00027         // example constructor
00028         RbiLoader(const ErrorHandler* handler);
00029         virtual ~RbiLoader();
00030 
00031         virtual ProgramLoader* create(const String& filename, const Globals& glob);
00032         virtual bool canLoad(const String& filename);
00033         virtual String getFormatName();
00034 
00035 protected:
00036         virtual LoadReturnType load();
00037         virtual LoadReturnType loadHeaders();
00038 
00039 private:
00040         int errval;
00041         // we'll use it so often...
00042         typedef Instr::Op Op;
00043 
00044         // concrete constructor
00045         RbiLoader(const RbiLoader* example, const String& filename, const Globals& glob);
00046         bool isExample;
00047 
00048         // converts our error to the generic ProgramLoader error
00049         LoadReturnType error(RbiLoadReturnType num);
00050 
00051         RbiLoadReturnType doLoadHeaders(DelphiDataInputStream* in);
00052 
00053         RbiLoadReturnType doLoad(DelphiDataInputStream* in);
00054 
00055         RbiLoadReturnType readOps(unsigned char* buf, Array<Op>& ops, bool* dest);
00056         RbiLoadReturnType convertParamDest(int type, int value, Op& op);
00057         RbiLoadReturnType convertParamSrc(int type, int value, Op& op);
00058 
00059 
00060 };
00061 
00062 } // namespace
00063 
00064 #endif 

This is the RoboTour API documentation version 0.1 • Copyright (C) by Florian Fischer