mirror of
https://github.com/Open-Cascade-SAS/OCCT.git
synced 2026-05-15 22:11:17 +08:00
79 lines
3.6 KiB
Plaintext
Executable File
79 lines
3.6 KiB
Plaintext
Executable File
-- Created on: 1994-03-21
|
|
-- 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.
|
|
|
|
|
|
|
|
deferred generic class ModelModifier from IFSelect
|
|
(Model as InterfaceModel; Proto as Protocol from Interface)
|
|
inherits Modifier
|
|
|
|
---Purpose : Allows to precise the frame work for Model Modifiers able to
|
|
-- run with an Interface (such as STEP, VDA, IGES ...)
|
|
--
|
|
-- Acts as a Modifier but properly casts Model and Protocol
|
|
-- according to each Interface, and refuses to work if cast
|
|
-- has failed (i.e. if it is not used in good context)
|
|
--
|
|
-- Then, it is finer to make specific Model Modifier inherit
|
|
-- from an instantiated ModelModifier, instead of Modifier itself
|
|
-- (though it is not mandatory)
|
|
--
|
|
-- For each Interface on which Model Modifiers have to be defined,
|
|
-- The way to follow is firstly to instantiate ModelModifier with
|
|
-- its specific data :
|
|
-- Model is the InterfaceModel specific to the considered norm
|
|
-- Then to define the various classes which inherit from it and
|
|
-- define their method Perform
|
|
|
|
uses CString, InterfaceModel, Protocol from Interface, CopyTool, ContextModif
|
|
|
|
is
|
|
|
|
Initialize (maychangegraph : Boolean);
|
|
---Purpose : Calls inherited Initialize, transmits to it the information
|
|
-- <maychangegraph>
|
|
|
|
Perform (me; ctx : in out ContextModif;
|
|
target : mutable InterfaceModel;
|
|
protocol : Protocol from Interface;
|
|
TC : in out CopyTool);
|
|
---Purpose : The inherited Perform does the required cast (and refuses to
|
|
-- go further if cast has failed) then calls the instantiated
|
|
-- Performing
|
|
|
|
PerformProtocol (me; ctx : in out ContextModif;
|
|
target : mutable Model;
|
|
proto : Proto;
|
|
TC : in out CopyTool) is virtual;
|
|
---Purpose : Specific Perform with Protocol. It is defined to let the
|
|
-- Protocol unused and to call Performing without Protocol
|
|
-- (most current case). It can be redefined if specific action
|
|
-- requires Protocol.
|
|
|
|
Performing (me; ctx : in out ContextModif;
|
|
target : mutable Model;
|
|
TC : in out CopyTool) is deferred;
|
|
---Purpose : Specific Perform, without Protocol. If Performing with
|
|
-- Protocol is redefined, Performing without Protocol must
|
|
-- though be defined to do nothing (not called, but demanded
|
|
-- by the linker)
|
|
|
|
end ModelModifier;
|