00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef __loaded__data_visitor_h__
00021 #define __loaded__data_visitor_h__
00022 using namespace std;
00023 #line 1 "data-visitor.h++"
00024 #include <assert.h>
00025 #include "data.h"
00026
00027
00028
00029
00030 class DataVisitor
00031 {
00032 friend class Token;
00033 friend class String;
00034 friend class Symbol;
00035 friend class IntegerClass<signed1,true,'b'>;
00036 friend class IntegerClass<signed2,true,'w'>;
00037 friend class IntegerClass<signed4,true,'i'>;
00038 friend class IntegerClass<signed8,true,'l'>;
00039 friend class IntegerClass<unsigned1,false,'b'>;
00040 friend class IntegerClass<unsigned2,false,'w'>;
00041 friend class IntegerClass<unsigned4,false,'i'>;
00042 friend class IntegerClass<unsigned8,false,'l'>;
00043 friend class FloatClass<float4,'f'>;
00044 friend class FloatClass<float8,'d'>;
00045 protected:
00046
00047 virtual void visit(Token &) {assert(0);}
00048
00049 #define ARRAY_TYPE(D,T) \
00050 friend class Array<D,T>; \
00051 virtual void visit(Array<D,T> &) {assert(0);};
00052 ARRAY_TYPES;
00053 #undef ARRAY_TYPE
00054 virtual void visit(String &) {assert(0);};
00055 virtual void visit(Symbol &) {assert(0);};
00056
00057
00058 virtual void visit(Signed1 &nr);
00059 virtual void visit(Signed2 &nr);
00060 virtual void visit(Signed4 &nr);
00061 virtual void visit(Signed8 &nr);
00062 virtual void visit(Unsigned1 &nr);
00063 virtual void visit(Unsigned2 &nr);
00064 virtual void visit(Unsigned4 &nr);
00065 virtual void visit(Unsigned8 &nr);
00066 virtual void visitSignedNumber(signed8, char) {assert(0);};
00067 virtual void visitUnsignedNumber(unsigned8, char) {assert(0);};
00068 virtual void visit(Float4 &) { assert(0); };
00069 virtual void visit(Float8 &) { assert(0); };
00070 public:
00071 void visit(Data & data);
00072 void visit(DataClass & data);
00073 virtual ~DataVisitor() {};
00074 };
00075 #endif // __loaded__data_visitor_h__