Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #include "GEOM_Function.hxx"
00027
00028 #include "TColStd_HSequenceOfTransient.hxx"
00029 #include "TColStd_HArray1OfInteger.hxx"
00030
00031 class GEOMImpl_IShapes
00032 {
00033 public:
00034
00035 enum {
00036 SHAPE_ARG_SHAPES = 1,
00037 SHAPE_ARG_BASE = 2,
00038 SHAPE_ARG_PLANAR = 3,
00039 SHAPE_ARG_SUBTYPE = 4,
00040 SHAPE_ARG_INDICES = 5,
00041 SHAPE_ARG_TOLERANCE = 6,
00042 SHAPE_ARG_ANGLE_TOL = 7,
00043 };
00044
00045 GEOMImpl_IShapes(Handle(GEOM_Function) theFunction): _func(theFunction) {}
00046
00047 void SetShapes(const Handle(TColStd_HSequenceOfTransient)& theShapes)
00048 { _func->SetReferenceList(SHAPE_ARG_SHAPES, theShapes); }
00049
00050 Handle(TColStd_HSequenceOfTransient) GetShapes()
00051 { return _func->GetReferenceList(SHAPE_ARG_SHAPES); }
00052
00053 void SetBase(Handle(GEOM_Function) theRefBase)
00054 { _func->SetReference(SHAPE_ARG_BASE, theRefBase); }
00055
00056 Handle(GEOM_Function) GetBase() { return _func->GetReference(SHAPE_ARG_BASE); }
00057
00058 void SetIsPlanar(const Standard_Boolean isPlanarWanted)
00059 { _func->SetInteger(SHAPE_ARG_PLANAR, isPlanarWanted ? 1 : 0); }
00060
00061 Standard_Boolean GetIsPlanar() { return (_func->GetInteger(SHAPE_ARG_PLANAR) == 1); }
00062
00063 void SetSubShapeType(const Standard_Integer theType)
00064 { _func->SetInteger(SHAPE_ARG_SUBTYPE, theType); }
00065
00066 Standard_Integer GetSubShapeType() { return _func->GetInteger(SHAPE_ARG_SUBTYPE); }
00067
00068 void SetIndices(const Handle(TColStd_HArray1OfInteger)& theIndices)
00069 { _func->SetIntegerArray(SHAPE_ARG_INDICES, theIndices); }
00070
00071 Handle(TColStd_HArray1OfInteger) GetIndices()
00072 { return _func->GetIntegerArray(SHAPE_ARG_INDICES); }
00073
00074 void SetTolerance(const Standard_Real theValue)
00075 { _func->SetReal(SHAPE_ARG_TOLERANCE, theValue); }
00076
00077 Standard_Real GetTolerance() { return _func->GetReal(SHAPE_ARG_TOLERANCE); }
00078
00079 void SetAngularTolerance(const Standard_Real theValue)
00080 { _func->SetReal(SHAPE_ARG_ANGLE_TOL, theValue); }
00081
00082 Standard_Real GetAngularTolerance() { return _func->GetReal(SHAPE_ARG_ANGLE_TOL); }
00083
00084 private:
00085
00086 Handle(GEOM_Function) _func;
00087 };