From: dpasukhi Date: Thu, 26 Jan 2023 19:38:02 +0000 (+0000) Subject: // removing useless classes X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=9a716b8100d22afbfb81e7e329185d55681728c2;p=occt.git // removing useless classes --- diff --git a/src/IFSelect/FILES b/src/IFSelect/FILES index ba23651fe8..f9ee2479b7 100755 --- a/src/IFSelect/FILES +++ b/src/IFSelect/FILES @@ -1,10 +1,5 @@ IFSelect.cxx IFSelect.hxx -IFSelect_Act.cxx -IFSelect_Act.hxx -IFSelect_ActFunc.hxx -IFSelect_Activator.cxx -IFSelect_Activator.hxx IFSelect_AppliedModifiers.cxx IFSelect_AppliedModifiers.hxx IFSelect_BasicDumper.cxx @@ -132,8 +127,6 @@ IFSelect_SessionDumper.cxx IFSelect_SessionDumper.hxx IFSelect_SessionFile.cxx IFSelect_SessionFile.hxx -IFSelect_SessionPilot.cxx -IFSelect_SessionPilot.hxx IFSelect_ShareOut.cxx IFSelect_ShareOut.hxx IFSelect_ShareOutResult.cxx diff --git a/src/IFSelect/IFSelect_Act.cxx b/src/IFSelect/IFSelect_Act.cxx deleted file mode 100644 index 43020e3119..0000000000 --- a/src/IFSelect/IFSelect_Act.cxx +++ /dev/null @@ -1,64 +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 - -IMPLEMENT_STANDARD_RTTIEXT(IFSelect_Act,IFSelect_Activator) - -static TCollection_AsciiString thedefgr, thedefil; - - - - IFSelect_Act::IFSelect_Act - (const Standard_CString name, const Standard_CString help, - const IFSelect_ActFunc func) - : thename (name) , thehelp (help) , thefunc (func) { } - - IFSelect_ReturnStatus IFSelect_Act::Do - (const Standard_Integer, const Handle(IFSelect_SessionPilot)& pilot) -{ - if (!thefunc) return IFSelect_RetVoid; - return thefunc (pilot); -} - - Standard_CString IFSelect_Act::Help (const Standard_Integer) const - { return thehelp.ToCString(); } - - - void IFSelect_Act::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 IFSelect_Act::AddFunc - (const Standard_CString name, const Standard_CString help, - const IFSelect_ActFunc func) -{ - Handle(IFSelect_Act) act = new IFSelect_Act (name,help,func); - if (thedefgr.Length() > 0) act->SetForGroup (thedefgr.ToCString()); - act->Add (1,name); -} - - void IFSelect_Act::AddFSet - (const Standard_CString name, const Standard_CString help, - const IFSelect_ActFunc func) -{ - Handle(IFSelect_Act) act = new IFSelect_Act (name,help,func); - if (thedefgr.Length() > 0) - act->SetForGroup (thedefgr.ToCString(),thedefil.ToCString()); - act->AddSet (1,name); -} diff --git a/src/IFSelect/IFSelect_Act.hxx b/src/IFSelect/IFSelect_Act.hxx deleted file mode 100644 index 861237d067..0000000000 --- a/src/IFSelect/IFSelect_Act.hxx +++ /dev/null @@ -1,107 +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 _IFSelect_Act_HeaderFile -#define _IFSelect_Act_HeaderFile - -#include - -#include -#include -#include -#include -class IFSelect_SessionPilot; - - -class IFSelect_Act; -DEFINE_STANDARD_HANDLE(IFSelect_Act, IFSelect_Activator) - -//! 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 -//! IFSelect_Act::AddFunc (name,help,myfunc); -//! for a normal function, or -//! IFSelect_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 IFSelect_Act : public IFSelect_Activator -{ - -public: - - - //! Creates an Act with a name, help and a function - //! mode (Add or AddSet) is given when recording - Standard_EXPORT IFSelect_Act(const Standard_CString name, const Standard_CString help, const IFSelect_ActFunc func); - - //! Execution of Command Line. remark that is senseless - //! because each Act brings one and only one function - Standard_EXPORT IFSelect_ReturnStatus Do (const Standard_Integer number, const Handle(IFSelect_SessionPilot)& pilot) Standard_OVERRIDE; - - //! Short Help for commands : returns the help given to create - Standard_EXPORT Standard_CString Help (const Standard_Integer number) const Standard_OVERRIDE; - - //! 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 IFSelect_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 IFSelect_ActFunc func); - - - - - DEFINE_STANDARD_RTTIEXT(IFSelect_Act,IFSelect_Activator) - -protected: - - - - -private: - - - TCollection_AsciiString thename; - TCollection_AsciiString thehelp; - IFSelect_ActFunc thefunc; - - -}; - - - - - - - -#endif // _IFSelect_Act_HeaderFile diff --git a/src/IFSelect/IFSelect_ActFunc.hxx b/src/IFSelect/IFSelect_ActFunc.hxx deleted file mode 100644 index 250e98d7ec..0000000000 --- a/src/IFSelect/IFSelect_ActFunc.hxx +++ /dev/null @@ -1,24 +0,0 @@ -// Created on: 2000-02-29 -// Created by: data exchange team -// Copyright (c) 2000-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 _IFSelect_ActFunc_HeaderFile -#define _IFSelect_ActFunc_HeaderFile - -#include -#include - -typedef IFSelect_ReturnStatus (*IFSelect_ActFunc) (const Handle(IFSelect_SessionPilot)&); - -#endif diff --git a/src/IFSelect/IFSelect_Activator.cxx b/src/IFSelect/IFSelect_Activator.cxx deleted file mode 100644 index 52f268a78d..0000000000 --- a/src/IFSelect/IFSelect_Activator.cxx +++ /dev/null @@ -1,118 +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 -#include -#include -#include -#include - -IMPLEMENT_STANDARD_RTTIEXT(IFSelect_Activator,Standard_Transient) - -static NCollection_DataMap thedico; -static TColStd_SequenceOfInteger thenums, themodes; -static TColStd_SequenceOfTransient theacts; - - - void IFSelect_Activator::Adding - (const Handle(IFSelect_Activator)& actor, - const Standard_Integer number, - const Standard_CString command, - const Standard_Integer mode) -{ -#ifdef OCCT_DEBUG - if (thedico.IsBound(command)) { - std::cout << "**** XSTEP commands, name conflict on " << command << " first defined remains ****" << std::endl; -// throw Standard_DomainError("IFSelect_Activator : Add"); - } -#endif - - thedico.Bind(command, thenums.Length() + 1); - - thenums.Append(number); - theacts.Append(actor); - themodes.Append(mode); -} - - void IFSelect_Activator::Add - (const Standard_Integer number, const Standard_CString command) const - { Adding (this,number,command,0); } - - void IFSelect_Activator::AddSet - (const Standard_Integer number, const Standard_CString command) const - { Adding (this,number,command,1); } - - void IFSelect_Activator::Remove (const Standard_CString command) - { thedico.UnBind(command); } - - Standard_Boolean IFSelect_Activator::Select - (const Standard_CString command, Standard_Integer& number, - Handle(IFSelect_Activator)& actor) -{ - Standard_Integer num; - if (!thedico.Find(command, num)) return Standard_False; - number = thenums(num); - actor = Handle(IFSelect_Activator)::DownCast(theacts(num)); - return Standard_True; -} - - Standard_Integer IFSelect_Activator::Mode - (const Standard_CString command) -{ - Standard_Integer num; - if (!thedico.Find(command, num)) return -1; - return themodes(num); -} - - - Handle(TColStd_HSequenceOfAsciiString) IFSelect_Activator::Commands - (const Standard_Integer mode, const Standard_CString command) -{ - Standard_Integer num; - NCollection_DataMap::Iterator iter(thedico); - Handle(TColStd_HSequenceOfAsciiString) list = - new TColStd_HSequenceOfAsciiString(); - for (; iter.More(); iter.Next()) { - if (!iter.Key().StartsWith(command)) - continue; - if (mode < 0) { - DeclareAndCast(IFSelect_Activator,acti,theacts(iter.Value())); - if (acti.IsNull()) continue; - if (command[0] == '\0' || !strcmp(command,acti->Group()) ) - list->Append(iter.Key()); - } else { - num = iter.Value(); - if (themodes(num) == mode) list->Append(iter.Key()); - } - } - return list; -} - - - IFSelect_Activator::IFSelect_Activator () - : thegroup ("XSTEP") { } - - void IFSelect_Activator::SetForGroup - (const Standard_CString group, const Standard_CString file) - { thegroup.Clear(); thegroup.AssignCat (group); - thefile.Clear(); thefile.AssignCat (file); } - - Standard_CString IFSelect_Activator::Group () const - { return thegroup.ToCString(); } - - Standard_CString IFSelect_Activator::File () const - { return thefile.ToCString(); } diff --git a/src/IFSelect/IFSelect_Activator.hxx b/src/IFSelect/IFSelect_Activator.hxx deleted file mode 100644 index 3110505589..0000000000 --- a/src/IFSelect/IFSelect_Activator.hxx +++ /dev/null @@ -1,141 +0,0 @@ -// Created on: 1993-07-27 -// Created by: Christian CAILLET -// Copyright (c) 1993-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 _IFSelect_Activator_HeaderFile -#define _IFSelect_Activator_HeaderFile - -#include - -#include -#include -#include -#include -class IFSelect_SessionPilot; - - -class IFSelect_Activator; -DEFINE_STANDARD_HANDLE(IFSelect_Activator, Standard_Transient) - -//! Defines the general frame for working with a SessionPilot. -//! Each Activator treats a set of Commands. Commands are given as -//! alphanumeric strings. They can be of two main forms : -//! - classic, to list, evaluate, enrich the session (by itself) : -//! no specific remark, its complete execution must be described -//! - creation of a new item : instead of creatinf it plus adding -//! it to the session (which is a classic way), it is possible -//! to create it and make it recorded by the SessionPilot : -//! then, the Pilot will add it to the session; this way allows -//! the Pilot to manage itself named items -//! -//! In order to make easier the use of Activator, this class -//! provides a simple way to Select an Actor for a Command : -//! each sub-class of SectionActor defines the command titles it -//! recognizes, plus attaches a Number, unique for this sub-class, -//! to each distinct command title. -//! -//! Each time an action is required, the corresponding Number -//! can then be given to help the selection of the action to do. -//! -//! The result of an Execution must indicate if it is worth to be -//! recorded or not : see method Do -class IFSelect_Activator : public Standard_Transient -{ - -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 - //! allows to distinguish various execution modes - //! 0: default mode; 1 : for xset - Standard_EXPORT static void Adding (const Handle(IFSelect_Activator)& actor, const Standard_Integer number, const Standard_CString command, const Standard_Integer mode); - - //! Allows a self-definition by an Activator of the Commands it - //! processes, call the class method Adding (mode 0) - Standard_EXPORT void Add (const Standard_Integer number, const Standard_CString command) const; - - //! Same as Add but specifies that this command is candidate for - //! xset (creation of items, xset : named items; mode 1) - Standard_EXPORT void AddSet (const Standard_Integer number, const Standard_CString command) const; - - //! Removes a Command, if it is recorded (else, does nothing) - Standard_EXPORT static void Remove (const Standard_CString command); - - //! Selects, for a Command given by its title, an actor with its - //! command number. Returns True if found, False else - Standard_EXPORT static Standard_Boolean Select (const Standard_CString command, Standard_Integer& number, Handle(IFSelect_Activator)& actor); - - //! Returns mode recorded for a command. -1 if not found - Standard_EXPORT static Standard_Integer Mode (const Standard_CString command); - - //! Returns, for a root of command title, the list of possible - //! commands. - //! : -1 (D) for all commands if is empty - //! -1 + command : about a Group , >= 0 see Adding - //! By default, it returns the whole list of known commands. - Standard_EXPORT static Handle(TColStd_HSequenceOfAsciiString) Commands (const Standard_Integer mode = -1, const Standard_CString command = ""); - - //! Tries to execute a Command Line. is the number of the - //! command for this Activator. It Must forecast to record the - //! result of the execution, for need of Undo-Redo - //! Must Returns : 0 for a void command (not to be recorded), - //! 1 if execution OK, -1 if command incorrect, -2 if error - //! on execution - Standard_EXPORT virtual IFSelect_ReturnStatus Do (const Standard_Integer number, const Handle(IFSelect_SessionPilot)& pilot) = 0; - - //! Sends a short help message for a given command identified by - //! it number for this Activator (must take one line max) - Standard_EXPORT virtual Standard_CString Help (const Standard_Integer number) const = 0; - - Standard_EXPORT Standard_CString Group() const; - - Standard_EXPORT Standard_CString File() const; - - //! Group and SetGroup define a "Group of commands" which - //! correspond to an Activator. Default is "XSTEP" - //! Also a file may be attached - Standard_EXPORT void SetForGroup (const Standard_CString group, const Standard_CString file = ""); - - - - - DEFINE_STANDARD_RTTIEXT(IFSelect_Activator,Standard_Transient) - -protected: - - - //! Sets the default values - Standard_EXPORT IFSelect_Activator(); - - - -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 deleted file mode 100644 index acf782e10e..0000000000 --- a/src/IFSelect/IFSelect_SessionPilot.cxx +++ /dev/null @@ -1,543 +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 -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -IMPLEMENT_STANDARD_RTTIEXT(IFSelect_SessionPilot,IFSelect_Activator) - -#define MAXWORDS 200 -#define MAXCARS 1000 - -static int THE_IFSelect_SessionPilot_initactor = 0; -static TCollection_AsciiString nulword; - -//#define DEBUG_TRACE - -// Nb Maxi de words : cf thewords et method SetCommandLine - -IFSelect_SessionPilot::IFSelect_SessionPilot (const Standard_CString prompt) -: theprompt (prompt), - thewords (0, MAXWORDS - 1), - thewordeb (0, MAXWORDS - 1) -{ - if (theprompt.Length() == 0) - { - theprompt.AssignCat ("Test-XSTEP>"); - } - therecord = Standard_False; - thenbwords = 0; - if (THE_IFSelect_SessionPilot_initactor) - { - return; - } - - THE_IFSelect_SessionPilot_initactor = 1; - Add (1,"x"); - Add (1,"exit"); - Add (2,"?"); - Add (2,"xhelp"); - Add (3,"xcommand"); - Add (4,"xsource"); - Add (5,"xstep"); - Add (6,"xnew"); -} - - - Handle(IFSelect_WorkSession) IFSelect_SessionPilot::Session () const - { return thesession; } - - Handle(IFSelect_WorkLibrary) IFSelect_SessionPilot::Library () const - { return thesession->WorkLibrary(); } - - Standard_Boolean IFSelect_SessionPilot::RecordMode () const - { return therecord; } - - void IFSelect_SessionPilot::SetSession - (const Handle(IFSelect_WorkSession)& WS) - { thesession = WS; } - - void IFSelect_SessionPilot::SetLibrary - (const Handle(IFSelect_WorkLibrary)& WL) - { if (!thesession.IsNull()) thesession->SetLibrary(WL); } - - void IFSelect_SessionPilot::SetRecordMode (const Standard_Boolean mode) - { therecord = mode; } - - - void IFSelect_SessionPilot::SetCommandLine - (const TCollection_AsciiString& command) -{ - Standard_Integer lc = command.Length(); - if (lc > 200) std::cout<<" Commande TRES LONGUE : "<= MAXWORDS) { unarg[nc] = val; nc ++; continue; } - unarg[nc] = '\0'; - thewords(thenbwords).Clear(); thewords(thenbwords).AssignCat(unarg); -#ifdef DEBUG_TRACE - std::cout<<"thewords("< MAXCARS) { std::cout<<"Arg."< "< 0) { - unarg[nc] = '\0'; thewords(thenbwords).Clear(); - thewords(thenbwords).AssignCat(unarg); -#ifdef DEBUG_TRACE - std::cout<<"thewords("< MAXWORDS) thenbwords = MAXWORDS; - Standard_Integer nb = thewords.Upper(); - for (i = 0; i <= nb; i ++) thewords(i).Clear(); - switch (thenbwords) { - case 20 : thewords(19).AssignCat(m9); - case 19 : thewords(18).AssignCat(m8); - case 18 : thewords(17).AssignCat(m7); - case 17 : thewords(16).AssignCat(m6); - case 16 : thewords(15).AssignCat(m5); - case 15 : thewords(14).AssignCat(m4); - case 14 : thewords(13).AssignCat(m3); - case 13 : thewords(12).AssignCat(m2); - case 12 : thewords(11).AssignCat(m1); - case 11 : thewords(10).AssignCat(m0); - case 10 : thewords(9).AssignCat(l9); - case 9 : thewords(8).AssignCat(l8); - case 8 : thewords(7).AssignCat(l7); - case 7 : thewords(6).AssignCat(l6); - case 6 : thewords(5).AssignCat(l5); - case 5 : thewords(4).AssignCat(l4); - case 4 : thewords(3).AssignCat(l3); - case 3 : thewords(2).AssignCat(l2); - case 2 : thewords(1).AssignCat(l1); - case 1 : thewords(0).AssignCat(l0); - default : break; - } -*/ - thenumrec = 0; - theobjrec.Nullify(); -} - - const TCollection_AsciiString& IFSelect_SessionPilot::CommandLine () const - { return thecommand; } - - Standard_CString IFSelect_SessionPilot::CommandPart - (const Standard_Integer numarg) const -{ - if (numarg <= 0) return thecommand.ToCString(); - if (numarg >= thenbwords) return ""; - return &(thecommand.ToCString())[thewordeb(numarg)-1]; -} - - Standard_Integer IFSelect_SessionPilot::NbWords () const - { return thenbwords; } - - const TCollection_AsciiString& IFSelect_SessionPilot::Word - (const Standard_Integer num) const - { if (num < thenbwords) return thewords(num); return nulword; } - - Standard_CString IFSelect_SessionPilot::Arg - (const Standard_Integer num) const - { return Word(num).ToCString(); } - - Standard_Boolean IFSelect_SessionPilot::RemoveWord - (const Standard_Integer num) -{ - if (num < 0 || num > thenbwords) return Standard_False; - Standard_Integer i; // svv Jan11 2000 : porting on DEC - for (i = num; i < thenbwords; i ++) { - thewords(i).Clear(); - thewords(i).AssignCat(thewords(i+1).ToCString()); - } - thewords(thenbwords).Clear(); - thenbwords --; -// Et refaire thecommand. Si num = 0, on supprime le debut (facile) - if (num == 0) { - thecommand.Remove(1,thewordeb(1)); - } else { -// Sinon, reconstituer, a partir des words - thecommand.Clear(); - for (i = 0; i < thenbwords; i ++) { - if (i > 0) thecommand.AssignCat(" "); - thecommand.AssignCat(thewords(i)); - } - } - - return Standard_True; -} - - Standard_Integer IFSelect_SessionPilot::NbCommands () const - { return thecomlist.Length(); } - - const TCollection_AsciiString& IFSelect_SessionPilot::Command - (const Standard_Integer num) const - { return thecomlist(num); } - - - IFSelect_ReturnStatus IFSelect_SessionPilot::RecordItem - (const Handle(Standard_Transient)& item) -{ - theobjrec = item; - return (item.IsNull() ? IFSelect_RetFail : IFSelect_RetDone); -} - - Handle(Standard_Transient) IFSelect_SessionPilot::RecordedItem () const - { return theobjrec; } - - void IFSelect_SessionPilot::Clear () - { thecomlist.Clear(); } - - -// ####################################################################### -// ######## CONTROLE D EXECUTION - - - IFSelect_ReturnStatus IFSelect_SessionPilot::ReadScript - (const Standard_CString file) -{ - FILE* fic; int lefic = 0; - if (file != NULL && file[0] != '\0') { - fic = OSD_OpenFile (file,"r"); - if (fic) lefic = 1; - else { std::cout<<" ... Script File "<Do(num,this); -// Prise en compte des commandes a resultat -// Ici, resultat non nomme; Resultat nomme par commande x (plus loin) - if (!theobjrec.IsNull()) { - thesession->RemoveItem(theobjrec); //// depannage ? - Standard_Integer addws = thesession->AddItem(theobjrec); - if (addws == 0) { std::cout<<"Could not add item to session, sorry"< 0) thewords(0) = alias; - return Perform(); -} - - IFSelect_ReturnStatus IFSelect_SessionPilot::Execute - (const TCollection_AsciiString& command) -{ - SetCommandLine(command); - return Perform(); -} - - IFSelect_ReturnStatus IFSelect_SessionPilot::ExecuteCounter - (const Handle(IFSelect_SignCounter)& counter, const Standard_Integer numword, - const IFSelect_PrintCount mode) -{ - if (counter.IsNull()) return IFSelect_RetError; - counter->Clear(); - if (NbWords() <= numword) counter->AddModel (thesession->Model()); - else { -// on demande un givelist - Handle(TColStd_HSequenceOfTransient) list = thesession->GiveList (CommandPart(numword)); - if (list.IsNull()) { - std::cout<<"Nothing selected from : "<AddWithGraph (list,thesession->Graph()); - } - Message_Messenger::StreamBuffer sout = Message::SendInfo(); - counter->PrintList (sout, thesession->Model(), mode); - return IFSelect_RetVoid; -} - - Standard_Integer IFSelect_SessionPilot::Number - (const Standard_CString val) const -{ - Standard_Integer num = thesession->NumberFromLabel (val); - if (num < 0) std::cout<<" Label:"<"<<-num<<" ent.s, refus"<Length(); - std::cout << " -- Liste des Commands Disponibles --"<Value(i); - Standard_Integer loncom = uncom.Length(); - nbcom ++; - if (nbcom > MAXCOMPERLINE) { std::cout< 0) std::cout< liste la ou les commande debutant par " - <<" avec un help sur chacune"<Length(); - for (Standard_Integer i = 1; i <= nb; i ++) { - Handle(IFSelect_Activator) actor; Standard_Integer num; - if (IFSelect_Activator::Select - (list->Value(i).ToCString(),num,actor)) { - if (IFSelect_Activator::Mode (list->Value(i).ToCString()) == 1) - std::cout<<"[xsnew name] "; - std::cout << list->Value(i) << " : " << actor->Help(num) << std::endl; - } - } - if (nb == 0 && thenbwords > 1) std::cout<<" Command "<CommandLine()<Word(i) <Clear(); break; // **** command clear - case 'f' : { - if (argc < 3) { std::cout<<"Donner nom de fichier"<NbCommands(); - if (nb == 0) { std::cout<<"Aucune commande enregistree"<Command(i)<RecordMode()) std::cout<<" -- Record Mode Actif"<NbCommands(); - std::cout << "Nb Commandes enregistrees : " << nb << " :"<Command(i)<RecordMode(); - if (mode) std::cout << " -- Record Mode a present Inactif" <SetRecordMode(!mode); - break; - } - default : std::cout << "Option de controle de commande non comprise"<ReadScript - (TCollection_AsciiString(session->Word(1)).ToCString()); -// On recopie la string parce que Word(1) change tout le temps ! - } - - case 5 : { // **** XSTEP - if (argc < 2) { - std::cout<<"xstep : prefixe neutre pour toute commande xstep-draw"<NameIdent(thewords(0).ToCString()) > 0) -////// { std::cout<<"Command with name:"<Do(num,this); -// Prise en compte des commandes a resultat - if (!theobjrec.IsNull()) { - thesession->RemoveItem(theobjrec); //// depannage ? - Standard_Integer addws = - thesession->AddNamedItem(name.ToCString(),theobjrec); - theobjrec.Nullify(); - if (addws == 0) { std::cout<<"Could not add named item:"< : commandes debutant par "; - case 3 : return "controle de commande. command tout court pour help complet"; - case 4 : return "lit les commandes depuis un fichier"; - case 5 : return "prefixe neutre pour xstep-draw"; - case 6 : return "creation item : donner nom_item puis commande args"; - default : return ""; - } -} diff --git a/src/IFSelect/IFSelect_SessionPilot.hxx b/src/IFSelect/IFSelect_SessionPilot.hxx deleted file mode 100644 index 34d4849a83..0000000000 --- a/src/IFSelect/IFSelect_SessionPilot.hxx +++ /dev/null @@ -1,221 +0,0 @@ -// Created on: 1993-07-27 -// Created by: Christian CAILLET -// Copyright (c) 1993-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 _IFSelect_SessionPilot_HeaderFile -#define _IFSelect_SessionPilot_HeaderFile - -#include - -#include -#include -#include -#include -#include -#include -class IFSelect_WorkSession; -class IFSelect_WorkLibrary; -class IFSelect_SignCounter; - -class IFSelect_SessionPilot; -DEFINE_STANDARD_HANDLE(IFSelect_SessionPilot, IFSelect_Activator) - -//! A SessionPilot is intended to make easier the use of a WorkSession. -//! It receives commands, under alphanumeric form, -//! then calls a library of Activators to interpret and run them. -//! -//! Then, WorkSession just records data required to work : -//! Rules for Selection, Dispatch ... ; File Data (InterfaceModel -//! and results of Evaluations and Transfer as required). -//! SessionPilot records and works with alphanumeric commands and -//! their results (under a very simple form). It calls a list of -//! Activators to perform the actions. -//! -//! A Command can have several forms : -//! - classic execution, to list, evaluate, or enrich the session -//! - command which creates a new item (a Selection for instance) -//! such a command should not add it to the session, but make it -//! recorded by the Pilot (method RecordItem). The Pilot will -//! add the item in the session, with no name -//! -> such a command may be called : -//! - directly, it will add an item with no name -//! - by command xset, in the following form : -//! xset name command ... calls the command and adds the item -//! to the session under the specified name (if not yet known) -//! -//! Thus, to a specific Norm or way of working, only Activators -//! change. A specific Initialisation can be done by starting -//! with a specific set of commands. -//! -//! In addition, SessionPilot is a sub-type of Activator, to -//! recognize some built-in commands : exit/x, help/?, control of -//! command line, and commands xstep xset ... See method Do -//! -//! At least, empty lines and comment lines (beginning by '#') -//! are skipped (comment lines are display if read from file) -class IFSelect_SessionPilot : public IFSelect_Activator -{ - -public: - - //! Creates an empty SessionPilot, with a prompt which will be - //! displayed on querying commands. If not precised (""), this - //! prompt is set to "Test-XSTEP>" - Standard_EXPORT IFSelect_SessionPilot(const Standard_CString prompt = ""); - - //! Returns the WorkSession which is worked on - Standard_EXPORT Handle(IFSelect_WorkSession) Session() const; - - //! Returns the WorKlibrary (Null if not set). WorkLibrary is used - //! to Read and Write Files, according to the Norm - Standard_EXPORT Handle(IFSelect_WorkLibrary) Library() const; - - //! Returns the Record Mode for Commands. Default is False. - Standard_EXPORT Standard_Boolean RecordMode() const; - - //! Sets a WorkSession to be worked on - Standard_EXPORT void SetSession (const Handle(IFSelect_WorkSession)& WS); - - //! Sets a WorkLibrary - Standard_EXPORT void SetLibrary (const Handle(IFSelect_WorkLibrary)& WL); - - //! Changes the RecordMode. - Standard_EXPORT void SetRecordMode (const Standard_Boolean mode); - - //! Sets the value of the Command Line to be interpreted - //! Also prepares the interpretation (splitting by blanks) - Standard_EXPORT void SetCommandLine (const TCollection_AsciiString& command); - - //! Returns the Command Line to be interpreted - Standard_EXPORT const TCollection_AsciiString& CommandLine() const; - - //! Returns the part of the command line which begins at argument - //! between 0 and NbWords-1 (by default, all the line) - //! Empty string if out of range - Standard_EXPORT Standard_CString CommandPart (const Standard_Integer numarg = 0) const; - - //! Returns the count of words of the Command Line, separated by - //! blanks : 0 if empty, one if a command without args, else it - //! gives the count of args minus one. - //! Warning : limited to 10 (command title + 9 args) - Standard_EXPORT Standard_Integer NbWords() const; - - //! Returns a word given its rank in the Command Line. Begins at 0 - //! which is the Command Title, 1 is the 1st arg., etc... - Standard_EXPORT const TCollection_AsciiString& Word (const Standard_Integer num) const; - - //! Returns a word given its rank, as a CString. - //! As for Word, begins at 0 (the command name), etc... - Standard_EXPORT Standard_CString Arg (const Standard_Integer num) const; - - //! Removes a word given its rank. Returns True if Done, False if - //! is out of range - Standard_EXPORT Standard_Boolean RemoveWord (const Standard_Integer num); - - //! Returns the count of recorded Commands - Standard_EXPORT Standard_Integer NbCommands() const; - - //! Returns a recorded Command, given its rank (from 1) - Standard_EXPORT const TCollection_AsciiString& Command (const Standard_Integer num) const; - - //! Allows to associate a Transient Value with the last execution - //! as a partial result - //! Returns RetDone if item is not Null, RetFail if item is Null - //! Remark : it is nullified for each Perform - Standard_EXPORT IFSelect_ReturnStatus RecordItem (const Handle(Standard_Transient)& item); - - //! Returns the Transient Object which was recorded with the - //! current Line Command. If none was, returns a Null Handle - Standard_EXPORT Handle(Standard_Transient) RecordedItem() const; - - //! Clears the recorded information (commands, objects) - Standard_EXPORT void Clear(); - - //! Reads commands from a Script File, named . By default - //! (file = ""), reads from standard input with a prompt - //! Else (reading from a file), the read commands are displayed - //! onto standard output. Allows nested reads. Reading is stopped - //! either by command x or exit, or by reaching end of file - //! Return Value follows the rules of Do : RetEnd for normal end, - //! RetFail if script could not be opened - Standard_EXPORT IFSelect_ReturnStatus ReadScript (const Standard_CString file = ""); - - //! Executes the Command, itself (for built-in commands, which - //! have priority) or by using the list of Activators. - //! The value returned is : RetVoid if nothing done (void command) - //! RetDone if execution OK, RetEnd if END OF SESSION, RetError if - //! command unknown or incorrect, RetFail if error on execution - //! If execution is OK and RecordMode is set, this Command Line is - //! 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); - - //! Executes a Counter in a general way - //! If is greater than count of command words, it counts - //! all the model. Else it considers the word as the - //! identifier of a Selection - //! gives the mode of printing results, default is - //! CountByItem - Standard_EXPORT IFSelect_ReturnStatus ExecuteCounter (const Handle(IFSelect_SignCounter)& counter, const Standard_Integer numword, const IFSelect_PrintCount mode = IFSelect_CountByItem); - - //! Interprets a string value as an entity number : - //! if it gives an integer, returns its value - //! else, considers it as ENtityLabel (preferably case sensitive) - //! in case of failure, returns 0 - Standard_EXPORT Standard_Integer Number (const Standard_CString val) const; - - //! Processes specific commands, which are : - //! x or exit for end of session - //! ? or help for help messages - //! xcommand to control command lines (Record Mode, List, Clear, - //! File Output ...) - //! xsource to execute a command file (no nesting allowed), - //! in case of error, source is stopped and keyword recovers - //! xstep is a simple prefix (useful in a wider environment, to - //! avoid conflicts on command names) - //! xset control commands which create items with names - Standard_EXPORT IFSelect_ReturnStatus Do (const Standard_Integer number, const Handle(IFSelect_SessionPilot)& session) Standard_OVERRIDE; - - //! Help for specific commands (apart from general command help) - Standard_EXPORT Standard_CString Help (const Standard_Integer number) const Standard_OVERRIDE; - - DEFINE_STANDARD_RTTIEXT(IFSelect_SessionPilot,IFSelect_Activator) - -private: - - Handle(IFSelect_WorkSession) thesession; - TCollection_AsciiString theprompt; - TCollection_AsciiString thecommand; - Standard_Integer thenbwords; - TColStd_Array1OfAsciiString thewords; - TColStd_Array1OfInteger thewordeb; - Standard_Boolean therecord; - Standard_Integer thenumrec; - Handle(Standard_Transient) theobjrec; - TColStd_SequenceOfAsciiString thecomlist; - -}; - -#endif // _IFSelect_SessionPilot_HeaderFile diff --git a/src/IGESSelect/FILES b/src/IGESSelect/FILES index 71be221396..98cb51f34c 100644 --- a/src/IGESSelect/FILES +++ b/src/IGESSelect/FILES @@ -1,7 +1,3 @@ -IGESSelect.cxx -IGESSelect.hxx -IGESSelect_Activator.cxx -IGESSelect_Activator.hxx IGESSelect_AddFileComment.cxx IGESSelect_AddFileComment.hxx IGESSelect_AddGroup.cxx diff --git a/src/IGESSelect/IGESSelect.cxx b/src/IGESSelect/IGESSelect.cxx deleted file mode 100644 index ae89ab9db5..0000000000 --- a/src/IGESSelect/IGESSelect.cxx +++ /dev/null @@ -1,52 +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 -#include -#include -#include -#include -#include -#include - -void IGESSelect::Run () -{ - Handle(IFSelect_SessionPilot) pilot = new IFSelect_SessionPilot("XSTEP-IGES>"); - Handle(IGESSelect_Activator) igesact = new IGESSelect_Activator; - pilot->SetSession (new IFSelect_WorkSession ( )); - pilot->SetLibrary (new IGESSelect_WorkLibrary); - - pilot->ReadScript(); -} - - -Standard_Integer IGESSelect::WhatIges - (const Handle(IGESData_IGESEntity)& ent, const Interface_Graph& G, - Handle(IGESData_IGESEntity)& /* sup */, Standard_Integer& /* index */) -{ - Handle(IGESData_IGESEntity) igesent = ent; - if (igesent.IsNull()) return Standard_False; -// Standard_Integer igt = igesent->TypeNumber(); - DeclareAndCast(IGESData_IGESModel,model,G.Model()); - if (igesent.IsNull() || model.IsNull()) return 0; - -// Plane : de View ? de SingleParent ? sinon cf TrimmedSurface & cie - - - - return 0; -} diff --git a/src/IGESSelect/IGESSelect.hxx b/src/IGESSelect/IGESSelect.hxx deleted file mode 100644 index 4f042ad496..0000000000 --- a/src/IGESSelect/IGESSelect.hxx +++ /dev/null @@ -1,56 +0,0 @@ -// Created on: 1994-05-31 -// Created by: Christian CAILLET -// Copyright (c) 1994-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 _IGESSelect_HeaderFile -#define _IGESSelect_HeaderFile - -#include -#include -#include - -#include -class IGESData_IGESEntity; -class Interface_Graph; - - -//! This package defines the library of the most used tools for -//! IGES Files : Selections & Modifiers specific to the IGES norm, -//! and the most needed converters -class IGESSelect -{ -public: - - DEFINE_STANDARD_ALLOC - - - //! Simply gives a prompt for a conversational action on standard - //! input/output. Returns the status of a - Standard_EXPORT static void Run(); - - //! Gives a quick analysis of an IGES Entity in the context of a - //! model (i.e. a File) described by a Graph. - //! Returned values are : - //! : the most meaningful super entity, if any (else Null) - //! : meaningful index relating to super entity, if any - //! : a status which helps exploitation of , by - //! giving a case - //! (normally, types of and should suffice to - //! known the case) - Standard_EXPORT static Standard_Integer WhatIges (const Handle(IGESData_IGESEntity)& ent, const Interface_Graph& G, Handle(IGESData_IGESEntity)& sup, Standard_Integer& index); - -}; - -#endif // _IGESSelect_HeaderFile diff --git a/src/IGESSelect/IGESSelect_Activator.cxx b/src/IGESSelect/IGESSelect_Activator.cxx deleted file mode 100644 index 48a60c95a7..0000000000 --- a/src/IGESSelect/IGESSelect_Activator.cxx +++ /dev/null @@ -1,436 +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 -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -IMPLEMENT_STANDARD_RTTIEXT(IGESSelect_Activator,IFSelect_Activator) - -static int THE_IGESSelect_Activator_initActivator = 0; - -IGESSelect_Activator::IGESSelect_Activator() -{ - if (THE_IGESSelect_Activator_initActivator) - { - return; - } - THE_IGESSelect_Activator_initActivator = 1; -// Add ( 0,"load"); -// Add ( 0,"loadiges"); // homonyme - SetForGroup ("XSTEP-IGES"); - - Add ( 5,"listviews"); - Add ( 6,"listdrawings"); - Add ( 7,"listsviews"); - - AddSet (10,"igestype"); - AddSet (11,"bypassgroup"); - AddSet (12,"igesname"); - AddSet (13,"igesvisible"); - AddSet (14,"igeslevel"); - - AddSet (21,"igesfromdrawing"); - AddSet (22,"igesfromview"); - AddSet (23,"igesdrawingfrom"); - AddSet (24,"igesviewfrom"); - - AddSet (31,"igesdispdrawing"); - AddSet (32,"igesdispview"); - - AddSet (40,"floatformat"); - AddSet (41,"setglobalparam"); - AddSet (42,"setversion5"); - AddSet (43,"updatecreationdate"); - AddSet (44,"updatelastchange"); - AddSet (45,"updatefilename"); - - AddSet (50,"autocorrect"); - AddSet (51,"computestatus"); - AddSet (52,"rebuildgroups"); - AddSet (53,"rebuilddrawings"); - AddSet (54,"addgroup"); - - AddSet (60,"splinetobspline"); - - Add (70,"setuseflag"); -} - - - IFSelect_ReturnStatus IGESSelect_Activator::Do - (const Standard_Integer number, - const Handle(IFSelect_SessionPilot)& pilot) -{ - Standard_Integer argc = pilot->NbWords(); - const Standard_CString arg1 = pilot->Word(1).ToCString(); - const Standard_CString arg2 = pilot->Word(2).ToCString(); -// const Standard_CString arg3 = pilot->Word(3).ToCString(); - Handle(IFSelect_WorkSession) WS = pilot->Session(); - - switch (number) { - - case 5 : // **** ListViews (sans tri complementaire) - case 6 : // **** ListDrawings - case 7 : { // **** ListS(ingle)Views - Standard_Integer listmode = 0; - if (argc == 2 && arg1[0] == '?') argc = -1; - if (argc < 2) { - std::cout<<"Ajouter un argument pour avoir :\n"<< - " l : liste resumee"<< - " c : liste complete par item (mais pas pour remaining)\n"<< - " r : idem + liste complete remaining\n"<< - " sur tout le modele. Ajouter nom selection pour lister sur une partie"<= 0 ? IFSelect_RetError : IFSelect_RetVoid); - } - if (arg1[0] == 'l') { - listmode = 0; std::cout<<"Liste resumee"; - } - else if (arg1[0] == 'c') { - listmode = 1; std::cout<<"Liste complete par item (pas pour Remaining)"<SetModel(GetCasted(IGESData_IGESModel,WS->Model())); - if (argc == 2) vs->AddModel(WS->Model()); - else { -// on demande une selection - DeclareAndCast(IFSelect_Selection,sel,WS->NamedItem(arg2)); - if (sel.IsNull()) { - std::cout<<"Pas une selection : "<AddList (WS->SelectionResult(sel)); - } - Standard_Boolean listdr = (number > 5); - if (number == 6) vs->SortDrawings(WS->Graph()); - if (number == 7) vs->SortSingleViews(Standard_True); - Handle(IFSelect_PacketList) sets = vs->Sets(listdr); - Standard_Integer nb = vs->NbSets(listdr); - std::cout<<" -- ViewSorter for"; - if (number == 5) std::cout<<" Views & Drawings"; - if (number == 6) std::cout<<" Drawings only (complete)"; - if (number == 7) std::cout<<" Single Views & Drawing Frames"; - std::cout<<", on "<NbEntities()<<" ent.s, give "<Model()->Number(vs->SetItem(i,listdr))<<" List:"; - std::cout<NbEntities(i)<<" ent.s:"<Entities(i); - WS->ListEntities (iter, 0, std::cout); - } - - std::cout <<" -- Remaining Entities (not yet sorted) :" - <NbDuplicated(0,Standard_False)<Duplicated(0,Standard_False); - WS->ListEntities (iter, 0, std::cout); - return IFSelect_RetVoid; - } - - case 10 : { // **** IGESType (form Type/Form) - if (argc < 2) { - std::cout<<"Donner le n0 de type desire, + en option la forme\n" - <<" Si pas de forme, prend toutes les formes du type demande"< 2)); - return pilot->RecordItem (sel); - } - - case 11 : { // **** IGES BypassGroup - return pilot->RecordItem (new IGESSelect_SelectBypassGroup); - } - - case 12 : { // **** IGES Name - if (argc < 2) { - std::cout<<"Donner un Nom de TextParam pour IGESName"<SetName - (GetCasted(TCollection_HAsciiString,WS->NamedItem(arg1)) ); - return pilot->RecordItem (sel); - } - - case 13 : { // **** IGES VisibleStatus - return pilot->RecordItem (new IGESSelect_SelectVisibleStatus); - } - - case 14 : { // **** IGES LevelNumber - if (argc < 2) { - std::cout<<"Donner nom IntParam pour Level"<NamedItem(arg1)); - if (lev.IsNull()) { - std::cout<SetLevelNumber(lev); - return pilot->RecordItem (sel); - } - - case 21 : { // **** IGES FromDrawing - return pilot->RecordItem (new IGESSelect_SelectFromDrawing); - } - case 22 : { // **** IGES FromSingleView - return pilot->RecordItem (new IGESSelect_SelectFromSingleView); - } - case 23 : { // **** IGES FromDrawing - return pilot->RecordItem (new IGESSelect_SelectDrawingFrom); - } - case 24 : { // **** IGES FromDrawing - return pilot->RecordItem (new IGESSelect_SelectSingleViewFrom); - } - - case 31 : { // **** IGES DispatchPerDrawing - return pilot->RecordItem (new IGESSelect_DispPerDrawing); - } - case 32 : { // **** IGES DispatchPerSingleView - return pilot->RecordItem (new IGESSelect_DispPerSingleView); - } - - case 40 : { // **** FloatFormat - char prem = ' '; - if (argc < 2) prem = '?'; - else if (argc == 5) { - std::cout<<"floatformat tout court donne les formes admises"<= 48 && prem <= 57) digits = atoi(arg1); - else { - std::cout<<"floatformat digits, digits=nb de chiffres signifiants, ou\n" - << "floatformat NZ %mainformat [%rangeformat [Rmin Rmax]]\n" - <<" NZ : N ou n pour Non-zero-suppress, Z ou z pour zero-suppress\n" - <<" %mainformat : format principal type printf, ex,: %E\n" - <<" + optionnel : format secondaire (flottants autour de 1.) :\n" - <<" %rangeformat Rmin Rmax : format type printf entre Rmin et Rmax\n" - <<" %rangeformat tout seul : format type printf entre 0.1 et 1000.\n" - < 4) { - Rmin = Atof(pilot->Word(4).ToCString()); - Rmax = Atof(pilot->Word(5).ToCString()); - if (Rmin <= 0 || Rmax <= 0) { std::cout<<"intervalle : donner reels > 0"<SetDefault(digits); - else { - fm->SetZeroSuppress(zerosup); - fm->SetFormat (arg2); - if (argc == 4) fm->SetFormatForRange(pilot->Word(3).ToCString()); - else if (argc >= 6) fm->SetFormatForRange(pilot->Word(3).ToCString(),Rmin,Rmax); - else fm->SetFormatForRange(""); - } - return pilot->RecordItem(fm); - } - - case 41 : { // **** SetGlobalParameter - if (argc < 3) { - std::cout<<"Donner entier=n0 param a changer + nom TextParam pour la valeur"<NamedItem(arg2)); - if (val.IsNull()) { - std::cout<<"Pas un nom de TextParam:"<SetValue(val); - return pilot->RecordItem (mod); - } - - case 42 : { // **** Set IGES Version 5.1 - return pilot->RecordItem (new IGESSelect_SetVersion5); - } - case 43 : { // **** Update Creation Date - return pilot->RecordItem (new IGESSelect_UpdateCreationDate); - } - case 44 : { // **** Update Last Change Date - return pilot->RecordItem (new IGESSelect_UpdateLastChange); - } - case 45 : { // **** Update File Name - return pilot->RecordItem (new IGESSelect_UpdateFileName); - } - - case 50 : { // **** AutoCorrect - return pilot->RecordItem (new IGESSelect_AutoCorrect); - } - case 51 : { // **** Compute Status - return pilot->RecordItem (new IGESSelect_ComputeStatus); - } - case 52 : { // **** Rebuild Groups - return pilot->RecordItem (new IGESSelect_RebuildGroups); - } - case 53 : { // **** Rebuild Drawings - return pilot->RecordItem (new IGESSelect_RebuildDrawings); - } - case 54 : { // **** Add Group - return pilot->RecordItem (new IGESSelect_AddGroup); - } - - case 60 : { // **** Spline To BSpline - if (argc < 2) { - std::cout<<"Pour SplineToBSpline, donner mode :\n"<< - " n pour normal, t pour tryC2"<RecordItem(conv); - } - - case 70 : { // **** SetUseFlag - Standard_Integer usefl = atoi (arg1); - if (argc > 2) { - Handle(TColStd_HSequenceOfTransient) list = WS->GiveList(pilot->CommandPart(2)); - Standard_Integer i, nb = list->Length(); - for (i = 1; i <= nb; i ++) { - DeclareAndCast(IGESData_IGESEntity,ent,list->Value(i)); - if (!ent.IsNull()) ent->InitStatus - (ent->BlankStatus(),ent->SubordinateStatus(),usefl,ent->HierarchyStatus()); - } - } - else { - Standard_Integer i, nb = WS->NbStartingEntities(); - for (i = 1; i <= nb; i ++) { - DeclareAndCast(IGESData_IGESEntity,ent,WS->StartingEntity(i)); - if (!ent.IsNull()) ent->InitStatus - (ent->BlankStatus(),ent->SubordinateStatus(),usefl,ent->HierarchyStatus()); - } - } - return IFSelect_RetDone; - } - - default : break; - } - return IFSelect_RetVoid; - -} - -Standard_CString IGESSelect_Activator::Help - (const Standard_Integer number) const -{ - switch (number) { - case 5 : return "Liste Vues (tous types). Nom selection sinon tout modele"; - case 6 : return "Liste Drawings. Nom selection sinon tout modele"; - case 7 : return "Liste Vues SIMPLES. Nom selection sinon tout modele"; - - case 10 : return "type:integer [form:integer] : cree Select IGESType"; - case 11 : return "cree Select Bypass Group"; - case 12 : return "name:TextParam : cree Select Name (Name/Label)"; - case 13 : return "cree Select Visible Status (Blank Status = 0 sinon 1)"; - case 14 : return "level:IntParam : cree Select LevelNumber"; - - case 21 : return "cree Select From Drawing"; - case 22 : return "cree Select From Single View"; - case 23 : return "cree Select Drawing From, drawing(s) pour une liste d entites"; - case 24 : return "cree Select View From, views pour une liste d entites"; - - case 31 : return "cree Dispatch Per Drawing"; - case 32 : return "cree Dispatch Per SingleView"; - - case 40 : return "options... : cree FloatFormat ... floatformat tout court->help"; - case 41 : return "numpar:integer value:TextParam : cree Set Global Param"; - case 42 : return "cree Set Version -> 5.1"; - case 43 : return "cree Update Creation Date"; - case 44 : return "cree Update Last Change Date"; - case 45 : return "cree Update File Name (dynamic)"; - - case 50 : return "cree AutoCorrect"; - case 51 : return "cree Compute Status (in D.E.)"; - case 52 : return "cree Rebuild Groups"; - case 53 : return "cree Rebuild Drawings"; - case 54 : return "cree AddGroup"; - - case 60 : return "cree SplineToBSpline Conversion"; - - case 70 : return "useflag givelist : Set Use Flag to value"; - - default : break; - } - return "??"; -} diff --git a/src/IGESSelect/IGESSelect_Activator.hxx b/src/IGESSelect/IGESSelect_Activator.hxx deleted file mode 100644 index 45a5c82ce7..0000000000 --- a/src/IGESSelect/IGESSelect_Activator.hxx +++ /dev/null @@ -1,71 +0,0 @@ -// Created on: 1994-06-03 -// Created by: Christian CAILLET -// Copyright (c) 1994-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 _IGESSelect_Activator_HeaderFile -#define _IGESSelect_Activator_HeaderFile - -#include -#include - -#include -#include -#include -class IFSelect_SessionPilot; - - -class IGESSelect_Activator; -DEFINE_STANDARD_HANDLE(IGESSelect_Activator, IFSelect_Activator) - -//! Performs Actions specific to IGESSelect, i.e. creation of -//! IGES Selections and Dispatches, plus dumping specific to IGES -class IGESSelect_Activator : public IFSelect_Activator -{ - -public: - - - Standard_EXPORT IGESSelect_Activator(); - - //! Executes a Command Line for IGESSelect - Standard_EXPORT IFSelect_ReturnStatus Do (const Standard_Integer number, const Handle(IFSelect_SessionPilot)& pilot) Standard_OVERRIDE; - - //! Sends a short help message for IGESSelect commands - Standard_EXPORT Standard_CString Help (const Standard_Integer number) const Standard_OVERRIDE; - - - - - DEFINE_STANDARD_RTTIEXT(IGESSelect_Activator,IFSelect_Activator) - -protected: - - - - -private: - - - - -}; - - - - - - - -#endif // _IGESSelect_Activator_HeaderFile diff --git a/src/StepSelect/FILES b/src/StepSelect/FILES index aaba0653cc..455995b99e 100644 --- a/src/StepSelect/FILES +++ b/src/StepSelect/FILES @@ -1,5 +1,3 @@ -StepSelect_Activator.cxx -StepSelect_Activator.hxx StepSelect_FileModifier.hxx StepSelect_FileModifier_0.cxx StepSelect_FloatFormat.cxx diff --git a/src/StepSelect/StepSelect_Activator.cxx b/src/StepSelect/StepSelect_Activator.cxx deleted file mode 100644 index e4d1a3cf74..0000000000 --- a/src/StepSelect/StepSelect_Activator.cxx +++ /dev/null @@ -1,149 +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 -#include -#include -#include -#include -#include -#include - -IMPLEMENT_STANDARD_RTTIEXT(StepSelect_Activator,IFSelect_Activator) - -static int THE_StepSelect_Activator_initActivator = 0; - -StepSelect_Activator::StepSelect_Activator () -{ - if (THE_StepSelect_Activator_initActivator) - { - return; - } - - THE_StepSelect_Activator_initActivator = 1; -// Add ( 0,"load"); -// Add ( 0,"loadstep"); // homonyme -// Add ( 1,"entity"); -// Add ( 2,"liststep"); - -// AddSet (10,"steptype"); - - Add ( 1,"stepschema"); - AddSet (40,"floatformat"); -} - - -IFSelect_ReturnStatus StepSelect_Activator::Do - (const Standard_Integer number, - const Handle(IFSelect_SessionPilot)& pilot) -{ - Standard_Integer argc = pilot->NbWords(); - const Standard_CString arg1 = pilot->Word(1).ToCString(); - const Standard_CString arg2 = pilot->Word(2).ToCString(); -// const Standard_CString arg3 = pilot->Word(3).ToCString(); - - switch (number) { - - case 1 : { // **** StepSchema - if (argc < 2) { - std::cout<<"Identify an entity"<Number(arg1); - if (num <= 0) { - std::cout<<"Not an entity : "<Session()->StartingEntity(num); - DeclareAndCast(StepData_UndefinedEntity,und,ent); - if (!und.IsNull()) { - std::cout<<"Entity "<StepType()<DynamicType()->Name()<= 48 && prem <= 57) digits = atoi(arg1); - else { - std::cout<<"floatformat digits, digits=nb de chiffres signifiants, ou\n" - << "floatformat NZ %mainformat [%rangeformat [Rmin Rmax]]\n" - <<" NZ : N ou n pour Non-zero-suppress, Z ou z pour zero-suppress\n" - <<" %mainformat : format principal type printf, ex,: %E\n" - <<" + optionnel : format secondaire (flottants autour de 1.) :\n" - <<" %rangeformat Rmin Rmax : format type printf entre Rmin et Rmax\n" - <<" %rangeformat tout seul : format type printf entre 0.1 et 1000.\n" - < 4) { - Rmin = Atof(pilot->Word(4).ToCString()); - Rmax = Atof(pilot->Word(5).ToCString()); - if (Rmin <= 0 || Rmax <= 0) { std::cout<<"intervalle : donner reels > 0"<SetDefault(digits); - else { - fm->SetZeroSuppress(zerosup); - fm->SetFormat (arg2); - if (argc == 4) fm->SetFormatForRange(pilot->Word(3).ToCString()); - else if (argc >= 6) fm->SetFormatForRange(pilot->Word(3).ToCString(),Rmin,Rmax); - else fm->SetFormatForRange(""); - } - return pilot->RecordItem(fm); - } - - default : break; - } - return IFSelect_RetVoid; - -} - - -Standard_CString StepSelect_Activator::Help - (const Standard_Integer number) const -{ - switch (number) { - - case 40 : return "options... : cree FloatFormat ... floatformat tout court->help"; - default : break; - } - return ""; -} diff --git a/src/StepSelect/StepSelect_Activator.hxx b/src/StepSelect/StepSelect_Activator.hxx deleted file mode 100644 index 2b21649120..0000000000 --- a/src/StepSelect/StepSelect_Activator.hxx +++ /dev/null @@ -1,71 +0,0 @@ -// Created on: 1995-04-20 -// 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 _StepSelect_Activator_HeaderFile -#define _StepSelect_Activator_HeaderFile - -#include -#include - -#include -#include -#include -class IFSelect_SessionPilot; - - -class StepSelect_Activator; -DEFINE_STANDARD_HANDLE(StepSelect_Activator, IFSelect_Activator) - -//! Performs Actions specific to StepSelect, i.e. creation of -//! Step Selections and Counters, plus dumping specific to Step -class StepSelect_Activator : public IFSelect_Activator -{ - -public: - - - Standard_EXPORT StepSelect_Activator(); - - //! Executes a Command Line for StepSelect - Standard_EXPORT IFSelect_ReturnStatus Do (const Standard_Integer number, const Handle(IFSelect_SessionPilot)& pilot) Standard_OVERRIDE; - - //! Sends a short help message for StepSelect commands - Standard_EXPORT Standard_CString Help (const Standard_Integer number) const Standard_OVERRIDE; - - - - - DEFINE_STANDARD_RTTIEXT(StepSelect_Activator,IFSelect_Activator) - -protected: - - - - -private: - - - - -}; - - - - - - - -#endif // _StepSelect_Activator_HeaderFile diff --git a/src/Transfer/FILES b/src/Transfer/FILES index 8590e42f32..733aab8adc 100644 --- a/src/Transfer/FILES +++ b/src/Transfer/FILES @@ -67,6 +67,5 @@ Transfer_TransientMapper.hxx Transfer_TransientMapper_0.cxx Transfer_TransientProcess.cxx Transfer_TransientProcess.hxx -Transfer_UndefMode.hxx Transfer_VoidBinder.cxx Transfer_VoidBinder.hxx diff --git a/src/Transfer/Transfer_UndefMode.hxx b/src/Transfer/Transfer_UndefMode.hxx deleted file mode 100644 index 9e404d040d..0000000000 --- a/src/Transfer/Transfer_UndefMode.hxx +++ /dev/null @@ -1,29 +0,0 @@ -// Created on: 1992-02-03 -// Created by: Christian CAILLET -// Copyright (c) 1992-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 _Transfer_UndefMode_HeaderFile -#define _Transfer_UndefMode_HeaderFile - -//! used on processing Undefined Entities (see TransferOutput) -enum Transfer_UndefMode -{ -Transfer_UndefIgnore, -Transfer_UndefFailure, -Transfer_UndefContent, -Transfer_UndefUser -}; - -#endif // _Transfer_UndefMode_HeaderFile diff --git a/src/XSAlgo/FILES b/src/XSAlgo/FILES index 9e535d2da9..6baa8b705b 100644 --- a/src/XSAlgo/FILES +++ b/src/XSAlgo/FILES @@ -3,6 +3,5 @@ XSAlgo.hxx XSAlgo_AlgoContainer.cxx XSAlgo_AlgoContainer.hxx XSAlgo_AlgoContainer.lxx -XSAlgo_Caller.hxx XSAlgo_ToolContainer.cxx XSAlgo_ToolContainer.hxx diff --git a/src/XSAlgo/XSAlgo_Caller.hxx b/src/XSAlgo/XSAlgo_Caller.hxx deleted file mode 100644 index d90f4fb989..0000000000 --- a/src/XSAlgo/XSAlgo_Caller.hxx +++ /dev/null @@ -1,27 +0,0 @@ -// Created on: 2000-01-19 -// Created by: data exchange team -// Copyright (c) 2000-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 _XSAlgo_Caller_HeaderFile -#define _XSAlgo_Caller_HeaderFile - -//! Identifies the caller of the algorithm -enum XSAlgo_Caller -{ -XSAlgo_DEFAULT, -XSAlgo_IGES, -XSAlgo_STEP -}; - -#endif // _XSAlgo_Caller_HeaderFile diff --git a/src/XSDRAW/XSDRAW_Functions.cxx b/src/XSDRAW/XSDRAW_Functions.cxx index 8b01efb940..a0ee105111 100644 --- a/src/XSDRAW/XSDRAW_Functions.cxx +++ b/src/XSDRAW/XSDRAW_Functions.cxx @@ -13,9 +13,7 @@ #include -#include #include -#include #include #include #include diff --git a/src/XSDRAW/XSDRAW_FunctionsSession.cxx b/src/XSDRAW/XSDRAW_FunctionsSession.cxx index 4d0c143945..c30c72726b 100644 --- a/src/XSDRAW/XSDRAW_FunctionsSession.cxx +++ b/src/XSDRAW/XSDRAW_FunctionsSession.cxx @@ -13,7 +13,6 @@ #include -#include #include #include #include @@ -45,7 +44,6 @@ #include #include #include -#include #include #include #include diff --git a/src/XSDRAW/XSDRAW_FunctionsShape.cxx b/src/XSDRAW/XSDRAW_FunctionsShape.cxx index 30f7bbe312..30a156822d 100644 --- a/src/XSDRAW/XSDRAW_FunctionsShape.cxx +++ b/src/XSDRAW/XSDRAW_FunctionsShape.cxx @@ -18,8 +18,6 @@ #include #include #include -#include -#include #include #include #include diff --git a/src/XSDRAWIGES/XSDRAWIGES.cxx b/src/XSDRAWIGES/XSDRAWIGES.cxx index 4d1ce1c29d..7f6d1e69de 100644 --- a/src/XSDRAWIGES/XSDRAWIGES.cxx +++ b/src/XSDRAWIGES/XSDRAWIGES.cxx @@ -33,7 +33,6 @@ #include #include #include -#include #include #include #include diff --git a/src/XSDRAWSTEP/XSDRAWSTEP.cxx b/src/XSDRAWSTEP/XSDRAWSTEP.cxx index 4db98351ae..46b25beadc 100644 --- a/src/XSDRAWSTEP/XSDRAWSTEP.cxx +++ b/src/XSDRAWSTEP/XSDRAWSTEP.cxx @@ -35,7 +35,6 @@ #include #include #include -#include #include #include #include