1 // Created on: 1995-03-16
2 // Created by: Christian CAILLET
3 // Copyright (c) 1995-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
6 // This file is part of Open CASCADE Technology software library.
8 // This library is free software; you can redistribute it and/or modify it under
9 // the terms of the GNU Lesser General Public License version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #ifndef _XSControl_FuncShape_HeaderFile
18 #define _XSControl_FuncShape_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
24 #include <Standard_Integer.hxx>
25 #include <TopTools_HSequenceOfShape.hxx>
26 #include <Standard_CString.hxx>
27 #include <Standard_Boolean.hxx>
28 class XSControl_WorkSession;
29 class TCollection_AsciiString;
32 //! Defines additionnal commands for XSControl to :
33 //! - control of initialisation (xinit, xnorm, newmodel)
34 //! - analyse of the result of a transfer (recorded in a
35 //! TransientProcess for Read, FinderProcess for Write) :
36 //! statistics, various lists (roots,complete,abnormal), what
37 //! about one specific entity, producing a model with the
40 //! This appendix of XSControl is compiled separately to distinguish
41 //! basic features from user callable forms
42 class XSControl_FuncShape
49 //! Defines and loads all functions which work on shapes for XSControl (as ActFunc)
50 Standard_EXPORT static void Init();
52 //! Analyses a name as designating Shapes from a Vars or from
53 //! XSTEP transfer (last Transfer on Reading). <name> can be :
54 //! "*" : all the root shapes produced by last Transfer (Read)
55 //! i.e. considers roots of the TransientProcess
56 //! a name : a name of a variable DRAW
58 //! Returns the count of designated Shapes. Their list is put in
59 //! <list>. If <list> is null, it is firstly created. Then it is
60 //! completed (Append without Clear) by the Shapes found
61 //! Returns 0 if no Shape could be found
62 Standard_EXPORT static Standard_Integer MoreShapes (const Handle(XSControl_WorkSession)& session, Handle(TopTools_HSequenceOfShape)& list, const Standard_CString name);
64 //! Analyses given file name and variable name, with a default
65 //! name for variables. Returns resulting file name and variable
66 //! name plus status "file to read"(True) or "already read"(False)
67 //! In the latter case, empty resfile means no file available
69 //! If <file> is null or empty or equates ".", considers Session
70 //! and returned status is False
71 //! Else, returns resfile = file and status is True
72 //! If <var> is neither null nor empty, resvar = var
73 //! Else, the root part of <resfile> is considered, if defined
74 //! Else, <def> is taken
75 Standard_EXPORT static Standard_Boolean FileAndVar (const Handle(XSControl_WorkSession)& session, const Standard_CString file, const Standard_CString var, const Standard_CString def, TCollection_AsciiString& resfile, TCollection_AsciiString& resvar);
100 #endif // _XSControl_FuncShape_HeaderFile