00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef COP2_PARSE_H
00021 #define COP2_PARSE_H
00022
00023 #include "COP2_API.h"
00024 #include <TIL/TIL_Defines.h>
00025 class TIL_Sequence;
00026 class UT_String;
00027
00028 class COP2_API COP2_Parse
00029 {
00030 public:
00031 COP2_Parse(TIL_Sequence *seq);
00032 ~COP2_Parse();
00033
00034
00035
00036
00037
00038
00039
00040 int parse(UT_String &create_string, TIL_DataFormat default_type,
00041 int use_bw, int b, int w);
00042
00043
00044
00045
00046
00047
00048 int scope(UT_String &scope_string,
00049 bool allow_partially_scoped_planes);
00050
00051 void frameScope(UT_String &frame_scope, bool scope,
00052 int start, int length = 1);
00053
00054 const char *getError() const;
00055
00056 private:
00057 int parseSingle(char *create, int length);
00058 int parseVector(char *comps, int length);
00059 int parsePoints(char *pnts, int length);
00060
00061 int scopeSingle(char *scope, int length,
00062 bool allow_partially_scoped_planes);
00063 int scopeArray(char *bounds, int length);
00064
00065 void createPlanes(const char *name);
00066 void addError(const char *error);
00067
00068 TIL_Sequence *mySequence;
00069
00070
00071 TIL_DataFormat myDefaultType;
00072 TIL_DataFormat myPlaneType;
00073 int myPlaneArraySize;
00074 int myPlaneBlack;
00075 int myPlaneWhite;
00076 int myPlaneUsePoints;
00077 int myDefaultBlack;
00078 int myDefaultWhite;
00079
00080
00081 int myCompScope;
00082 int myCompCount;
00083 char myComp[PLANE_MAX_VECTOR_SIZE][256];
00084 int myArrayScope;
00085 int myArrayStart, myArrayEnd, myArrayStep;
00086
00087
00088 const char *myError;
00089 };
00090
00091
00092
00093
00094 #endif