00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef __GOP_BreakpointGroupParser_h__
00021 #define __GOP_BreakpointGroupParser_h__
00022
00023 #include "GOP_API.h"
00024
00025
00026 #include "GOP_Parser.h"
00027 #include "GOP_EdgeAdhocGroup.h"
00028
00029 class GU_Detail;
00030 class GOP_Manager;
00031 class GEO_Primitive;
00032
00033 class GOP_API GOP_BreakpointGroupParser : public GOP_Parser
00034 {
00035 public:
00036 GOP_BreakpointGroupParser(GOP_Manager *manager, const GU_Detail &gdp,
00037 const UT_String &str,
00038 bool strict = true, int prim_offset = 0);
00039
00040
00041
00042
00043 static void buildGroupToken(const GU_Detail *gdp,
00044 const GB_BreakpointGroup *bkptgrp,
00045 UT_String &token, int offset = 0);
00046
00047 private:
00048
00049 virtual void init();
00050 virtual void finish();
00051 virtual bool dispatch(char c);
00052
00053
00054 virtual void handleStart();
00055 virtual void handleError();
00056
00057 void handleCollectPrim();
00058 void handleCollectSec();
00059 void handleCollectName();
00060 void handleCollectBreakpointU0();
00061 void handleCollectBreakpointU1();
00062 void handleCollectBreakpointV0();
00063 void handleCollectBreakpointV1();
00064
00065
00066 bool myOpenBracket;
00067 int myPrimIndex;
00068 int mySecIndex;
00069 int myU0;
00070 int myU1;
00071 int myV0;
00072 int myV1;
00073
00074
00075 bool addCurveBreakpoint();
00076 bool addSurfBreakpoint();
00077 bool addSecBreakpoint();
00078 bool addAllPrimBreakpoints(GEO_Primitive *prim = 0);
00079 bool addAllSecBreakpoints();
00080 bool addAllSecBreakpoints(GB_Primitive *prim);
00081 bool addCurveBreakpointRange(int u0, int u1);
00082 bool addSecBreakpointRange(int u0, int u1);
00083 bool addSurfBreakpointRange(int u0, int u1, int v0, int v1);
00084 bool addPrimGroup(const char *name);
00085
00086
00087 GEO_Primitive *getPrim();
00088
00089
00090 const GU_Detail &myGdp;
00091 GB_BreakpointGroup *myGroup;
00092 GOP_Manager *myManager;
00093 bool myStrictFlag;
00094 int myPrimOffset;
00095 };
00096
00097
00098 #endif