+++ /dev/null
-// 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 <APIHeaderSection_EditHeader.hxx>
-#include <APIHeaderSection_MakeHeader.hxx>
-#include <IFSelect_EditForm.hxx>
-#include <Interface_InterfaceModel.hxx>
-#include <Interface_TypedValue.hxx>
-#include <Standard_Transient.hxx>
-#include <Standard_Type.hxx>
-#include <StepData_StepModel.hxx>
-#include <TCollection_AsciiString.hxx>
-#include <TCollection_HAsciiString.hxx>
-
-IMPLEMENT_STANDARD_RTTIEXT(APIHeaderSection_EditHeader,IFSelect_Editor)
-
-static Standard_Boolean IsTimeStamp
- (const Handle(TCollection_HAsciiString)& val)
-{
- if (val.IsNull()) return Standard_False;
- if (val->Length() != 19) return Standard_False;
-// On y va
- char dizmois = val->Value(6);
- char dizjour = val->Value(9);
- char dizheur = val->Value(12);
- for (Standard_Integer i = 1; i <= 19; i ++) {
- char uncar = val->Value(i);
- switch (i) {
- case 1 : if (uncar != '1' && uncar != '2') return Standard_False; break;
- case 2 :
- case 3 :
- case 4 : if (uncar < '0' || uncar > '9') return Standard_False; break;
- case 5 : if (uncar != '-') return Standard_False;
- case 6 : if (uncar != '0' && uncar != '1') return Standard_False; break;
- case 7 : if (uncar < '0' || uncar > '9') return Standard_False;
- if (dizmois == '1' && (uncar < '0' || uncar > '2')) return Standard_False; break;
- case 8 : if (uncar != '-') return Standard_False;
- case 9 : if (uncar < '0' || uncar > '3') return Standard_False; break;
- case 10 : if (uncar < '0' || uncar > '9') return Standard_False;
- if (dizjour == '3' && (uncar != '0' && uncar != '1')) return Standard_False; break;
- case 11 : if (uncar != 'T') return Standard_False;
- case 12 : if (uncar < '0' || uncar > '2') return Standard_False; break;
- case 13 : if (uncar < '0' || uncar > '9') return Standard_False;
- if (dizheur == '2' && (uncar < '0' || uncar > '3')) return Standard_False; break;
- case 14 : if (uncar != ':') return Standard_False;
- case 15 : if (uncar < '0' || uncar > '5') return Standard_False; break;
- case 16 : if (uncar < '0' || uncar > '9') return Standard_False; break;
- case 17 : if (uncar != ':') return Standard_False;
- case 18 : if (uncar < '0' || uncar > '5') return Standard_False; break;
- case 19 : if (uncar < '0' || uncar > '9') return Standard_False; break;
- default : break;
- }
- }
- return Standard_True;
-}
-
-
- APIHeaderSection_EditHeader::APIHeaderSection_EditHeader ()
- : IFSelect_Editor (10)
-{
-// Definition
- Handle(Interface_TypedValue) fn_name = new Interface_TypedValue("fn_name");
- SetValue (1,fn_name,"name");
- Handle(Interface_TypedValue) fn_time = new Interface_TypedValue("fn_time_stamp");
- fn_time->SetSatisfies (IsTimeStamp,"IsTimeStamp");
- SetValue (2,fn_time,"time");
- Handle(Interface_TypedValue) fn_author = new Interface_TypedValue("fn_author");
- SetValue (3,fn_author,"author"); // 1 seul (1er de liste)
- Handle(Interface_TypedValue) fn_org = new Interface_TypedValue("fn_organization");
- SetValue (4,fn_org,"org"); // 1 seul (1er de liste)
- Handle(Interface_TypedValue) fn_preproc = new Interface_TypedValue("fn_preprocessor_version");
- SetValue (5,fn_preproc,"preproc");
- Handle(Interface_TypedValue) fn_orig = new Interface_TypedValue("fn_originating_system");
- SetValue (6,fn_orig,"orig");
- Handle(Interface_TypedValue) fn_autorize = new Interface_TypedValue("fn_authorization");
- SetValue (7,fn_autorize,"autorize");
-
- Handle(Interface_TypedValue) fs_schema = new Interface_TypedValue("fs_schema_identifiers");
- SetValue (8,fs_schema,"schema"); // 1 seul (1er de liste)
-
- Handle(Interface_TypedValue) fd_descr = new Interface_TypedValue("fd_description");
- SetValue (9,fd_descr,"descr"); // 1 seul (1er de liste)
-
- Handle(Interface_TypedValue) fd_level = new Interface_TypedValue("fd_implementation_level");
- SetValue (10,fd_level,"level");
-
-}
-
- TCollection_AsciiString APIHeaderSection_EditHeader::Label () const
- { return TCollection_AsciiString ("Step Header"); }
-
- Standard_Boolean APIHeaderSection_EditHeader::Recognize
- (const Handle(IFSelect_EditForm)& /*form*/) const
-{ return Standard_True; } // ??
-
- Handle(TCollection_HAsciiString) APIHeaderSection_EditHeader::StringValue
- (const Handle(IFSelect_EditForm)& /*form*/, const Standard_Integer num) const
-{
-// Default Values
- return TypedValue(num)->HStringValue();
-}
-
- Standard_Boolean APIHeaderSection_EditHeader::Load
- (const Handle(IFSelect_EditForm)& form,
- const Handle(Standard_Transient)& /*ent*/,
- const Handle(Interface_InterfaceModel)& model) const
-{
- Handle(StepData_StepModel) modl =
- Handle(StepData_StepModel)::DownCast(model);
- if (modl.IsNull()) return Standard_False;
-
- APIHeaderSection_MakeHeader mkh (modl);
-
- form->LoadValue (1 ,mkh.Name ());
- form->LoadValue (2 ,mkh.TimeStamp ());
- form->LoadValue (3 ,mkh.AuthorValue (1));
- form->LoadValue (4 ,mkh.OrganizationValue (1));
- form->LoadValue (5 ,mkh.PreprocessorVersion ());
- form->LoadValue (6 ,mkh.OriginatingSystem ());
- form->LoadValue (7 ,mkh.Authorisation ());
-
- form->LoadValue (8 ,mkh.SchemaIdentifiersValue (1));
-
- form->LoadValue (9 ,mkh.DescriptionValue (1));
- form->LoadValue (10,mkh.ImplementationLevel ());
-
- return Standard_True;
-}
-
- Standard_Boolean APIHeaderSection_EditHeader::Apply
- (const Handle(IFSelect_EditForm)& form,
- const Handle(Standard_Transient)& /*ent*/,
- const Handle(Interface_InterfaceModel)& model) const
-{
- Handle(StepData_StepModel) modl =
- Handle(StepData_StepModel)::DownCast(model);
- if (modl.IsNull()) return Standard_False;
-
- APIHeaderSection_MakeHeader mkh (modl);
-
- if (form->IsModified(1)) mkh.SetName (form->EditedValue(1));
- if (form->IsModified(2)) mkh.SetTimeStamp (form->EditedValue(2));
- if (form->IsModified(3)) mkh.SetAuthorValue (1,form->EditedValue(3));
- if (form->IsModified(4)) mkh.SetOrganizationValue (1,form->EditedValue(4));
- if (form->IsModified(5)) mkh.SetPreprocessorVersion (form->EditedValue(5));
- if (form->IsModified(6)) mkh.SetOriginatingSystem (form->EditedValue(6));
- if (form->IsModified(7)) mkh.SetAuthorisation (form->EditedValue(7));
-
- if (form->IsModified(8)) mkh.SetSchemaIdentifiersValue (1,form->EditedValue(8));
-
- if (form->IsModified(9)) mkh.SetDescriptionValue (1,form->EditedValue(9));
- if (form->IsModified(10)) mkh.SetImplementationLevel (form->EditedValue(10));
-
- mkh.Apply( Handle(StepData_StepModel)::DownCast(model) );
-
- return Standard_True;
-}
+++ /dev/null
-// Created on: 1998-07-08
-// Created by: Christian CAILLET
-// Copyright (c) 1998-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 _APIHeaderSection_EditHeader_HeaderFile
-#define _APIHeaderSection_EditHeader_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_Type.hxx>
-
-#include <IFSelect_Editor.hxx>
-#include <Standard_Boolean.hxx>
-#include <Standard_Integer.hxx>
-class TCollection_AsciiString;
-class IFSelect_EditForm;
-class TCollection_HAsciiString;
-class Standard_Transient;
-class Interface_InterfaceModel;
-
-
-class APIHeaderSection_EditHeader;
-DEFINE_STANDARD_HANDLE(APIHeaderSection_EditHeader, IFSelect_Editor)
-
-
-class APIHeaderSection_EditHeader : public IFSelect_Editor
-{
-
-public:
-
-
- Standard_EXPORT APIHeaderSection_EditHeader();
-
- Standard_EXPORT TCollection_AsciiString Label() const Standard_OVERRIDE;
-
- Standard_EXPORT Standard_Boolean Recognize (const Handle(IFSelect_EditForm)& form) const Standard_OVERRIDE;
-
- Standard_EXPORT Handle(TCollection_HAsciiString) StringValue (const Handle(IFSelect_EditForm)& form, const Standard_Integer num) const Standard_OVERRIDE;
-
- Standard_EXPORT Standard_Boolean Apply (const Handle(IFSelect_EditForm)& form, const Handle(Standard_Transient)& ent, const Handle(Interface_InterfaceModel)& model) const Standard_OVERRIDE;
-
- 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:
-
-
-
-
-};
-
-
-
-
-
-
-
-#endif // _APIHeaderSection_EditHeader_HeaderFile
-APIHeaderSection_EditHeader.cxx
-APIHeaderSection_EditHeader.hxx
APIHeaderSection_MakeHeader.cxx
APIHeaderSection_MakeHeader.hxx
//! 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
//! 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
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)
{
//! 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 <alias> 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);
#include <Standard.hxx>
#include <Standard_Type.hxx>
-#include <Standard_Boolean.hxx>
#include <XSControl_Controller.hxx>
-#include <IFSelect_ReturnStatus.hxx>
-#include <Standard_Integer.hxx>
class TopoDS_Shape;
class Transfer_FinderProcess;
class XSControl_WorkSession;
#include <Dico_DictionaryOfTransient.hxx>
-#include <Dico_IteratorOfDictionaryOfInteger.hxx>
+//#include <Dico_IteratorOfDictionaryOfInteger.hxx>
#include <Dico_IteratorOfDictionaryOfTransient.hxx>
-#include <IFSelect_DispPerCount.hxx>
-#include <IFSelect_DispPerFiles.hxx>
-#include <IFSelect_DispPerOne.hxx>
-#include <IFSelect_DispPerSignature.hxx>
-#include <IFSelect_EditForm.hxx>
+//s#include <IFSelect_DispPerCount.hxx>
+//s#include <IFSelect_DispPerFiles.hxx>
+//s#include <IFSelect_DispPerOne.hxx>
+//s#include <IFSelect_DispPerSignature.hxx>
+//s#include <IFSelect_EditForm.hxx>
#include <IFSelect_GeneralModifier.hxx>
-#include <IFSelect_GraphCounter.hxx>
-#include <IFSelect_IntParam.hxx>
-#include <IFSelect_ParamEditor.hxx>
-#include <IFSelect_SelectModelEntities.hxx>
-#include <IFSelect_SelectModelRoots.hxx>
-#include <IFSelect_SelectPointed.hxx>
-#include <IFSelect_SelectShared.hxx>
-#include <IFSelect_SelectSharing.hxx>
+//s#include <IFSelect_GraphCounter.hxx>
+//s#include <IFSelect_IntParam.hxx>
+//s#include <IFSelect_ParamEditor.hxx>
+//s#include <IFSelect_SelectModelEntities.hxx>
+//s#include <IFSelect_SelectModelRoots.hxx>
+//s#include <IFSelect_SelectPointed.hxx>
+//s#include <IFSelect_SelectShared.hxx>
+//s#include <IFSelect_SelectSharing.hxx>
#include <IFSelect_ShareOut.hxx>
-#include <IFSelect_SignAncestor.hxx>
-#include <IFSelect_Signature.hxx>
-#include <IFSelect_SignCategory.hxx>
-#include <IFSelect_SignCounter.hxx>
-#include <IFSelect_SignType.hxx>
-#include <IFSelect_SignValidity.hxx>
-#include <IFSelect_WorkLibrary.hxx>
-#include <Interface_CheckIterator.hxx>
+//s#include <IFSelect_SignAncestor.hxx>
+//s#include <IFSelect_Signature.hxx>
+//s#include <IFSelect_SignCategory.hxx>
+//s#include <IFSelect_SignCounter.hxx>
+//s#include <IFSelect_SignType.hxx>
+//s#include <IFSelect_SignValidity.hxx>
#include <Interface_InterfaceModel.hxx>
#include <Interface_Macros.hxx>
#include <Interface_Protocol.hxx>
#include <Message.hxx>
#include <Message_Messenger.hxx>
#include <Standard_DomainError.hxx>
-#include <Standard_Transient.hxx>
-#include <Standard_Type.hxx>
#include <TCollection_HAsciiString.hxx>
#include <TColStd_HSequenceOfHAsciiString.hxx>
#include <TColStd_IndexedMapOfTransient.hxx>
#include <TopoDS_Shape.hxx>
-#include <Transfer_ActorOfFinderProcess.hxx>
-#include <Transfer_ActorOfTransientProcess.hxx>
-#include <Transfer_Binder.hxx>
#include <Transfer_FinderProcess.hxx>
#include <Transfer_SimpleBinderOfTransient.hxx>
#include <TransferBRep_ShapeMapper.hxx>
-#include <XSControl_ConnectedShapes.hxx>
+//s#include <XSControl_ConnectedShapes.hxx>
#include <XSControl_Controller.hxx>
-#include <XSControl_SelectForTransfer.hxx>
-#include <XSControl_SignTransferStatus.hxx>
-#include <XSControl_TransferReader.hxx>
+//s#include <XSControl_SelectForTransfer.hxx>
+//s#include <XSControl_SignTransferStatus.hxx>
#include <XSControl_WorkSession.hxx>
IMPLEMENT_STANDARD_RTTIEXT(XSControl_Controller,MMgt_TShared)
WS->AddNamedItem (iter.Name().ToCString(), iter.Value());
}
+ /*szv_c1:
if (WS->NamedItem("xst-model-all").IsNull()) {
Handle(IFSelect_SelectModelEntities) sle = new IFSelect_SelectModelEntities;
WS->SetSignType( stp );
}
+ */
// Applied Modifiers
Standard_Integer i, nb = myAdaptorApplied.Length();
// 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);
+ */
}
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
#include <XSControl_WorkSession.hxx>
#include <XSDRAW.hxx>
#include <XSDRAW_Vars.hxx>
-#include <XSDRAW_Functions.hxx>
#include <XSDRAW_SelectFunctions.hxx>
+#include <XSDRAW_ControlFunctions.hxx>
#include <XSDRAW_ShapeFunctions.hxx>
#include <stdio.h>
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)
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 <IFSelect_SelectModelEntities.hxx>
+#include <IFSelect_SelectModelRoots.hxx>
+#include <XSControl_SelectForTransfer.hxx>
+#include <XSControl_SignTransferStatus.hxx>
+#include <XSControl_ConnectedShapes.hxx>
+#include <IFSelect_SignType.hxx>
+#include <IFSelect_SignAncestor.hxx>
+#include <IFSelect_SignCounter.hxx>
+#include <IFSelect_SignCategory.hxx>
+#include <IFSelect_SignValidity.hxx>
+#include <IFSelect_DispPerOne.hxx>
+#include <IFSelect_DispPerCount.hxx>
+#include <IFSelect_IntParam.hxx>
+#include <IFSelect_DispPerFiles.hxx>
+#include <IFSelect_DispPerSignature.hxx>
+#include <IFSelect_SelectPointed.hxx>
+#include <IFSelect_SelectSharing.hxx>
+#include <IFSelect_SelectShared.hxx>
+#include <IFSelect_GraphCounter.hxx>
+#include <Interface_Static.hxx>
+#include <IFSelect_ParamEditor.hxx>
+#include <IFSelect_EditForm.hxx>
+
+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"<<endl;
- else if (!Session().IsNull()) Session()->SetController (control);
- else cout<<"XSTEP Session badly or not defined"<<endl;
+ else if (Session().IsNull()) cout<<"XSTEP Session badly or not defined"<<endl;
+ else {
+ Handle(XSControl_WorkSession) WS = Session();
+
+ if (WS->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);
+ }
}
cout<<" -- Recorded Type:"<<model->TypeName (ent)<<endl;
return model->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 <number> 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);
+}
#include <TColStd_HSequenceOfTransient.hxx>
#include <TopTools_HSequenceOfShape.hxx>
#include <IFSelect_SessionPilot.hxx>
-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
//! (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
//! 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
+++ /dev/null
-// 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 <XSDRAW_Activator.hxx>
-
-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);
-}
+++ /dev/null
-// 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 <Standard.hxx>
-#include <Standard_Type.hxx>
-
-#include <TCollection_AsciiString.hxx>
-#include <IFSelect_Activator.hxx>
-#include <IFSelect_ReturnStatus.hxx>
-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 <number> 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
#include <XSControl_TransferWriter.hxx>
#include <XSControl_WorkSession.hxx>
#include <XSDRAW.hxx>
-#include <XSDRAW_Activator.hxx>
#include <XSDRAW_ControlFunctions.hxx>
#include <XSDRAW_SelectFunctions.hxx>
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);
}
+++ /dev/null
-// 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 <XSDRAW_Functions.hxx>
-#include <XSDRAW_ShapeFunctions.hxx>
-#include <XSDRAW_ControlFunctions.hxx>
-#include <XSDRAW_SelectFunctions.hxx>
-
-void XSDRAW_Functions::Init ()
-{
- XSDRAW_SelectFunctions::Init();
- XSDRAW_ControlFunctions::Init();
- XSDRAW_ShapeFunctions::Init ();
-}
+++ /dev/null
-// 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 <Standard.hxx>
-
-//! 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
#include <TColStd_HSequenceOfHAsciiString.hxx>
#include <TColStd_HSequenceOfTransient.hxx>
#include <TColStd_MapOfInteger.hxx>
-#include <XSDRAW_Activator.hxx>
+#include <XSDRAW.hxx>
#include <XSDRAW_SelectFunctions.hxx>
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 <modif> via TransformStandard option Copy",fun6465);
- XSDRAW_Activator::AddFunc("runonthespot","modif:ModelModifier [givelist] : Run <modif> 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 <modif> via TransformStandard option Copy",fun6465);
+ XSDRAW::AddFunc("runonthespot","modif:ModelModifier [givelist] : Run <modif> 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);
}
#include <XSControl_Vars.hxx>
#include <XSControl_WorkSession.hxx>
#include <XSDRAW.hxx>
-#include <XSDRAW_Activator.hxx>
#include <XSDRAW_SelectFunctions.hxx>
#include <XSDRAW_ShapeFunctions.hxx>
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);
}
// ######################################################################
XSDRAWSTEP.hxx
XSDRAWSTEP_Activator.cxx
XSDRAWSTEP_Activator.hxx
+XSDRAWSTEP_EditHeader.cxx
+XSDRAWSTEP_EditHeader.hxx
#include <STEPSelections_SelectGSCurves.hxx>
#include <STEPSelections_SelectAssembly.hxx>
#include <STEPSelections_SelectForTransfer.hxx>
-#include <APIHeaderSection_EditHeader.hxx>
+#include <XSDRAWSTEP_EditHeader.hxx>
#include <STEPEdit_EditContext.hxx>
#include <STEPEdit_EditSDR.hxx>
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");
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);
--- /dev/null
+// 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 <XSDRAWSTEP_EditHeader.hxx>
+#include <APIHeaderSection_MakeHeader.hxx>
+#include <IFSelect_EditForm.hxx>
+#include <Interface_InterfaceModel.hxx>
+#include <Interface_TypedValue.hxx>
+#include <Standard_Transient.hxx>
+#include <Standard_Type.hxx>
+#include <StepData_StepModel.hxx>
+#include <TCollection_AsciiString.hxx>
+#include <TCollection_HAsciiString.hxx>
+
+IMPLEMENT_STANDARD_RTTIEXT(XSDRAWSTEP_EditHeader,IFSelect_Editor)
+
+static Standard_Boolean IsTimeStamp
+ (const Handle(TCollection_HAsciiString)& val)
+{
+ if (val.IsNull()) return Standard_False;
+ if (val->Length() != 19) return Standard_False;
+// On y va
+ char dizmois = val->Value(6);
+ char dizjour = val->Value(9);
+ char dizheur = val->Value(12);
+ for (Standard_Integer i = 1; i <= 19; i ++) {
+ char uncar = val->Value(i);
+ switch (i) {
+ case 1 : if (uncar != '1' && uncar != '2') return Standard_False; break;
+ case 2 :
+ case 3 :
+ case 4 : if (uncar < '0' || uncar > '9') return Standard_False; break;
+ case 5 : if (uncar != '-') return Standard_False;
+ case 6 : if (uncar != '0' && uncar != '1') return Standard_False; break;
+ case 7 : if (uncar < '0' || uncar > '9') return Standard_False;
+ if (dizmois == '1' && (uncar < '0' || uncar > '2')) return Standard_False; break;
+ case 8 : if (uncar != '-') return Standard_False;
+ case 9 : if (uncar < '0' || uncar > '3') return Standard_False; break;
+ case 10 : if (uncar < '0' || uncar > '9') return Standard_False;
+ if (dizjour == '3' && (uncar != '0' && uncar != '1')) return Standard_False; break;
+ case 11 : if (uncar != 'T') return Standard_False;
+ case 12 : if (uncar < '0' || uncar > '2') return Standard_False; break;
+ case 13 : if (uncar < '0' || uncar > '9') return Standard_False;
+ if (dizheur == '2' && (uncar < '0' || uncar > '3')) return Standard_False; break;
+ case 14 : if (uncar != ':') return Standard_False;
+ case 15 : if (uncar < '0' || uncar > '5') return Standard_False; break;
+ case 16 : if (uncar < '0' || uncar > '9') return Standard_False; break;
+ case 17 : if (uncar != ':') return Standard_False;
+ case 18 : if (uncar < '0' || uncar > '5') return Standard_False; break;
+ case 19 : if (uncar < '0' || uncar > '9') return Standard_False; break;
+ default : break;
+ }
+ }
+ return Standard_True;
+}
+
+
+ XSDRAWSTEP_EditHeader::XSDRAWSTEP_EditHeader ()
+ : IFSelect_Editor (10)
+{
+// Definition
+ Handle(Interface_TypedValue) fn_name = new Interface_TypedValue("fn_name");
+ SetValue (1,fn_name,"name");
+ Handle(Interface_TypedValue) fn_time = new Interface_TypedValue("fn_time_stamp");
+ fn_time->SetSatisfies (IsTimeStamp,"IsTimeStamp");
+ SetValue (2,fn_time,"time");
+ Handle(Interface_TypedValue) fn_author = new Interface_TypedValue("fn_author");
+ SetValue (3,fn_author,"author"); // 1 seul (1er de liste)
+ Handle(Interface_TypedValue) fn_org = new Interface_TypedValue("fn_organization");
+ SetValue (4,fn_org,"org"); // 1 seul (1er de liste)
+ Handle(Interface_TypedValue) fn_preproc = new Interface_TypedValue("fn_preprocessor_version");
+ SetValue (5,fn_preproc,"preproc");
+ Handle(Interface_TypedValue) fn_orig = new Interface_TypedValue("fn_originating_system");
+ SetValue (6,fn_orig,"orig");
+ Handle(Interface_TypedValue) fn_autorize = new Interface_TypedValue("fn_authorization");
+ SetValue (7,fn_autorize,"autorize");
+
+ Handle(Interface_TypedValue) fs_schema = new Interface_TypedValue("fs_schema_identifiers");
+ SetValue (8,fs_schema,"schema"); // 1 seul (1er de liste)
+
+ Handle(Interface_TypedValue) fd_descr = new Interface_TypedValue("fd_description");
+ SetValue (9,fd_descr,"descr"); // 1 seul (1er de liste)
+
+ Handle(Interface_TypedValue) fd_level = new Interface_TypedValue("fd_implementation_level");
+ SetValue (10,fd_level,"level");
+
+}
+
+ TCollection_AsciiString XSDRAWSTEP_EditHeader::Label () const
+ { return TCollection_AsciiString ("Step Header"); }
+
+ Standard_Boolean XSDRAWSTEP_EditHeader::Recognize
+ (const Handle(IFSelect_EditForm)& /*form*/) const
+{ return Standard_True; } // ??
+
+ Handle(TCollection_HAsciiString) XSDRAWSTEP_EditHeader::StringValue
+ (const Handle(IFSelect_EditForm)& /*form*/, const Standard_Integer num) const
+{
+// Default Values
+ return TypedValue(num)->HStringValue();
+}
+
+ Standard_Boolean XSDRAWSTEP_EditHeader::Load
+ (const Handle(IFSelect_EditForm)& form,
+ const Handle(Standard_Transient)& /*ent*/,
+ const Handle(Interface_InterfaceModel)& model) const
+{
+ Handle(StepData_StepModel) modl =
+ Handle(StepData_StepModel)::DownCast(model);
+ if (modl.IsNull()) return Standard_False;
+
+ APIHeaderSection_MakeHeader mkh (modl);
+
+ form->LoadValue (1 ,mkh.Name ());
+ form->LoadValue (2 ,mkh.TimeStamp ());
+ form->LoadValue (3 ,mkh.AuthorValue (1));
+ form->LoadValue (4 ,mkh.OrganizationValue (1));
+ form->LoadValue (5 ,mkh.PreprocessorVersion ());
+ form->LoadValue (6 ,mkh.OriginatingSystem ());
+ form->LoadValue (7 ,mkh.Authorisation ());
+
+ form->LoadValue (8 ,mkh.SchemaIdentifiersValue (1));
+
+ form->LoadValue (9 ,mkh.DescriptionValue (1));
+ form->LoadValue (10,mkh.ImplementationLevel ());
+
+ return Standard_True;
+}
+
+ Standard_Boolean XSDRAWSTEP_EditHeader::Apply
+ (const Handle(IFSelect_EditForm)& form,
+ const Handle(Standard_Transient)& /*ent*/,
+ const Handle(Interface_InterfaceModel)& model) const
+{
+ Handle(StepData_StepModel) modl =
+ Handle(StepData_StepModel)::DownCast(model);
+ if (modl.IsNull()) return Standard_False;
+
+ APIHeaderSection_MakeHeader mkh (modl);
+
+ if (form->IsModified(1)) mkh.SetName (form->EditedValue(1));
+ if (form->IsModified(2)) mkh.SetTimeStamp (form->EditedValue(2));
+ if (form->IsModified(3)) mkh.SetAuthorValue (1,form->EditedValue(3));
+ if (form->IsModified(4)) mkh.SetOrganizationValue (1,form->EditedValue(4));
+ if (form->IsModified(5)) mkh.SetPreprocessorVersion (form->EditedValue(5));
+ if (form->IsModified(6)) mkh.SetOriginatingSystem (form->EditedValue(6));
+ if (form->IsModified(7)) mkh.SetAuthorisation (form->EditedValue(7));
+
+ if (form->IsModified(8)) mkh.SetSchemaIdentifiersValue (1,form->EditedValue(8));
+
+ if (form->IsModified(9)) mkh.SetDescriptionValue (1,form->EditedValue(9));
+ if (form->IsModified(10)) mkh.SetImplementationLevel (form->EditedValue(10));
+
+ mkh.Apply( Handle(StepData_StepModel)::DownCast(model) );
+
+ return Standard_True;
+}
--- /dev/null
+// Created on: 1998-07-08
+// Created by: Christian CAILLET
+// Copyright (c) 1998-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 _XSDRAWSTEP_EditHeader_HeaderFile
+#define _XSDRAWSTEP_EditHeader_HeaderFile
+
+#include <Standard.hxx>
+#include <Standard_Type.hxx>
+
+#include <IFSelect_Editor.hxx>
+#include <Standard_Boolean.hxx>
+#include <Standard_Integer.hxx>
+class TCollection_AsciiString;
+class IFSelect_EditForm;
+class TCollection_HAsciiString;
+class Standard_Transient;
+class Interface_InterfaceModel;
+
+
+class XSDRAWSTEP_EditHeader;
+DEFINE_STANDARD_HANDLE(XSDRAWSTEP_EditHeader, IFSelect_Editor)
+
+
+class XSDRAWSTEP_EditHeader : public IFSelect_Editor
+{
+ public:
+
+ Standard_EXPORT XSDRAWSTEP_EditHeader();
+
+ Standard_EXPORT TCollection_AsciiString Label() const Standard_OVERRIDE;
+
+ Standard_EXPORT Standard_Boolean Recognize (const Handle(IFSelect_EditForm)& form) const Standard_OVERRIDE;
+
+ Standard_EXPORT Handle(TCollection_HAsciiString) StringValue (const Handle(IFSelect_EditForm)& form, const Standard_Integer num) const Standard_OVERRIDE;
+
+ Standard_EXPORT Standard_Boolean Apply (const Handle(IFSelect_EditForm)& form, const Handle(Standard_Transient)& ent, const Handle(Interface_InterfaceModel)& model) const Standard_OVERRIDE;
+
+ 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(XSDRAWSTEP_EditHeader,IFSelect_Editor)
+};
+
+#endif // _XSDRAWSTEP_EditHeader_HeaderFile