From c0676d7442e3e6ac015fba530c435c1b35af7fe2 Mon Sep 17 00:00:00 2001 From: szv Date: Thu, 6 Oct 2016 12:28:00 +0300 Subject: [PATCH] Additional commit --- src/APIHeaderSection/FILES | 2 - src/IFSelect/IFSelect_Activator.hxx | 21 +- src/IFSelect/IFSelect_SessionPilot.cxx | 7 - src/IFSelect/IFSelect_SessionPilot.hxx | 7 - src/IGESControl/IGESControl_Controller.hxx | 3 - src/XSControl/XSControl_Controller.cxx | 58 ++-- src/XSDRAW/FILES | 4 - src/XSDRAW/XSDRAW.cxx | 207 +++++++++++++-- src/XSDRAW/XSDRAW.hxx | 23 +- src/XSDRAW/XSDRAW_Activator.cxx | 39 --- src/XSDRAW/XSDRAW_Activator.hxx | 90 ------- src/XSDRAW/XSDRAW_ControlFunctions.cxx | 43 ++- src/XSDRAW/XSDRAW_Functions.cxx | 25 -- src/XSDRAW/XSDRAW_Functions.hxx | 40 --- src/XSDRAW/XSDRAW_SelectFunctions.cxx | 248 +++++++++--------- src/XSDRAW/XSDRAW_ShapeFunctions.cxx | 25 +- src/XSDRAWSTEP/FILES | 2 + src/XSDRAWSTEP/XSDRAWSTEP.cxx | 6 +- .../XSDRAWSTEP_EditHeader.cxx} | 16 +- .../XSDRAWSTEP_EditHeader.hxx} | 40 +-- 20 files changed, 417 insertions(+), 489 deletions(-) delete mode 100644 src/XSDRAW/XSDRAW_Activator.cxx delete mode 100644 src/XSDRAW/XSDRAW_Activator.hxx delete mode 100644 src/XSDRAW/XSDRAW_Functions.cxx delete mode 100644 src/XSDRAW/XSDRAW_Functions.hxx rename src/{APIHeaderSection/APIHeaderSection_EditHeader.cxx => XSDRAWSTEP/XSDRAWSTEP_EditHeader.cxx} (92%) rename src/{APIHeaderSection/APIHeaderSection_EditHeader.hxx => XSDRAWSTEP/XSDRAWSTEP_EditHeader.hxx} (78%) diff --git a/src/APIHeaderSection/FILES b/src/APIHeaderSection/FILES index 41bf0dd0ec..e678ca4c59 100644 --- a/src/APIHeaderSection/FILES +++ b/src/APIHeaderSection/FILES @@ -1,4 +1,2 @@ -APIHeaderSection_EditHeader.cxx -APIHeaderSection_EditHeader.hxx APIHeaderSection_MakeHeader.cxx APIHeaderSection_MakeHeader.hxx diff --git a/src/IFSelect/IFSelect_Activator.hxx b/src/IFSelect/IFSelect_Activator.hxx index 890ab21049..2f343cc7bc 100644 --- a/src/IFSelect/IFSelect_Activator.hxx +++ b/src/IFSelect/IFSelect_Activator.hxx @@ -59,10 +59,8 @@ DEFINE_STANDARD_HANDLE(IFSelect_Activator, MMgt_TShared) //! recorded or not : see method Do class IFSelect_Activator : public MMgt_TShared { + public: -public: - - //! Records, in a Dictionary available for all the Activators, //! the command title an Activator can process, attached with //! its number, proper for this Activator @@ -116,32 +114,17 @@ public: //! Also a file may be attached Standard_EXPORT void SetForGroup (const Standard_CString group, const Standard_CString file = ""); - - - DEFINE_STANDARD_RTTIEXT(IFSelect_Activator,MMgt_TShared) protected: - //! Sets the default values Standard_EXPORT IFSelect_Activator(); - - -private: - + private: TCollection_AsciiString thegroup; TCollection_AsciiString thefile; - - }; - - - - - - #endif // _IFSelect_Activator_HeaderFile diff --git a/src/IFSelect/IFSelect_SessionPilot.cxx b/src/IFSelect/IFSelect_SessionPilot.cxx index c34de21968..41b0e0f900 100644 --- a/src/IFSelect/IFSelect_SessionPilot.cxx +++ b/src/IFSelect/IFSelect_SessionPilot.cxx @@ -225,13 +225,6 @@ static TCollection_AsciiString nulword; return IFSelect_RetError; // pas reconnu donc incorrect } - IFSelect_ReturnStatus IFSelect_SessionPilot::ExecuteAlias - (const TCollection_AsciiString& alias) -{ - if (alias.Length() > 0) thewords(0) = alias; - return Perform(); -} - IFSelect_ReturnStatus IFSelect_SessionPilot::Execute (const TCollection_AsciiString& command) { diff --git a/src/IFSelect/IFSelect_SessionPilot.hxx b/src/IFSelect/IFSelect_SessionPilot.hxx index fd30fc0575..ec85dba79b 100644 --- a/src/IFSelect/IFSelect_SessionPilot.hxx +++ b/src/IFSelect/IFSelect_SessionPilot.hxx @@ -155,13 +155,6 @@ class IFSelect_SessionPilot : public IFSelect_Activator //! recorded to the list (see below). Standard_EXPORT IFSelect_ReturnStatus Perform(); - //! Executes the Commands, except that the command name (word 0) - //! is aliased. The rest of the command line is unchanged - //! If is empty, Executes with no change - //! - //! Error status is returned if the alias is unknown as command - Standard_EXPORT IFSelect_ReturnStatus ExecuteAlias (const TCollection_AsciiString& aliasname); - //! Sets the Command then tries to execute it. Return value : //! same as for Perform Standard_EXPORT IFSelect_ReturnStatus Execute (const TCollection_AsciiString& command); diff --git a/src/IGESControl/IGESControl_Controller.hxx b/src/IGESControl/IGESControl_Controller.hxx index 74f44e4d9b..039108f475 100644 --- a/src/IGESControl/IGESControl_Controller.hxx +++ b/src/IGESControl/IGESControl_Controller.hxx @@ -20,10 +20,7 @@ #include #include -#include #include -#include -#include class TopoDS_Shape; class Transfer_FinderProcess; class XSControl_WorkSession; diff --git a/src/XSControl/XSControl_Controller.cxx b/src/XSControl/XSControl_Controller.cxx index 9d863471e5..0b056c3e3d 100644 --- a/src/XSControl/XSControl_Controller.cxx +++ b/src/XSControl/XSControl_Controller.cxx @@ -13,31 +13,29 @@ #include -#include +//#include #include -#include -#include -#include -#include -#include +//s#include +//s#include +//s#include +//s#include +//s#include #include -#include -#include -#include -#include -#include -#include -#include -#include +//s#include +//s#include +//s#include +//s#include +//s#include +//s#include +//s#include +//s#include #include -#include -#include -#include -#include -#include -#include -#include -#include +//s#include +//s#include +//s#include +//s#include +//s#include +//s#include #include #include #include @@ -45,23 +43,17 @@ #include #include #include -#include -#include #include #include #include #include -#include -#include -#include #include #include #include -#include +//s#include #include -#include -#include -#include +//s#include +//s#include #include IMPLEMENT_STANDARD_RTTIEXT(XSControl_Controller,MMgt_TShared) @@ -339,6 +331,7 @@ void XSControl_Controller::Customise (Handle(XSControl_WorkSession)& WS) WS->AddNamedItem (iter.Name().ToCString(), iter.Value()); } + /*szv_c1: if (WS->NamedItem("xst-model-all").IsNull()) { Handle(IFSelect_SelectModelEntities) sle = new IFSelect_SelectModelEntities; @@ -409,6 +402,7 @@ void XSControl_Controller::Customise (Handle(XSControl_WorkSession)& WS) WS->SetSignType( stp ); } + */ // Applied Modifiers Standard_Integer i, nb = myAdaptorApplied.Length(); @@ -422,9 +416,11 @@ void XSControl_Controller::Customise (Handle(XSControl_WorkSession)& WS) // Here for the specific manufacturers of controllers could create the // Parameters: So wait here + /*szv_c1: Handle(TColStd_HSequenceOfHAsciiString) listat = Interface_Static::Items(); Handle(IFSelect_ParamEditor) paramed = IFSelect_ParamEditor::StaticEditor (listat,"All Static Parameters"); WS->AddNamedItem ("xst-static-params-edit",paramed); Handle(IFSelect_EditForm) paramform = paramed->Form(Standard_False); WS->AddNamedItem ("xst-static-params",paramform); + */ } diff --git a/src/XSDRAW/FILES b/src/XSDRAW/FILES index 4ad6d21ced..e3691ee310 100755 --- a/src/XSDRAW/FILES +++ b/src/XSDRAW/FILES @@ -1,12 +1,8 @@ XSDRAW.cxx XSDRAW.hxx -XSDRAW_Activator.cxx -XSDRAW_Activator.hxx XSDRAW_Commands.hxx XSDRAW_ControlFunctions.cxx XSDRAW_ControlFunctions.hxx -XSDRAW_Functions.cxx -XSDRAW_Functions.hxx XSDRAW_SelectFunctions.cxx XSDRAW_SelectFunctions.hxx XSDRAW_ShapeFunctions.cxx diff --git a/src/XSDRAW/XSDRAW.cxx b/src/XSDRAW/XSDRAW.cxx index 7f56499968..488da63d24 100644 --- a/src/XSDRAW/XSDRAW.cxx +++ b/src/XSDRAW/XSDRAW.cxx @@ -33,8 +33,8 @@ #include #include #include -#include #include +#include #include #include @@ -76,17 +76,20 @@ void XSDRAW::RemoveCommand (const Standard_CString oldname) ChangeCommand (oldname,""); } -Standard_Boolean XSDRAW::LoadSession () +void XSDRAW::LoadSession () { - if (deja) return Standard_False; - deja = 1; - thepilot = new IFSelect_SessionPilot("XSTEP-DRAW>"); - Handle(XSControl_WorkSession) WS = new XSControl_WorkSession; - WS->SetVars (new XSDRAW_Vars); - thepilot->SetSession (WS); - - XSDRAW_Functions::Init(); - return Standard_True; + static int gInit= 0; + if (!gInit) { + gInit = 1; + thepilot = new IFSelect_SessionPilot("XSTEP-DRAW>"); + Handle(XSControl_WorkSession) WS = new XSControl_WorkSession; + WS->SetVars (new XSDRAW_Vars); + thepilot->SetSession (WS); + + XSDRAW_SelectFunctions::Init(); + XSDRAW_ControlFunctions::Init(); + XSDRAW_ShapeFunctions::Init (); + } } void XSDRAW::LoadDraw (Draw_Interpretor& theCommands) @@ -133,12 +136,116 @@ const Handle(IFSelect_SessionPilot) & XSDRAW::Pilot () Handle(XSControl_WorkSession) XSDRAW::Session (const Handle(IFSelect_SessionPilot) &thePilot) { return Handle(XSControl_WorkSession)::DownCast((thePilot.IsNull()? thepilot : thePilot)->Session()); } -void XSDRAW::SetController (const Handle(XSControl_Controller)& control) +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +void XSDRAW::SetController (const Handle(XSControl_Controller)& control) { - if (thepilot.IsNull()) XSDRAW::LoadSession(); + if (thepilot.IsNull()) LoadSession(); if (control.IsNull()) cout<<"XSTEP Controller not defined"<SetController (control); - else cout<<"XSTEP Session badly or not defined"<NamedItem("xst-model-all").IsNull()) { + + Handle(IFSelect_SelectModelEntities) sle = new IFSelect_SelectModelEntities; + WS->AddNamedItem ("xst-model-all",sle); + + Handle(IFSelect_SelectModelRoots) slr = new IFSelect_SelectModelRoots; + WS->AddNamedItem ("xst-model-roots",slr); + + if(strcasecmp(WS->SelectedNorm(),"STEP")) { + Handle(XSControl_SelectForTransfer) st1 = new XSControl_SelectForTransfer; + st1->SetInput (slr); + st1->SetReader (WS->TransferReader()); + WS->AddNamedItem ("xst-transferrable-roots",st1); + } + + Handle(XSControl_SelectForTransfer) st2 = new XSControl_SelectForTransfer; + st2->SetInput (sle); + st2->SetReader (WS->TransferReader()); + WS->AddNamedItem ("xst-transferrable-all",st2); + + Handle(XSControl_SignTransferStatus) strs = new XSControl_SignTransferStatus; + strs->SetReader (WS->TransferReader()); + WS->AddNamedItem ("xst-transfer-status",strs); + + Handle(XSControl_ConnectedShapes) scs = new XSControl_ConnectedShapes; + scs->SetReader (WS->TransferReader()); + WS->AddNamedItem ("xst-connected-faces",scs); + + Handle(IFSelect_SignType) stp = new IFSelect_SignType (Standard_False); + WS->AddNamedItem ("xst-long-type",stp); + + Handle(IFSelect_SignType) stc = new IFSelect_SignType (Standard_True); + WS->AddNamedItem ("xst-type",stc); + + WS->AddNamedItem ("xst-ancestor-type",new IFSelect_SignAncestor); + WS->AddNamedItem ("xst-types",new IFSelect_SignCounter(stp,Standard_False,Standard_True)); + WS->AddNamedItem ("xst-category",new IFSelect_SignCategory); + WS->AddNamedItem ("xst-validity",new IFSelect_SignValidity); + + Handle(IFSelect_DispPerOne) dispone = new IFSelect_DispPerOne; + dispone->SetFinalSelection(slr); + WS->AddNamedItem ("xst-disp-one",dispone); + + Handle(IFSelect_DispPerCount) dispcount = new IFSelect_DispPerCount; + Handle(IFSelect_IntParam) intcount = new IFSelect_IntParam; + intcount->SetValue(5); + dispcount->SetCount(intcount); + dispcount->SetFinalSelection(slr); + WS->AddNamedItem ("xst-disp-count",dispcount); + + Handle(IFSelect_DispPerFiles) dispfiles = new IFSelect_DispPerFiles; + Handle(IFSelect_IntParam) intfiles = new IFSelect_IntParam; + intfiles->SetValue(10); + dispfiles->SetCount(intfiles); + dispfiles->SetFinalSelection(slr); + WS->AddNamedItem ("xst-disp-files",dispfiles); + + Handle(IFSelect_DispPerSignature) dispsign = new IFSelect_DispPerSignature; + dispsign->SetSignCounter(new IFSelect_SignCounter(Handle(IFSelect_Signature)(stc))); + dispsign->SetFinalSelection(slr); + WS->AddNamedItem ("xst-disp-sign",dispsign); + + // Not used directly but useful anyway + WS->AddNamedItem ("xst-pointed",new IFSelect_SelectPointed); + WS->AddNamedItem ("xst-sharing",new IFSelect_SelectSharing); + WS->AddNamedItem ("xst-shared",new IFSelect_SelectShared); + WS->AddNamedItem ("xst-nb-selected",new IFSelect_GraphCounter); + + WS->SetSignType( stp ); + } + + Handle(TColStd_HSequenceOfHAsciiString) listat = Interface_Static::Items(); + Handle(IFSelect_ParamEditor) paramed = IFSelect_ParamEditor::StaticEditor (listat,"All Static Parameters"); + WS->AddNamedItem ("xst-static-params-edit",paramed); + Handle(IFSelect_EditForm) paramform = paramed->Form(Standard_False); + WS->AddNamedItem ("xst-static-params",paramform); + + WS->SetController (control); + } } @@ -257,3 +364,73 @@ Standard_Integer XSDRAW_WHAT (const Handle(Standard_Transient)& ent) cout<<" -- Recorded Type:"<TypeName (ent)<Number(ent); } + +//! Act gives a simple way to define and add functions to be ran +//! from a SessionPilot, as follows : +//! +//! Define a function as +//! static IFSelect_RetStatus myfunc +//! (const Standard_CString name, +//! const Handle(IFSelect_SessionPilot)& pilot) +//! { ... } +//! When ran, it receives the exact name (string) of the called +//! function, and the SessionPilot which brings other infos +//! +//! Add it by +//! XSDRAW_Act::AddFunc (name,help,myfunc); +//! for a normal function, or +//! XSDRAW_Act::AddFSet (name,help,myfunc); +//! for a function which is intended to create a control item +//! name and help are given as CString +//! +//! Then, it is available for run +class XSDRAW_Act : public IFSelect_Activator +{ + public: + + //! Creates an Act with a name, help and a function + //! mode (Add or AddSet) is given when recording + XSDRAW_Act(const Standard_CString name, const Standard_CString help, const XSDRAW_ActFunc func) + : thename (name) , thehelp (help) , thefunc (func) + {} + + //! Execution of Command Line. remark that is senseless + //! because each Act brings one and only one function + Standard_EXPORT virtual IFSelect_ReturnStatus Do (const Standard_Integer, const Handle(IFSelect_SessionPilot)& pilot) Standard_OVERRIDE + { return (thefunc? thefunc(pilot) : IFSelect_RetVoid); } + + //! Short Help for commands : returns the help given to create + Standard_EXPORT virtual Standard_CString Help (const Standard_Integer) const Standard_OVERRIDE + { return thehelp.ToCString(); } + + DEFINE_STANDARD_RTTI_INLINE(XSDRAW_Act,IFSelect_Activator) + + private: + + TCollection_AsciiString thename; + TCollection_AsciiString thehelp; + XSDRAW_ActFunc thefunc; +}; + +static TCollection_AsciiString thedefgr, thedefil; + +void XSDRAW::SetGroup (const Standard_CString group, const Standard_CString file) +{ + thedefgr.Clear(); if (group[0] != '\0') thedefgr.AssignCat(group); + thedefil.Clear(); if (file [0] != '\0') thedefil.AssignCat(file); +} + +void XSDRAW::AddFunc (const Standard_CString name, const Standard_CString help, const XSDRAW_ActFunc func) +{ + Handle(XSDRAW_Act) act = new XSDRAW_Act (name,help,func); + if (thedefgr.Length() > 0) act->SetForGroup (thedefgr.ToCString()); + act->Add (1,name); +} + +void XSDRAW::AddFSet (const Standard_CString name, const Standard_CString help, const XSDRAW_ActFunc func) +{ + Handle(XSDRAW_Act) act = new XSDRAW_Act (name,help,func); + if (thedefgr.Length() > 0) + act->SetForGroup (thedefgr.ToCString(),thedefil.ToCString()); + act->AddSet (1,name); +} diff --git a/src/XSDRAW/XSDRAW.hxx b/src/XSDRAW/XSDRAW.hxx index 67315a81f8..43677301fd 100644 --- a/src/XSDRAW/XSDRAW.hxx +++ b/src/XSDRAW/XSDRAW.hxx @@ -24,18 +24,16 @@ #include #include #include -class XSControl_WorkSession; -class XSControl_Controller; class Interface_Protocol; class Interface_InterfaceModel; -class Standard_Transient; class Transfer_TransientProcess; class Transfer_FinderProcess; +class XSControl_WorkSession; +class XSControl_Controller; class XSControl_TransferReader; class TCollection_AsciiString; -class XSDRAW_Functions; -class XSDRAW_Vars; +typedef IFSelect_ReturnStatus (*XSDRAW_ActFunc) (const Handle(IFSelect_SessionPilot)&); //! Basic package to work functions of X-STEP (IFSelect & Co) //! under control of DRAW @@ -64,7 +62,7 @@ class XSDRAW //! (call to SetController) //! LoadSession is called by LoadDraw //! Returns True the first time, False if already called - Standard_EXPORT static Standard_Boolean LoadSession(); + Standard_EXPORT static void LoadSession(); //! Defines the context for using a X-STEP Session under DRAW //! Once the various INITs have been done, a call to LoadDraw @@ -204,6 +202,19 @@ class XSDRAW //! completed (Append without Clear) by the Shapes found //! Returns 0 if no Shape could be found Standard_EXPORT static Standard_Integer MoreShapes (Handle(TopTools_HSequenceOfShape)& list, const Standard_CString name); + + //! Changes the default group name for the following Acts + //! group empty means to come back to default from Activator + //! Also a file name can be precised (to query by getsource) + Standard_EXPORT static void SetGroup (const Standard_CString group, const Standard_CString file = ""); + + //! Adds a function with its name and help : creates an Act then + //! records it as normal function + Standard_EXPORT static void AddFunc (const Standard_CString name, const Standard_CString help, const XSDRAW_ActFunc func); + + //! Adds a function with its name and help : creates an Act then + //! records it as function for XSET (i.e. to create control item) + Standard_EXPORT static void AddFSet (const Standard_CString name, const Standard_CString help, const XSDRAW_ActFunc func); }; #endif // _XSDRAW_HeaderFile diff --git a/src/XSDRAW/XSDRAW_Activator.cxx b/src/XSDRAW/XSDRAW_Activator.cxx deleted file mode 100644 index 4cfd237b32..0000000000 --- a/src/XSDRAW/XSDRAW_Activator.cxx +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#include - -IMPLEMENT_STANDARD_RTTIEXT(XSDRAW_Activator,IFSelect_Activator) - -static TCollection_AsciiString thedefgr, thedefil; - -void XSDRAW_Activator::SetGroup (const Standard_CString group, const Standard_CString file) -{ - thedefgr.Clear(); if (group[0] != '\0') thedefgr.AssignCat(group); - thedefil.Clear(); if (file [0] != '\0') thedefil.AssignCat(file); -} - -void XSDRAW_Activator::AddFunc (const Standard_CString name, const Standard_CString help, const XSDRAW_ActFunc func) -{ - Handle(XSDRAW_Activator) act = new XSDRAW_Activator (name,help,func); - if (thedefgr.Length() > 0) act->SetForGroup (thedefgr.ToCString()); - act->Add (1,name); -} - -void XSDRAW_Activator::AddFSet (const Standard_CString name, const Standard_CString help, const XSDRAW_ActFunc func) -{ - Handle(XSDRAW_Activator) act = new XSDRAW_Activator (name,help,func); - if (thedefgr.Length() > 0) - act->SetForGroup (thedefgr.ToCString(),thedefil.ToCString()); - act->AddSet (1,name); -} diff --git a/src/XSDRAW/XSDRAW_Activator.hxx b/src/XSDRAW/XSDRAW_Activator.hxx deleted file mode 100644 index 6ec19c9466..0000000000 --- a/src/XSDRAW/XSDRAW_Activator.hxx +++ /dev/null @@ -1,90 +0,0 @@ -// Created on: 1996-03-05 -// Created by: Christian CAILLET -// Copyright (c) 1996-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#ifndef _XSDRAW_Activator_HeaderFile -#define _XSDRAW_Activator_HeaderFile - -#include -#include - -#include -#include -#include -class IFSelect_SessionPilot; - -typedef IFSelect_ReturnStatus (*XSDRAW_ActFunc) (const Handle(IFSelect_SessionPilot)&); - -//! Act gives a simple way to define and add functions to be ran -//! from a SessionPilot, as follows : -//! -//! Define a function as -//! static IFSelect_RetStatus myfunc -//! (const Standard_CString name, -//! const Handle(IFSelect_SessionPilot)& pilot) -//! { ... } -//! When ran, it receives the exact name (string) of the called -//! function, and the SessionPilot which brings other infos -//! -//! Add it by -//! XSDRAW_Activator::AddFunc (name,help,myfunc); -//! for a normal function, or -//! XSDRAW_Activator::AddFSet (name,help,myfunc); -//! for a function which is intended to create a control item -//! name and help are given as CString -//! -//! Then, it is available for run -class XSDRAW_Activator : public IFSelect_Activator -{ - public: - - //! Creates an Act with a name, help and a function - //! mode (Add or AddSet) is given when recording - XSDRAW_Activator(const Standard_CString name, const Standard_CString help, const XSDRAW_ActFunc func) - : thename (name) , thehelp (help) , thefunc (func) - {} - - //! Execution of Command Line. remark that is senseless - //! because each Act brings one and only one function - IFSelect_ReturnStatus Do (const Standard_Integer, const Handle(IFSelect_SessionPilot)& pilot) Standard_OVERRIDE - { return (thefunc? thefunc(pilot) : IFSelect_RetVoid); } - - //! Short Help for commands : returns the help given to create - Standard_CString Help (const Standard_Integer) const Standard_OVERRIDE - { return thehelp.ToCString(); } - - //! Changes the default group name for the following Acts - //! group empty means to come back to default from Activator - //! Also a file name can be precised (to query by getsource) - Standard_EXPORT static void SetGroup (const Standard_CString group, const Standard_CString file = ""); - - //! Adds a function with its name and help : creates an Act then - //! records it as normal function - Standard_EXPORT static void AddFunc (const Standard_CString name, const Standard_CString help, const XSDRAW_ActFunc func); - - //! Adds a function with its name and help : creates an Act then - //! records it as function for XSET (i.e. to create control item) - Standard_EXPORT static void AddFSet (const Standard_CString name, const Standard_CString help, const XSDRAW_ActFunc func); - - DEFINE_STANDARD_RTTIEXT(XSDRAW_Activator,IFSelect_Activator) - - private: - - TCollection_AsciiString thename; - TCollection_AsciiString thehelp; - XSDRAW_ActFunc thefunc; -}; - -#endif // _XSDRAW_Activator_HeaderFile diff --git a/src/XSDRAW/XSDRAW_ControlFunctions.cxx b/src/XSDRAW/XSDRAW_ControlFunctions.cxx index 565f05d83c..36b32d4cfb 100644 --- a/src/XSDRAW/XSDRAW_ControlFunctions.cxx +++ b/src/XSDRAW/XSDRAW_ControlFunctions.cxx @@ -32,7 +32,6 @@ #include #include #include -#include #include #include @@ -463,35 +462,35 @@ void XSDRAW_ControlFunctions::Init () static int initactor = 0; if (initactor) return; initactor = 1; - XSDRAW_Activator::SetGroup("DE: General"); + XSDRAW::SetGroup("DE: General"); - XSDRAW_Activator::AddFunc ("xinit","[norm:string to change norme] reinitialises according to the norm",XSControl_xinit); - XSDRAW_Activator::AddFunc ("xnorm","displays current norm +norm : changes it",XSControl_xnorm); + XSDRAW::AddFunc ("xinit","[norm:string to change norme] reinitialises according to the norm",XSControl_xinit); + XSDRAW::AddFunc ("xnorm","displays current norm +norm : changes it",XSControl_xnorm); - XSDRAW_Activator::AddFunc ("newmodel","produces a new empty model, for the session",XSControl_newmodel); + XSDRAW::AddFunc ("newmodel","produces a new empty model, for the session",XSControl_newmodel); - XSDRAW_Activator::AddFunc ("tpclear","Clears TransferProcess (READ)",XSControl_tpclear); - XSDRAW_Activator::AddFunc ("twclear","Clears TransferProcess (WRITE)",XSControl_tpclear); + XSDRAW::AddFunc ("tpclear","Clears TransferProcess (READ)",XSControl_tpclear); + XSDRAW::AddFunc ("twclear","Clears TransferProcess (WRITE)",XSControl_tpclear); - XSDRAW_Activator::AddFunc ("tpstat","Statistics on TransferProcess (READ)",XSControl_tpstat); + XSDRAW::AddFunc ("tpstat","Statistics on TransferProcess (READ)",XSControl_tpstat); - XSDRAW_Activator::AddFunc ("tpent","[num:integer] Statistics on an entity of the model (READ)",XSControl_tpent); + XSDRAW::AddFunc ("tpent","[num:integer] Statistics on an entity of the model (READ)",XSControl_tpent); - XSDRAW_Activator::AddFunc ("tpitem","[num:integer] Statistics on ITEM of transfer (READ)" ,XSControl_tpitem); - XSDRAW_Activator::AddFunc ("tproot","[num:integer] Statistics on a ROOT of transfert (READ)" ,XSControl_tpitem); - XSDRAW_Activator::AddFunc ("twitem","[num:integer] Statistics on an ITEM of transfer (WRITE)" ,XSControl_tpitem); - XSDRAW_Activator::AddFunc ("twroot","[num:integer] Statistics on a ROOT of transfer (WRITE)",XSControl_tpitem); + XSDRAW::AddFunc ("tpitem","[num:integer] Statistics on ITEM of transfer (READ)" ,XSControl_tpitem); + XSDRAW::AddFunc ("tproot","[num:integer] Statistics on a ROOT of transfert (READ)" ,XSControl_tpitem); + XSDRAW::AddFunc ("twitem","[num:integer] Statistics on an ITEM of transfer (WRITE)" ,XSControl_tpitem); + XSDRAW::AddFunc ("twroot","[num:integer] Statistics on a ROOT of transfer (WRITE)",XSControl_tpitem); - XSDRAW_Activator::AddFunc ("trecord","record : all root results; or num : for entity n0.num",XSControl_trecord); - XSDRAW_Activator::AddFunc ("trstat","general statistics; or num : stats on entity n0 num",XSControl_trstat); - XSDRAW_Activator::AddFunc ("trbegin","begin-transfer-reader [init]",XSControl_trbegin); - XSDRAW_Activator::AddFunc ("tread","transfers all roots, or num|sel|sel num : entity list, by transfer-reader",XSControl_tread); + XSDRAW::AddFunc ("trecord","record : all root results; or num : for entity n0.num",XSControl_trecord); + XSDRAW::AddFunc ("trstat","general statistics; or num : stats on entity n0 num",XSControl_trstat); + XSDRAW::AddFunc ("trbegin","begin-transfer-reader [init]",XSControl_trbegin); + XSDRAW::AddFunc ("tread","transfers all roots, or num|sel|sel num : entity list, by transfer-reader",XSControl_tread); - XSDRAW_Activator::AddFunc ("trtp","feeds commands tp... with results from tr...",XSControl_trtp); - XSDRAW_Activator::AddFunc ("tptr","feeds tr... from tp... (may be incomplete)",XSControl_tptr); + XSDRAW::AddFunc ("trtp","feeds commands tp... with results from tr...",XSControl_trtp); + XSDRAW::AddFunc ("tptr","feeds tr... from tp... (may be incomplete)",XSControl_tptr); - XSDRAW_Activator::AddFunc ("twmode","displays mode transfer write, + num changes it",XSControl_twmode); - XSDRAW_Activator::AddFunc ("twstat","Statistics on TransferProcess (WRITE)",XSControl_twstat); + XSDRAW::AddFunc ("twmode","displays mode transfer write, + num changes it",XSControl_twmode); + XSDRAW::AddFunc ("twstat","Statistics on TransferProcess (WRITE)",XSControl_twstat); - XSDRAW_Activator::AddFSet ("selecttransfer","selection (recognize from transfer actor)",XSControl_settransfert); + XSDRAW::AddFSet ("selecttransfer","selection (recognize from transfer actor)",XSControl_settransfert); } diff --git a/src/XSDRAW/XSDRAW_Functions.cxx b/src/XSDRAW/XSDRAW_Functions.cxx deleted file mode 100644 index bcc89c9c0a..0000000000 --- a/src/XSDRAW/XSDRAW_Functions.cxx +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - - -#include -#include -#include -#include - -void XSDRAW_Functions::Init () -{ - XSDRAW_SelectFunctions::Init(); - XSDRAW_ControlFunctions::Init(); - XSDRAW_ShapeFunctions::Init (); -} diff --git a/src/XSDRAW/XSDRAW_Functions.hxx b/src/XSDRAW/XSDRAW_Functions.hxx deleted file mode 100644 index fc436da559..0000000000 --- a/src/XSDRAW/XSDRAW_Functions.hxx +++ /dev/null @@ -1,40 +0,0 @@ -// Created on: 1995-03-16 -// Created by: Christian CAILLET -// Copyright (c) 1995-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#ifndef _XSDRAW_Functions_HeaderFile -#define _XSDRAW_Functions_HeaderFile - -#include - -//! Defines additionnal commands for XSDRAW to : -//! - control of initialisation (xinit, xnorm, newmodel) -//! - analyse of the result of a transfer (recorded in a -//! TransientProcess for Read, FinderProcess for Write) : -//! statistics, various lists (roots,complete,abnormal), what -//! about one specific entity, producing a model with the -//! abnormal result -//! -//! This appendix of XSDRAW is compiled separately to distinguish -//! basic features from user callable forms -class XSDRAW_Functions -{ - public: - - //! Defines and loads all basic functions for XSDRAW (as ActFunc) - Standard_EXPORT static void Init(); -}; - -#endif // _XSDRAW_Functions_HeaderFile diff --git a/src/XSDRAW/XSDRAW_SelectFunctions.cxx b/src/XSDRAW/XSDRAW_SelectFunctions.cxx index f007a7997e..12b891f4d3 100644 --- a/src/XSDRAW/XSDRAW_SelectFunctions.cxx +++ b/src/XSDRAW/XSDRAW_SelectFunctions.cxx @@ -73,7 +73,7 @@ #include #include #include -#include +#include #include @@ -2444,127 +2444,127 @@ void XSDRAW_SelectFunctions::Init () static int initactor = 0; if (initactor) return; initactor = 1; - XSDRAW_Activator::SetGroup("DE: General"); - XSDRAW_Activator::AddFunc("xstatus","Lists XSTEP Status : Version, System Name ...",funstatus); - XSDRAW_Activator::AddFunc("handler","Toggle status catch Handler Error of the session",fun1); - XSDRAW_Activator::AddFunc("xload","file:string : Read File -> Load Model",fun3); - XSDRAW_Activator::AddFunc("xread","file:string : Read File -> Load Model",fun3); - XSDRAW_Activator::AddFunc("writeall","file:string : Write all model (no split)",fun4); - XSDRAW_Activator::AddFunc("writesel","file:string sel:Selection : Write Selected (no split)",fun5); - XSDRAW_Activator::AddFunc("writeent","file:string n1ent n2ent...:integer : Write Entite(s) (no split)",fun6); - XSDRAW_Activator::AddFunc("writent", "file:string n1ent n2ent...:integer : Write Entite(s) (no split)",fun6); - XSDRAW_Activator::AddFunc("elabel","nument:integer : Displays Label Model of an entity",fun7); - XSDRAW_Activator::AddFunc("enum","label:string : Displays entities n0.s of which Label Model ends by..",fun8); - - XSDRAW_Activator::AddFunc("listtypes","List nb entities per type. Optional selection name else all model",fun9); - XSDRAW_Activator::AddFunc("count","Count : counter [selection]",funcount); - XSDRAW_Activator::AddFunc("listcount","List Counted : counter [selection [nument]]",funcount); - XSDRAW_Activator::AddFunc("sumcount","Summary Counted : counter [selection [nument]]",funcount); - XSDRAW_Activator::AddFunc("signtype","Sign Type [newone]",funsigntype); - XSDRAW_Activator::AddFunc("signcase","signature : displays possible cases",funsigncase); - - XSDRAW_Activator::AddFunc("estatus","ent/nument : displays status of an entity",fun10); - XSDRAW_Activator::AddFunc("data","Data (DumpModel); whole help : data tout court",fun11); - XSDRAW_Activator::AddFunc("entity","give n0 ou id of entity [+ level]",fundumpent); - XSDRAW_Activator::AddFunc("signature","signature name + n0/ident entity",funsign); - XSDRAW_Activator::AddFunc("queryparent"," give 2 n0s/labels of entities : dad son",funqp); - - XSDRAW_Activator::AddFunc("dumpshare","Dump Share (dispatches, IntParams)",fun12); - XSDRAW_Activator::AddFunc("listitems","List Items [label else all] ->Type,Label[,Name]",fun13); - XSDRAW_Activator::AddFSet("integer","value:integer : cree un IntParam",fun14); - XSDRAW_Activator::AddFunc("setint","name:IntParam newValue:integer : Change valeur IntParam",fun15); - XSDRAW_Activator::AddFSet("text","value:string : cree un TextParam",fun16); - XSDRAW_Activator::AddFunc("settext","Name:TextParam newValue:string : Change valeur TextParam",fun17); - XSDRAW_Activator::AddFunc("dumpsel","Dump Selection suivi du Nom de la Selection a dumper",fun19); - XSDRAW_Activator::AddFunc("evalsel","name:Selection [num/sel] : Evalue une Selection",fun20); - XSDRAW_Activator::AddFunc("givelist","num/sel [num/sel ...] : Evaluates GiveList",fun20); - XSDRAW_Activator::AddFunc("giveshort","num/sel [num/sel ...] : GiveList in short form",fun20); - XSDRAW_Activator::AddFunc("givepointed","num/sel [num/sel ...] : GiveList to fill a SelectPointed",fun20); - XSDRAW_Activator::AddFunc("makelist","listname [givelist] : Makes a List(SelectPointed) from GiveList",fun20); - XSDRAW_Activator::AddFunc("givecount","num/sel [num/sel ...] : Counts GiveList",fun20c); - XSDRAW_Activator::AddFSet("selsuite","sel sel ... : Creates a SelectSuite",funselsuite); - XSDRAW_Activator::AddFunc("clearitems","Clears all items (selections, dispatches, etc)",fun21); - XSDRAW_Activator::AddFunc("cleardata","mode:a-g-c-p : Clears all or some data (model, check...)",fun22); - - XSDRAW_Activator::AddFunc("itemlabel","xxx xxx : liste items having this label",fun24); - XSDRAW_Activator::AddFunc("xsave","filename:string : sauve items-session",fun25); - XSDRAW_Activator::AddFunc("xrestore","filename:string : restaure items-session",fun26); - XSDRAW_Activator::AddFunc("param","nompar:string : displays parameter value; + nompar val : changes it",fun27); - XSDRAW_Activator::AddFunc("defparam","nompar:string : display def. param; also : nompar edit, nompar init",fun28); - - XSDRAW_Activator::AddFunc("sentfiles","Lists files sent from last Load",fun29); - XSDRAW_Activator::AddFunc("fileprefix","prefix:string : definit File Prefix",fun30); - XSDRAW_Activator::AddFunc("fileext","extent:string : definit File Extension",fun31); - XSDRAW_Activator::AddFunc("fileroot","disp:Dispatch root:string : definit File Root sur un Dispatch",fun32); - XSDRAW_Activator::AddFunc("filedef","defroot:string : definit File DefaultRoot",fun33); - XSDRAW_Activator::AddFunc("evalfile","Evaluation du FileNaming et memorisation",fun34); - XSDRAW_Activator::AddFunc("clearfile","Efface la liste d'EvalFile",fun35); - XSDRAW_Activator::AddFunc("xsplit","[disp:Dispatch sinon tout] : Split, la grande affaire !",fun36); - XSDRAW_Activator::AddFunc("remaining","options... : Remaining Entities, help complet par remaining ?",fun37); - XSDRAW_Activator::AddFunc("setcontent","sel:Selection mode:k ou r : Restreint contenu du modele",fun38); - - XSDRAW_Activator::AddFunc("listmodif","List Final Modifiers",fun40); - XSDRAW_Activator::AddFunc("dumpmodif","modif:Modifier : Affiche le Statut d'un Modifier",fun41); - XSDRAW_Activator::AddFunc("modifsel","modif:Modifier [sel:Selection] : Change/Annule Selection de Modifier",fun42); - XSDRAW_Activator::AddFunc("setapplied","modif:Modifier [name:un item sinon sortie fichier] : Applique un Modifier",fun43); - XSDRAW_Activator::AddFunc("resetapplied","modif:Modifier : Enleve un Modifier de la sortie fichier",fun44); - XSDRAW_Activator::AddFunc("modifmove","modif:Modifier M(model)/F(file) avant,apres:integer : Deplace un Modifier (sortie fichier)",fun45); - - XSDRAW_Activator::AddFunc("dispsel","disp:Dispatch sel:Selection -> Selection Finale de Dispatch",fun51); - XSDRAW_Activator::AddFSet("dispone","cree DispPerOne",fun_dispone); - XSDRAW_Activator::AddFSet("dispglob","cree DispGlobal",fun_dispglob); - XSDRAW_Activator::AddFSet("dispcount","count:IntParam : cree DispPerCount",fun_dispcount); - XSDRAW_Activator::AddFSet("dispfile","files:IntParam : cree DispPerFiles",fun_dispfiles); - XSDRAW_Activator::AddFSet("dispsign","sign:Signature : cree DispPerSignature",fun_dispsign); - XSDRAW_Activator::AddFunc("dumpdisp","disp:Dispatch : Affiche le Statut d'un Dispatch",fun56); - - XSDRAW_Activator::AddFunc("xremove","nom : Remove a Control Item de la Session",fun57); - XSDRAW_Activator::AddFunc("evaldisp","mode=[0-3] disp:Dispatch : Evaluates one or more Dispatch(es)",fun58); - XSDRAW_Activator::AddFunc("evaladisp","mode=[0-3] disp:Dispatch [givelist] : Evaluates a Dispatch (on a GiveList)",fun_evaladisp); - XSDRAW_Activator::AddFunc("writedisp","filepattern disp:Dispatch [givelist] : Writes Entities by Splitting by a Dispatch",fun_writedisp); - XSDRAW_Activator::AddFunc("evalcomplete","Evaluation Complete de la Repartition",fun59); - - XSDRAW_Activator::AddFunc("runcheck","affiche LastRunCheckList (write,modif)",fun60); - XSDRAW_Activator::AddFunc("runtranformer","transf:Transformer : Applique un Transformer",fun61); - XSDRAW_Activator::AddFSet("copy","cree TransformStandard, option Copy, vide",fun62); - XSDRAW_Activator::AddFSet("onthespot","cree TransformStandard, option OntheSpot, vide",fun63); - XSDRAW_Activator::AddFunc("runcopy","modif:ModelModifier [givelist] : Run via TransformStandard option Copy",fun6465); - XSDRAW_Activator::AddFunc("runonthespot","modif:ModelModifier [givelist] : Run via TransformStandard option OnTheSpot",fun6465); - XSDRAW_Activator::AddFSet("reorder","[f ou t] reordonne le modele",fun66); - - XSDRAW_Activator::AddFunc("toggle","sel:Selection genre Extract : Toggle Direct/Reverse",fun70); - XSDRAW_Activator::AddFunc("input","sel:Selection genre Deduct ou Extract input:Selection : Set Input",fun71); - XSDRAW_Activator::AddFSet("modelroots","cree SelectModelRoots",fun72); - XSDRAW_Activator::AddFSet("range","options... : cree SelectRange ...; tout court pour help",fun73); - XSDRAW_Activator::AddFSet("roots","cree SelectRoots (local roots)",fun74); - XSDRAW_Activator::AddFSet("shared","cree SelectShared",fun75); - XSDRAW_Activator::AddFSet("diff","[main:Selection diff:Selection] : cree SelectDiff",fun76); - XSDRAW_Activator::AddFunc("selmain","sel:Selection genre Control main:Selection : Set Main Input",fun77); - XSDRAW_Activator::AddFunc("selsecond","sel:Selection genre Control sec:Selection : Set Second Input",fun78); - XSDRAW_Activator::AddFSet("modelall","cree SelectModelAll",fun79); - XSDRAW_Activator::AddFunc("seladd","sel:Selection genre Combine input:Selection : Add Selection",fun80); - XSDRAW_Activator::AddFunc("selrem","sel:Selection genre Combine input:Selection : Remove Selection",fun81); - XSDRAW_Activator::AddFSet("number","num:IntParam : Cree SelectEntityNumber",fun82); - - XSDRAW_Activator::AddFSet("union","cree SelectUnion (vide), cf aussi combadd, combrem",fun83); - XSDRAW_Activator::AddFSet("intersect","cree SelectIntersection (vide), cf aussi combadd, combrem",fun84); - XSDRAW_Activator::AddFSet("typexact","type:string : cree SelectTextType Exact",fun85); - XSDRAW_Activator::AddFSet("errors","cree SelectErrorEntities (from file)",fun86); - XSDRAW_Activator::AddFSet("unknown","cree SelectUnknownEntities",fun87); - XSDRAW_Activator::AddFSet("sharing","cree SelectSharing",fun88); - XSDRAW_Activator::AddFSet("typecontain","type:string : cree SelectTextType Contains",fun89); - XSDRAW_Activator::AddFSet("pointed","cree SelectPointed [num/sel num/sel]",fun90); - XSDRAW_Activator::AddFunc("setpointed","sel:SelectPointed : edition SelectPointed. tout court pour help",fun91); - XSDRAW_Activator::AddFunc("setlist","sel:SelectPointed : edition SelectPointed. tout court pour help",fun91); - XSDRAW_Activator::AddFSet("incorrect","cree SelectIncorrectEntities (computed)",fun92); - - XSDRAW_Activator::AddFSet("signsel","sign:Signature|cnt:Counter text:string [e(D)|c] : cree SelectSignature",fun93); - XSDRAW_Activator::AddFSet("signcounter","sign:Signature : cree SignCounter",fun94); - XSDRAW_Activator::AddFSet("nbselected","applied:Selection : cree GraphCounter(=NbSelected)",funbselected); - - XSDRAW_Activator::AddFunc("editlist","editor or editform : lists defs + values",fun_editlist); - XSDRAW_Activator::AddFunc("editvalue","editform paramname [newval or .] : lists-changes a value",fun_editvalue); - XSDRAW_Activator::AddFunc("editclear","editform [paramname] : clears edition on all or one param",fun_editclear); - XSDRAW_Activator::AddFunc("editload","editform [entity-id] : loads from model or an entity",fun_editload); - XSDRAW_Activator::AddFunc("editapply","editform [keep] : applies on loaded data",fun_editapply); + XSDRAW::SetGroup("DE: General"); + XSDRAW::AddFunc("xstatus","Lists XSTEP Status : Version, System Name ...",funstatus); + XSDRAW::AddFunc("handler","Toggle status catch Handler Error of the session",fun1); + XSDRAW::AddFunc("xload","file:string : Read File -> Load Model",fun3); + XSDRAW::AddFunc("xread","file:string : Read File -> Load Model",fun3); + XSDRAW::AddFunc("writeall","file:string : Write all model (no split)",fun4); + XSDRAW::AddFunc("writesel","file:string sel:Selection : Write Selected (no split)",fun5); + XSDRAW::AddFunc("writeent","file:string n1ent n2ent...:integer : Write Entite(s) (no split)",fun6); + XSDRAW::AddFunc("writent", "file:string n1ent n2ent...:integer : Write Entite(s) (no split)",fun6); + XSDRAW::AddFunc("elabel","nument:integer : Displays Label Model of an entity",fun7); + XSDRAW::AddFunc("enum","label:string : Displays entities n0.s of which Label Model ends by..",fun8); + + XSDRAW::AddFunc("listtypes","List nb entities per type. Optional selection name else all model",fun9); + XSDRAW::AddFunc("count","Count : counter [selection]",funcount); + XSDRAW::AddFunc("listcount","List Counted : counter [selection [nument]]",funcount); + XSDRAW::AddFunc("sumcount","Summary Counted : counter [selection [nument]]",funcount); + XSDRAW::AddFunc("signtype","Sign Type [newone]",funsigntype); + XSDRAW::AddFunc("signcase","signature : displays possible cases",funsigncase); + + XSDRAW::AddFunc("estatus","ent/nument : displays status of an entity",fun10); + XSDRAW::AddFunc("data","Data (DumpModel); whole help : data tout court",fun11); + XSDRAW::AddFunc("entity","give n0 ou id of entity [+ level]",fundumpent); + XSDRAW::AddFunc("signature","signature name + n0/ident entity",funsign); + XSDRAW::AddFunc("queryparent"," give 2 n0s/labels of entities : dad son",funqp); + + XSDRAW::AddFunc("dumpshare","Dump Share (dispatches, IntParams)",fun12); + XSDRAW::AddFunc("listitems","List Items [label else all] ->Type,Label[,Name]",fun13); + XSDRAW::AddFSet("integer","value:integer : cree un IntParam",fun14); + XSDRAW::AddFunc("setint","name:IntParam newValue:integer : Change valeur IntParam",fun15); + XSDRAW::AddFSet("text","value:string : cree un TextParam",fun16); + XSDRAW::AddFunc("settext","Name:TextParam newValue:string : Change valeur TextParam",fun17); + XSDRAW::AddFunc("dumpsel","Dump Selection suivi du Nom de la Selection a dumper",fun19); + XSDRAW::AddFunc("evalsel","name:Selection [num/sel] : Evalue une Selection",fun20); + XSDRAW::AddFunc("givelist","num/sel [num/sel ...] : Evaluates GiveList",fun20); + XSDRAW::AddFunc("giveshort","num/sel [num/sel ...] : GiveList in short form",fun20); + XSDRAW::AddFunc("givepointed","num/sel [num/sel ...] : GiveList to fill a SelectPointed",fun20); + XSDRAW::AddFunc("makelist","listname [givelist] : Makes a List(SelectPointed) from GiveList",fun20); + XSDRAW::AddFunc("givecount","num/sel [num/sel ...] : Counts GiveList",fun20c); + XSDRAW::AddFSet("selsuite","sel sel ... : Creates a SelectSuite",funselsuite); + XSDRAW::AddFunc("clearitems","Clears all items (selections, dispatches, etc)",fun21); + XSDRAW::AddFunc("cleardata","mode:a-g-c-p : Clears all or some data (model, check...)",fun22); + + XSDRAW::AddFunc("itemlabel","xxx xxx : liste items having this label",fun24); + XSDRAW::AddFunc("xsave","filename:string : sauve items-session",fun25); + XSDRAW::AddFunc("xrestore","filename:string : restaure items-session",fun26); + XSDRAW::AddFunc("param","nompar:string : displays parameter value; + nompar val : changes it",fun27); + XSDRAW::AddFunc("defparam","nompar:string : display def. param; also : nompar edit, nompar init",fun28); + + XSDRAW::AddFunc("sentfiles","Lists files sent from last Load",fun29); + XSDRAW::AddFunc("fileprefix","prefix:string : definit File Prefix",fun30); + XSDRAW::AddFunc("fileext","extent:string : definit File Extension",fun31); + XSDRAW::AddFunc("fileroot","disp:Dispatch root:string : definit File Root sur un Dispatch",fun32); + XSDRAW::AddFunc("filedef","defroot:string : definit File DefaultRoot",fun33); + XSDRAW::AddFunc("evalfile","Evaluation du FileNaming et memorisation",fun34); + XSDRAW::AddFunc("clearfile","Efface la liste d'EvalFile",fun35); + XSDRAW::AddFunc("xsplit","[disp:Dispatch sinon tout] : Split, la grande affaire !",fun36); + XSDRAW::AddFunc("remaining","options... : Remaining Entities, help complet par remaining ?",fun37); + XSDRAW::AddFunc("setcontent","sel:Selection mode:k ou r : Restreint contenu du modele",fun38); + + XSDRAW::AddFunc("listmodif","List Final Modifiers",fun40); + XSDRAW::AddFunc("dumpmodif","modif:Modifier : Affiche le Statut d'un Modifier",fun41); + XSDRAW::AddFunc("modifsel","modif:Modifier [sel:Selection] : Change/Annule Selection de Modifier",fun42); + XSDRAW::AddFunc("setapplied","modif:Modifier [name:un item sinon sortie fichier] : Applique un Modifier",fun43); + XSDRAW::AddFunc("resetapplied","modif:Modifier : Enleve un Modifier de la sortie fichier",fun44); + XSDRAW::AddFunc("modifmove","modif:Modifier M(model)/F(file) avant,apres:integer : Deplace un Modifier (sortie fichier)",fun45); + + XSDRAW::AddFunc("dispsel","disp:Dispatch sel:Selection -> Selection Finale de Dispatch",fun51); + XSDRAW::AddFSet("dispone","cree DispPerOne",fun_dispone); + XSDRAW::AddFSet("dispglob","cree DispGlobal",fun_dispglob); + XSDRAW::AddFSet("dispcount","count:IntParam : cree DispPerCount",fun_dispcount); + XSDRAW::AddFSet("dispfile","files:IntParam : cree DispPerFiles",fun_dispfiles); + XSDRAW::AddFSet("dispsign","sign:Signature : cree DispPerSignature",fun_dispsign); + XSDRAW::AddFunc("dumpdisp","disp:Dispatch : Affiche le Statut d'un Dispatch",fun56); + + XSDRAW::AddFunc("xremove","nom : Remove a Control Item de la Session",fun57); + XSDRAW::AddFunc("evaldisp","mode=[0-3] disp:Dispatch : Evaluates one or more Dispatch(es)",fun58); + XSDRAW::AddFunc("evaladisp","mode=[0-3] disp:Dispatch [givelist] : Evaluates a Dispatch (on a GiveList)",fun_evaladisp); + XSDRAW::AddFunc("writedisp","filepattern disp:Dispatch [givelist] : Writes Entities by Splitting by a Dispatch",fun_writedisp); + XSDRAW::AddFunc("evalcomplete","Evaluation Complete de la Repartition",fun59); + + XSDRAW::AddFunc("runcheck","affiche LastRunCheckList (write,modif)",fun60); + XSDRAW::AddFunc("runtranformer","transf:Transformer : Applique un Transformer",fun61); + XSDRAW::AddFSet("copy","cree TransformStandard, option Copy, vide",fun62); + XSDRAW::AddFSet("onthespot","cree TransformStandard, option OntheSpot, vide",fun63); + XSDRAW::AddFunc("runcopy","modif:ModelModifier [givelist] : Run via TransformStandard option Copy",fun6465); + XSDRAW::AddFunc("runonthespot","modif:ModelModifier [givelist] : Run via TransformStandard option OnTheSpot",fun6465); + XSDRAW::AddFSet("reorder","[f ou t] reordonne le modele",fun66); + + XSDRAW::AddFunc("toggle","sel:Selection genre Extract : Toggle Direct/Reverse",fun70); + XSDRAW::AddFunc("input","sel:Selection genre Deduct ou Extract input:Selection : Set Input",fun71); + XSDRAW::AddFSet("modelroots","cree SelectModelRoots",fun72); + XSDRAW::AddFSet("range","options... : cree SelectRange ...; tout court pour help",fun73); + XSDRAW::AddFSet("roots","cree SelectRoots (local roots)",fun74); + XSDRAW::AddFSet("shared","cree SelectShared",fun75); + XSDRAW::AddFSet("diff","[main:Selection diff:Selection] : cree SelectDiff",fun76); + XSDRAW::AddFunc("selmain","sel:Selection genre Control main:Selection : Set Main Input",fun77); + XSDRAW::AddFunc("selsecond","sel:Selection genre Control sec:Selection : Set Second Input",fun78); + XSDRAW::AddFSet("modelall","cree SelectModelAll",fun79); + XSDRAW::AddFunc("seladd","sel:Selection genre Combine input:Selection : Add Selection",fun80); + XSDRAW::AddFunc("selrem","sel:Selection genre Combine input:Selection : Remove Selection",fun81); + XSDRAW::AddFSet("number","num:IntParam : Cree SelectEntityNumber",fun82); + + XSDRAW::AddFSet("union","cree SelectUnion (vide), cf aussi combadd, combrem",fun83); + XSDRAW::AddFSet("intersect","cree SelectIntersection (vide), cf aussi combadd, combrem",fun84); + XSDRAW::AddFSet("typexact","type:string : cree SelectTextType Exact",fun85); + XSDRAW::AddFSet("errors","cree SelectErrorEntities (from file)",fun86); + XSDRAW::AddFSet("unknown","cree SelectUnknownEntities",fun87); + XSDRAW::AddFSet("sharing","cree SelectSharing",fun88); + XSDRAW::AddFSet("typecontain","type:string : cree SelectTextType Contains",fun89); + XSDRAW::AddFSet("pointed","cree SelectPointed [num/sel num/sel]",fun90); + XSDRAW::AddFunc("setpointed","sel:SelectPointed : edition SelectPointed. tout court pour help",fun91); + XSDRAW::AddFunc("setlist","sel:SelectPointed : edition SelectPointed. tout court pour help",fun91); + XSDRAW::AddFSet("incorrect","cree SelectIncorrectEntities (computed)",fun92); + + XSDRAW::AddFSet("signsel","sign:Signature|cnt:Counter text:string [e(D)|c] : cree SelectSignature",fun93); + XSDRAW::AddFSet("signcounter","sign:Signature : cree SignCounter",fun94); + XSDRAW::AddFSet("nbselected","applied:Selection : cree GraphCounter(=NbSelected)",funbselected); + + XSDRAW::AddFunc("editlist","editor or editform : lists defs + values",fun_editlist); + XSDRAW::AddFunc("editvalue","editform paramname [newval or .] : lists-changes a value",fun_editvalue); + XSDRAW::AddFunc("editclear","editform [paramname] : clears edition on all or one param",fun_editclear); + XSDRAW::AddFunc("editload","editform [entity-id] : loads from model or an entity",fun_editload); + XSDRAW::AddFunc("editapply","editform [keep] : applies on loaded data",fun_editapply); } diff --git a/src/XSDRAW/XSDRAW_ShapeFunctions.cxx b/src/XSDRAW/XSDRAW_ShapeFunctions.cxx index 96adcaad1b..62fd2ced71 100644 --- a/src/XSDRAW/XSDRAW_ShapeFunctions.cxx +++ b/src/XSDRAW/XSDRAW_ShapeFunctions.cxx @@ -51,7 +51,6 @@ #include #include #include -#include #include #include @@ -699,24 +698,24 @@ void XSDRAW_ShapeFunctions::Init () static int initactor = 0; if (initactor) return; initactor = 1; - XSDRAW_Activator::SetGroup("DE: General"); + XSDRAW::SetGroup("DE: General"); - XSDRAW_Activator::AddFunc ("tpdraw","[mode:item or root] num|* [nomvar] Passes an ITEM to Shape Draw (Start or Result)",XSControl_tpdraw); + XSDRAW::AddFunc ("tpdraw","[mode:item or root] num|* [nomvar] Passes an ITEM to Shape Draw (Start or Result)",XSControl_tpdraw); - XSDRAW_Activator::AddFunc ("tpcompound","name:cstring [givelist] : -> compound with Shapes Root or from givelist",XSControl_tpcompound); + XSDRAW::AddFunc ("tpcompound","name:cstring [givelist] : -> compound with Shapes Root or from givelist",XSControl_tpcompound); - XSDRAW_Activator::AddFunc ("trdraw","results ->DRAW : all; or num [name] : from ent.num -> DRAW [name/tread_num]",XSControl_traccess); - XSDRAW_Activator::AddFunc ("trsave","results ->files : all; or num [name] : from ent.num -> DRAW [name/tread_num]",XSControl_traccess); - XSDRAW_Activator::AddFunc ("trcomp","results -> 1 compound -> DRAW + name optional",XSControl_traccess); - XSDRAW_Activator::AddFunc ("trscomp","results -> 1 compound -> file + name optional",XSControl_traccess); + XSDRAW::AddFunc ("trdraw","results ->DRAW : all; or num [name] : from ent.num -> DRAW [name/tread_num]",XSControl_traccess); + XSDRAW::AddFunc ("trsave","results ->files : all; or num [name] : from ent.num -> DRAW [name/tread_num]",XSControl_traccess); + XSDRAW::AddFunc ("trcomp","results -> 1 compound -> DRAW + name optional",XSControl_traccess); + XSDRAW::AddFunc ("trscomp","results -> 1 compound -> file + name optional",XSControl_traccess); - XSDRAW_Activator::AddFunc ("fromshape","shape [level=1]: imported/exported entity (when known)",XSControl_fromshape); - XSDRAW_Activator::AddFunc ("trconnexent","name of draw shape : entities -> connected shapes (when known)",XSControl_trconnexentities); + XSDRAW::AddFunc ("fromshape","shape [level=1]: imported/exported entity (when known)",XSControl_fromshape); + XSDRAW::AddFunc ("trconnexent","name of draw shape : entities -> connected shapes (when known)",XSControl_trconnexentities); - XSDRAW_Activator::AddFunc ("trimport","filename or . varname givelist -> 1 shape per entity",XSControl_trimport); - XSDRAW_Activator::AddFunc ("trimpcomp","filename or . varname givelist -> one xcompound",XSControl_trimport); + XSDRAW::AddFunc ("trimport","filename or . varname givelist -> 1 shape per entity",XSControl_trimport); + XSDRAW::AddFunc ("trimpcomp","filename or . varname givelist -> one xcompound",XSControl_trimport); - XSDRAW_Activator::AddFunc ("twrite","shape : transfer write for this shape, AFTER newmodel !",XSControl_twrite); + XSDRAW::AddFunc ("twrite","shape : transfer write for this shape, AFTER newmodel !",XSControl_twrite); } // ###################################################################### diff --git a/src/XSDRAWSTEP/FILES b/src/XSDRAWSTEP/FILES index 3c390fe82e..e0c83632b1 100644 --- a/src/XSDRAWSTEP/FILES +++ b/src/XSDRAWSTEP/FILES @@ -2,3 +2,5 @@ XSDRAWSTEP.cxx XSDRAWSTEP.hxx XSDRAWSTEP_Activator.cxx XSDRAWSTEP_Activator.hxx +XSDRAWSTEP_EditHeader.cxx +XSDRAWSTEP_EditHeader.hxx diff --git a/src/XSDRAWSTEP/XSDRAWSTEP.cxx b/src/XSDRAWSTEP/XSDRAWSTEP.cxx index 7c45af432e..b7fdd5343f 100644 --- a/src/XSDRAWSTEP/XSDRAWSTEP.cxx +++ b/src/XSDRAWSTEP/XSDRAWSTEP.cxx @@ -81,7 +81,7 @@ static void cleanpilot () #include #include #include -#include +#include #include #include @@ -182,7 +182,7 @@ void XSDRAWSTEP::Init () assembly->SetInput (xmr); aCntl->AddSessionItem (assembly,"step-assembly"); - Handle(APIHeaderSection_EditHeader) edhead = new APIHeaderSection_EditHeader; + Handle(XSDRAWSTEP_EditHeader) edhead = new XSDRAWSTEP_EditHeader; Handle(IFSelect_EditForm) edheadf = new IFSelect_EditForm (edhead,Standard_False,Standard_True,"Step Header"); aCntl->AddSessionItem (edhead,"step-header-edit"); aCntl->AddSessionItem (edheadf,"step-header"); @@ -257,7 +257,7 @@ void XSDRAWSTEP::Init () assembly->SetInput (slr); WS->AddNamedItem ("step-assembly",assembly); - Handle(APIHeaderSection_EditHeader) edhead = new APIHeaderSection_EditHeader; + Handle(XSDRAWSTEP_EditHeader) edhead = new XSDRAWSTEP_EditHeader; Handle(IFSelect_EditForm) edheadf = new IFSelect_EditForm (edhead,Standard_False,Standard_True,"Step Header"); WS->AddNamedItem ("step-header-edit",edhead); WS->AddNamedItem ("step-header",edheadf); diff --git a/src/APIHeaderSection/APIHeaderSection_EditHeader.cxx b/src/XSDRAWSTEP/XSDRAWSTEP_EditHeader.cxx similarity index 92% rename from src/APIHeaderSection/APIHeaderSection_EditHeader.cxx rename to src/XSDRAWSTEP/XSDRAWSTEP_EditHeader.cxx index 0dd3bfa111..fdca010d80 100644 --- a/src/APIHeaderSection/APIHeaderSection_EditHeader.cxx +++ b/src/XSDRAWSTEP/XSDRAWSTEP_EditHeader.cxx @@ -12,7 +12,7 @@ // commercial license or contractual agreement. -#include +#include #include #include #include @@ -23,7 +23,7 @@ #include #include -IMPLEMENT_STANDARD_RTTIEXT(APIHeaderSection_EditHeader,IFSelect_Editor) +IMPLEMENT_STANDARD_RTTIEXT(XSDRAWSTEP_EditHeader,IFSelect_Editor) static Standard_Boolean IsTimeStamp (const Handle(TCollection_HAsciiString)& val) @@ -66,7 +66,7 @@ static Standard_Boolean IsTimeStamp } - APIHeaderSection_EditHeader::APIHeaderSection_EditHeader () + XSDRAWSTEP_EditHeader::XSDRAWSTEP_EditHeader () : IFSelect_Editor (10) { // Definition @@ -97,21 +97,21 @@ static Standard_Boolean IsTimeStamp } - TCollection_AsciiString APIHeaderSection_EditHeader::Label () const + TCollection_AsciiString XSDRAWSTEP_EditHeader::Label () const { return TCollection_AsciiString ("Step Header"); } - Standard_Boolean APIHeaderSection_EditHeader::Recognize + Standard_Boolean XSDRAWSTEP_EditHeader::Recognize (const Handle(IFSelect_EditForm)& /*form*/) const { return Standard_True; } // ?? - Handle(TCollection_HAsciiString) APIHeaderSection_EditHeader::StringValue + Handle(TCollection_HAsciiString) XSDRAWSTEP_EditHeader::StringValue (const Handle(IFSelect_EditForm)& /*form*/, const Standard_Integer num) const { // Default Values return TypedValue(num)->HStringValue(); } - Standard_Boolean APIHeaderSection_EditHeader::Load + Standard_Boolean XSDRAWSTEP_EditHeader::Load (const Handle(IFSelect_EditForm)& form, const Handle(Standard_Transient)& /*ent*/, const Handle(Interface_InterfaceModel)& model) const @@ -138,7 +138,7 @@ static Standard_Boolean IsTimeStamp return Standard_True; } - Standard_Boolean APIHeaderSection_EditHeader::Apply + Standard_Boolean XSDRAWSTEP_EditHeader::Apply (const Handle(IFSelect_EditForm)& form, const Handle(Standard_Transient)& /*ent*/, const Handle(Interface_InterfaceModel)& model) const diff --git a/src/APIHeaderSection/APIHeaderSection_EditHeader.hxx b/src/XSDRAWSTEP/XSDRAWSTEP_EditHeader.hxx similarity index 78% rename from src/APIHeaderSection/APIHeaderSection_EditHeader.hxx rename to src/XSDRAWSTEP/XSDRAWSTEP_EditHeader.hxx index ca5543d907..47063bd996 100644 --- a/src/APIHeaderSection/APIHeaderSection_EditHeader.hxx +++ b/src/XSDRAWSTEP/XSDRAWSTEP_EditHeader.hxx @@ -14,8 +14,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _APIHeaderSection_EditHeader_HeaderFile -#define _APIHeaderSection_EditHeader_HeaderFile +#ifndef _XSDRAWSTEP_EditHeader_HeaderFile +#define _XSDRAWSTEP_EditHeader_HeaderFile #include #include @@ -30,17 +30,15 @@ class Standard_Transient; class Interface_InterfaceModel; -class APIHeaderSection_EditHeader; -DEFINE_STANDARD_HANDLE(APIHeaderSection_EditHeader, IFSelect_Editor) +class XSDRAWSTEP_EditHeader; +DEFINE_STANDARD_HANDLE(XSDRAWSTEP_EditHeader, IFSelect_Editor) -class APIHeaderSection_EditHeader : public IFSelect_Editor +class XSDRAWSTEP_EditHeader : public IFSelect_Editor { + public: -public: - - - Standard_EXPORT APIHeaderSection_EditHeader(); + Standard_EXPORT XSDRAWSTEP_EditHeader(); Standard_EXPORT TCollection_AsciiString Label() const Standard_OVERRIDE; @@ -52,27 +50,7 @@ public: Standard_EXPORT Standard_Boolean Load (const Handle(IFSelect_EditForm)& form, const Handle(Standard_Transient)& ent, const Handle(Interface_InterfaceModel)& model) const Standard_OVERRIDE; - - - - DEFINE_STANDARD_RTTIEXT(APIHeaderSection_EditHeader,IFSelect_Editor) - -protected: - - - - -private: - - - - + DEFINE_STANDARD_RTTIEXT(XSDRAWSTEP_EditHeader,IFSelect_Editor) }; - - - - - - -#endif // _APIHeaderSection_EditHeader_HeaderFile +#endif // _XSDRAWSTEP_EditHeader_HeaderFile -- 2.39.5