summaryrefslogtreecommitdiff
path: root/inc/XSControl_Writer.hxx
blob: 809fe2e0a4cbc4110328b7735212ff8933fd8f8f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
// This file is generated by WOK (CPPExt).
// Please do not edit this file; modify original file instead.
// The copyright and license terms as defined for the original file apply to 
// this header file considered to be the "object code" form of the original source.

#ifndef _XSControl_Writer_HeaderFile
#define _XSControl_Writer_HeaderFile

#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
#ifndef _Standard_Macro_HeaderFile
#include <Standard_Macro.hxx>
#endif

#ifndef _Handle_XSControl_WorkSession_HeaderFile
#include <Handle_XSControl_WorkSession.hxx>
#endif
#ifndef _Standard_CString_HeaderFile
#include <Standard_CString.hxx>
#endif
#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
#endif
#ifndef _Handle_Interface_InterfaceModel_HeaderFile
#include <Handle_Interface_InterfaceModel.hxx>
#endif
#ifndef _IFSelect_ReturnStatus_HeaderFile
#include <IFSelect_ReturnStatus.hxx>
#endif
#ifndef _Standard_Integer_HeaderFile
#include <Standard_Integer.hxx>
#endif
class XSControl_WorkSession;
class Interface_InterfaceModel;
class TopoDS_Shape;


//! This class gives a simple way to create then write a <br>
//!           Model compliant to a given norm, from a Shape <br>
//!           The model can then be edited by tools by other appropriate tools <br>
class XSControl_Writer  {
public:

  void* operator new(size_t,void* anAddress) 
  {
    return anAddress;
  }
  void* operator new(size_t size) 
  {
    return Standard::Allocate(size); 
  }
  void  operator delete(void *anAddress) 
  {
    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
  }

  //! Creates a Writer from scratch <br>
  Standard_EXPORT   XSControl_Writer();
  //! Creates a Writer from scratch, with a norm name which <br>
//!           identifie a Controller <br>
  Standard_EXPORT   XSControl_Writer(const Standard_CString norm);
  //! Creates a Writer from an already existing Session <br>
//!           If <scratch> is True (D), clears already recorded data <br>
  Standard_EXPORT   XSControl_Writer(const Handle(XSControl_WorkSession)& WS,const Standard_Boolean scratch = Standard_True);
  //! Sets a specific norm to <me> <br>
//!           Returns True if done, False if <norm> is not available <br>
  Standard_EXPORT     Standard_Boolean SetNorm(const Standard_CString norm) ;
  //! Sets a specific session to <me> <br>
  Standard_EXPORT     void SetWS(const Handle(XSControl_WorkSession)& WS,const Standard_Boolean scratch = Standard_True) ;
  //! Returns the session used in <me> <br>
  Standard_EXPORT     Handle_XSControl_WorkSession WS() const;
  //! Returns the produced model. Produces a new one if not yet done <br>
//!           or if <newone> is True <br>
//!           This method allows for instance to edit product or header <br>
//!           data before writing <br>
  Standard_EXPORT     Handle_Interface_InterfaceModel Model(const Standard_Boolean newone = Standard_False) ;
  //! Transfers a Shape according to the mode <br>
  Standard_EXPORT     IFSelect_ReturnStatus TransferShape(const TopoDS_Shape& sh,const Standard_Integer mode = 0) ;
  //! Writes the produced model <br>
  Standard_EXPORT     IFSelect_ReturnStatus WriteFile(const Standard_CString filename) ;
  //! Prints Statistics about Transfer <br>
  Standard_EXPORT     void PrintStatsTransfer(const Standard_Integer what,const Standard_Integer mode = 0) const;





protected:





private:



Handle_XSControl_WorkSession thesession;


};





// other Inline functions and methods (like "C++: function call" methods)


#endif