Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:05:36

0001 // Created on: 1998-07-22
0002 // Created by: Christian CAILLET
0003 // Copyright (c) 1998-1999 Matra Datavision
0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0005 //
0006 // This file is part of Open CASCADE Technology software library.
0007 //
0008 // This library is free software; you can redistribute it and/or modify it under
0009 // the terms of the GNU Lesser General Public License version 2.1 as published
0010 // by the Free Software Foundation, with special exception defined in the file
0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0012 // distribution for complete text of the license and disclaimer of any warranty.
0013 //
0014 // Alternatively, this file may be used under the terms of Open CASCADE
0015 // commercial license or contractual agreement.
0016 
0017 #ifndef _XSControl_Vars_HeaderFile
0018 #define _XSControl_Vars_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_Type.hxx>
0022 
0023 #include <Standard_Transient.hxx>
0024 #include <NCollection_DataMap.hxx>
0025 #include <TCollection_AsciiString.hxx>
0026 class Geom_Geometry;
0027 class Geom2d_Curve;
0028 class Geom_Curve;
0029 class Geom_Surface;
0030 class gp_Pnt;
0031 class gp_Pnt2d;
0032 class TopoDS_Shape;
0033 
0034 
0035 class XSControl_Vars;
0036 DEFINE_STANDARD_HANDLE(XSControl_Vars, Standard_Transient)
0037 
0038 //! Defines a receptacle for externally defined variables, each
0039 //! one has a name
0040 //!
0041 //! I.E. a WorkSession for XSTEP is generally used inside a
0042 //! context, which brings variables, especially shapes and
0043 //! geometries. For instance DRAW or an application engine
0044 //!
0045 //! This class provides a common form for this. It also provides
0046 //! a default implementation (locally recorded variables in a
0047 //! dictionary), but which is aimed to be redefined
0048 class XSControl_Vars : public Standard_Transient
0049 {
0050 
0051 public:
0052 
0053   
0054   Standard_EXPORT XSControl_Vars();
0055   
0056   Standard_EXPORT virtual void Set (const Standard_CString name, const Handle(Standard_Transient)& val);
0057   
0058   Standard_EXPORT virtual Handle(Standard_Transient) Get (Standard_CString& name) const;
0059   
0060   Standard_EXPORT virtual Handle(Geom_Geometry) GetGeom (Standard_CString& name) const;
0061   
0062   Standard_EXPORT virtual Handle(Geom2d_Curve) GetCurve2d (Standard_CString& name) const;
0063   
0064   Standard_EXPORT virtual Handle(Geom_Curve) GetCurve (Standard_CString& name) const;
0065   
0066   Standard_EXPORT virtual Handle(Geom_Surface) GetSurface (Standard_CString& name) const;
0067   
0068   Standard_EXPORT virtual void SetPoint (const Standard_CString name, const gp_Pnt& val);
0069   
0070   Standard_EXPORT virtual void SetPoint2d (const Standard_CString name, const gp_Pnt2d& val);
0071   
0072   Standard_EXPORT virtual Standard_Boolean GetPoint (Standard_CString& name, gp_Pnt& pnt) const;
0073   
0074   Standard_EXPORT virtual Standard_Boolean GetPoint2d (Standard_CString& name, gp_Pnt2d& pnt) const;
0075   
0076   Standard_EXPORT virtual void SetShape (const Standard_CString name, const TopoDS_Shape& val);
0077   
0078   Standard_EXPORT virtual TopoDS_Shape GetShape (Standard_CString& name) const;
0079 
0080 
0081 
0082 
0083   DEFINE_STANDARD_RTTIEXT(XSControl_Vars,Standard_Transient)
0084 
0085 protected:
0086 
0087 
0088 
0089 
0090 private:
0091 
0092 
0093   NCollection_DataMap<TCollection_AsciiString, Handle(Standard_Transient)> thevars;
0094 
0095 
0096 };
0097 
0098 
0099 
0100 
0101 
0102 
0103 
0104 #endif // _XSControl_Vars_HeaderFile