1 // Copyright (c) 1999-2012 OPEN CASCADE SAS
3 // The content of this file is subject to the Open CASCADE Technology Public
4 // License Version 6.5 (the "License"). You may not use the content of this file
5 // except in compliance with the License. Please obtain a copy of the License
6 // at http://www.opencascade.org and read it completely before using this file.
8 // The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
9 // main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
11 // The Original Code and all software distributed under the License is
12 // distributed on an "AS IS" basis, without warranty of any kind, and the
13 // Initial Developer hereby disclaims all such warranties, including without
14 // limitation, any warranties of merchantability, fitness for a particular
15 // purpose or non-infringement. Please see the License for the specific terms
16 // and conditions governing the rights and limitations under the License.
18 #include <XSDRAW_Vars.ixx>
19 #include <Geom_Geometry.hxx>
20 #include <Geom2d_Curve.hxx>
22 #include <DrawTrSurf.hxx>
25 #include <Interface_Macros.hxx>
29 XSDRAW_Vars::XSDRAW_Vars () { }
32 (const Standard_CString name,
33 const Handle(Standard_Transient)& val)
37 DeclareAndCast(Geom_Geometry,geom,val);
39 DrawTrSurf::Set(name,geom);
42 DeclareAndCast(Geom2d_Curve,g2d,val);
44 DrawTrSurf::Set(name,geom);
51 Handle(Standard_Transient) XSDRAW_Vars::Get (const Standard_CString name) const
53 Handle(Standard_Transient) val;
54 if (!thevars->GetItem (name,val)) val.Nullify();
60 Handle(Geom_Geometry) XSDRAW_Vars::GetGeom (Standard_CString& name) const
62 return DrawTrSurf::Get(name);
65 Handle(Geom2d_Curve) XSDRAW_Vars::GetCurve2d (Standard_CString& name) const
67 return DrawTrSurf::GetCurve2d(name);
70 Handle(Geom_Curve) XSDRAW_Vars::GetCurve (Standard_CString& name) const
72 return DrawTrSurf::GetCurve(name);
75 Handle(Geom_Surface) XSDRAW_Vars::GetSurface (Standard_CString& name) const
77 return DrawTrSurf::GetSurface(name);
81 void XSDRAW_Vars::SetPoint (const Standard_CString name, const gp_Pnt& val)
84 DrawTrSurf::Set (name, val);
87 Standard_Boolean XSDRAW_Vars::GetPoint (Standard_CString& name, gp_Pnt& pnt) const
89 return DrawTrSurf::GetPoint (name,pnt); }
92 void XSDRAW_Vars::SetPoint2d (const Standard_CString name, const gp_Pnt2d& val)
95 DrawTrSurf::Set (name, val);
98 Standard_Boolean XSDRAW_Vars::GetPoint2d (Standard_CString& name, gp_Pnt2d& pnt) const
101 return DrawTrSurf::GetPoint2d (name,pnt); }
104 void XSDRAW_Vars::SetShape (const Standard_CString name, const TopoDS_Shape& val)
106 DBRep::Set (name, val);
109 TopoDS_Shape XSDRAW_Vars::GetShape (Standard_CString& name) const
112 return DBRep::Get (name);