Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-22 08:59:59

0001 // Created on: 1995-03-16
0002 // Created by: Christian CAILLET
0003 // Copyright (c) 1995-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_FuncShape_HeaderFile
0018 #define _XSControl_FuncShape_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 #include <Standard_Integer.hxx>
0025 #include <TopoDS_Shape.hxx>
0026 #include <NCollection_Sequence.hxx>
0027 #include <NCollection_HSequence.hxx>
0028 #include <Standard_CString.hxx>
0029 class XSControl_WorkSession;
0030 class TCollection_AsciiString;
0031 
0032 //! Defines additional commands for XSControl to :
0033 //! - control of initialisation (xinit, xnorm, newmodel)
0034 //! - analyse of the result of a transfer (recorded in a
0035 //! TransientProcess for Read, FinderProcess for Write) :
0036 //! statistics, various lists (roots,complete,abnormal), what
0037 //! about one specific entity, producing a model with the
0038 //! abnormal result
0039 //!
0040 //! This appendix of XSControl is compiled separately to distinguish
0041 //! basic features from user callable forms
0042 class XSControl_FuncShape
0043 {
0044 public:
0045   DEFINE_STANDARD_ALLOC
0046 
0047   //! Defines and loads all functions which work on shapes for XSControl (as ActFunc)
0048   Standard_EXPORT static void Init();
0049 
0050   //! Analyses a name as designating Shapes from a Vars or from
0051   //! XSTEP transfer (last Transfer on Reading). <name> can be :
0052   //! "*" : all the root shapes produced by last Transfer (Read)
0053   //! i.e. considers roots of the TransientProcess
0054   //! a name : a name of a variable DRAW
0055   //!
0056   //! Returns the count of designated Shapes. Their list is put in
0057   //! <list>. If <list> is null, it is firstly created. Then it is
0058   //! completed (Append without Clear) by the Shapes found
0059   //! Returns 0 if no Shape could be found
0060   Standard_EXPORT static int MoreShapes(const occ::handle<XSControl_WorkSession>&         session,
0061                                         occ::handle<NCollection_HSequence<TopoDS_Shape>>& list,
0062                                         const char* const                                 name);
0063 
0064   //! Analyses given file name and variable name, with a default
0065   //! name for variables. Returns resulting file name and variable
0066   //! name plus status "file to read"(True) or "already read"(False)
0067   //! In the latter case, empty resfile means no file available
0068   //!
0069   //! If <file> is null or empty or equates ".", considers Session
0070   //! and returned status is False
0071   //! Else, returns resfile = file and status is True
0072   //! If <var> is neither null nor empty, resvar = var
0073   //! Else, the root part of <resfile> is considered, if defined
0074   //! Else, <def> is taken
0075   Standard_EXPORT static bool FileAndVar(const occ::handle<XSControl_WorkSession>& session,
0076                                          const char* const                         file,
0077                                          const char* const                         var,
0078                                          const char* const                         def,
0079                                          TCollection_AsciiString&                  resfile,
0080                                          TCollection_AsciiString&                  resvar);
0081 };
0082 
0083 #endif // _XSControl_FuncShape_HeaderFile