-- Created on: 1994-09-14 -- Created by: Christian CAILLET -- Copyright (c) 1994-1999 Matra Datavision -- Copyright (c) 1999-2012 OPEN CASCADE SAS -- -- The content of this file is subject to the Open CASCADE Technology Public -- License Version 6.5 (the "License"). You may not use the content of this file -- except in compliance with the License. Please obtain a copy of the License -- at http://www.opencascade.org and read it completely before using this file. -- -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France. -- -- The Original Code and all software distributed under the License is -- distributed on an "AS IS" basis, without warranty of any kind, and the -- Initial Developer hereby disclaims all such warranties, including without -- limitation, any warranties of merchantability, fitness for a particular -- purpose or non-infringement. Please see the License for the specific terms -- and conditions governing the rights and limitations under the License. class WorkLibrary from StepSelect inherits WorkLibrary from IFSelect ---Purpose : Performs Read and Write a STEP File with a STEP Model -- Following the protocols, Copy may be implemented or not uses CString, Transient, CheckIterator, InterfaceModel, Protocol from Interface, Messenger from Message, EntityIterator, CopyTool, ContextWrite is Create (copymode : Boolean = Standard_True) returns mutable WorkLibrary from StepSelect; ---Purpose : Creates a STEP WorkLibrary -- precises whether Copy is implemented or not SetDumpLabel (me : mutable; mode : Integer); ---Purpose : Selects a mode to dump entities -- 0 (D) : prints numbers, then displays table number/label -- 1 : prints labels, then displays table label/number -- 2 : prints labels onky ReadFile (me; name : CString; model : out mutable InterfaceModel; protocol : Protocol from Interface) returns Integer; ---Purpose : Reads a STEP File and returns a STEP Model (into ), -- or lets "Null" in case of Error -- Returns 0 if OK, 1 if Read Error, -1 if File not opened WriteFile (me; ctx : in out ContextWrite) returns Boolean; ---Purpose : Writes a File from a STEP Model -- Returns False (and writes no file) if does not bring a -- STEP Model CopyModel (me; original : InterfaceModel; newmodel : mutable InterfaceModel; list : EntityIterator; TC : in out CopyTool) returns Boolean is redefined; ---Purpose : Performs the copy of entities from an original model to a new -- one. Works according : -- if True, standard copy is run -- else nothing is done and returned value is False DumpEntity (me; model : InterfaceModel; protocol : Protocol from Interface; entity : Transient; S : Messenger from Message; level : Integer); ---Purpose : Dumps an entity under STEP form, i.e. as a part of a Step file -- Works with a StepDumper. -- Level 0 just displays type; level 1 displays the entity itself -- and level 2 displays the entity plus its shared ones (one -- sub-level : immediately shared entities) fields thecopymode : Boolean; thelabmode : Integer; end WorkLibrary;