Warning, /include/opencascade/IFSelect_ModelModifier.gxx is written in an unsupported language. File is not indexed.
0001 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0002 //
0003 // This file is part of Open CASCADE Technology software library.
0004 //
0005 // This library is free software; you can redistribute it and/or modify it under
0006 // the terms of the GNU Lesser General Public License version 2.1 as published
0007 // by the Free Software Foundation, with special exception defined in the file
0008 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0009 // distribution for complete text of the license and disclaimer of any warranty.
0010 //
0011 // Alternatively, this file may be used under the terms of Open CASCADE
0012 // commercial license or contractual agreement.
0013
0014 //#include <IFSelect_ModelModifier.ixx>
0015 #include <Interface_Check.hxx>
0016
0017 IFSelect_ModelModifier::IFSelect_ModelModifier (const Standard_Boolean grf)
0018 : IFSelect_Modifier (grf) { }
0019
0020 void IFSelect_ModelModifier::Perform
0021 (IFSelect_ContextModif& ctx,
0022 const Handle(Interface_InterfaceModel)& target,
0023 const Handle(Interface_Protocol)& protocol,
0024 Interface_CopyTool& TC) const
0025 {
0026 ctx.TraceModifier(this);
0027 Handle(Model) targ = Handle(Model)::DownCast(target);
0028 Handle(Proto) prot = Handle(Proto)::DownCast(protocol);
0029 if (targ.IsNull()) {
0030 ctx.CCheck()->AddFail("Model to Modify : unproper type");
0031 return;
0032 }
0033 PerformProtocol (ctx,targ,prot,TC);
0034 }
0035
0036 void IFSelect_ModelModifier::PerformProtocol
0037 (IFSelect_ContextModif& ctx,
0038 const Handle(Model)& target,
0039 const Handle(Proto)& protocol,
0040 Interface_CopyTool& TC) const
0041 { ctx.SetProtocol(protocol); Performing (ctx,target,TC); }