From 3c1d9cddb4760c5031a2839ffdfe797b69805162 Mon Sep 17 00:00:00 2001 From: jroy Date: Wed, 23 Apr 2003 12:52:39 +0000 Subject: [PATCH] Version compilable de MED (sans MEDGUI). --- Makefile.in | 7 +- idl/GEOM_Shape.idl | 67 +++++ idl/Logger.idl | 24 ++ idl/Med_Gen.idl | 41 +++ idl/SALOMEDS.idl | 361 ++++++++++++++++++++++ idl/SALOMEDS_Attributes.idl | 394 +++++++++++++++++++++++++ idl/SALOME_Component.idl | 65 ++++ idl/SALOME_DataTypeCatalog.idl | 31 ++ idl/SALOME_Exception.idl | 39 +++ idl/SALOME_ModuleCatalog.idl | 131 ++++++++ idl/SALOME_Registry.idl | 38 +++ idl/SALOME_RessourcesCatalog.idl | 46 +++ idl/SALOME_Session.idl | 56 ++++ idl/SALOME_TestComponent.idl | 20 ++ idl/SMESH_BasicHypothesis.idl | 64 ++++ idl/SMESH_Hypothesis.idl | 71 +++++ idl/SMESH_Mesh.idl | 235 +++++++++++++++ idl/VISU_Gen.idl | 110 +++++++ src/MEDGUI/Handle_SMESH_TypeFilter.hxx | 89 ++++++ src/MEDGUI/SMESH_Type.h | 21 ++ src/MEDGUI/SMESH_TypeFilter.cxx | 138 +++++++++ src/MEDGUI/SMESH_TypeFilter.hxx | 95 ++++++ src/Makefile.in | 3 +- 23 files changed, 2142 insertions(+), 4 deletions(-) create mode 100644 idl/GEOM_Shape.idl create mode 100644 idl/Logger.idl create mode 100644 idl/Med_Gen.idl create mode 100644 idl/SALOMEDS.idl create mode 100644 idl/SALOMEDS_Attributes.idl create mode 100644 idl/SALOME_Component.idl create mode 100644 idl/SALOME_DataTypeCatalog.idl create mode 100644 idl/SALOME_Exception.idl create mode 100644 idl/SALOME_ModuleCatalog.idl create mode 100644 idl/SALOME_Registry.idl create mode 100755 idl/SALOME_RessourcesCatalog.idl create mode 100644 idl/SALOME_Session.idl create mode 100644 idl/SALOME_TestComponent.idl create mode 100644 idl/SMESH_BasicHypothesis.idl create mode 100644 idl/SMESH_Hypothesis.idl create mode 100644 idl/SMESH_Mesh.idl create mode 100644 idl/VISU_Gen.idl create mode 100644 src/MEDGUI/Handle_SMESH_TypeFilter.hxx create mode 100644 src/MEDGUI/SMESH_Type.h create mode 100644 src/MEDGUI/SMESH_TypeFilter.cxx create mode 100644 src/MEDGUI/SMESH_TypeFilter.hxx diff --git a/Makefile.in b/Makefile.in index 01871d04a..a12eac712 100644 --- a/Makefile.in +++ b/Makefile.in @@ -23,8 +23,7 @@ Infos.png \ Structure.png \ ModuleMed.png -BIN_SCRIPT= \ -README +BIN_SCRIPT= # copy header files in common directory @@ -68,7 +67,9 @@ install-include: $(include_list) # install script in $(bindir) : install-bin: $(BIN_SCRIPT) $(INSTALL) -d $(bindir) - $(INSTALL_PROGRAM) $^ $(bindir) + if test $(BIN_SCRIPT)X != X; then \ + $(INSTALL_PROGRAM) $^ $(bindir); \ + fi uninstall: uninstall-idl diff --git a/idl/GEOM_Shape.idl b/idl/GEOM_Shape.idl new file mode 100644 index 000000000..f9c61eab0 --- /dev/null +++ b/idl/GEOM_Shape.idl @@ -0,0 +1,67 @@ +// File : GEOM_Shape.idl +// Created : 29 november 2001 +// Author : Lucien PIGNOLONI +// Project : SALOME +// Copyright : OPEN CASCADE +// $HEADERS: + + +#ifndef __GEOM_Shape__ +#define __GEOM_Shape__ + +module GEOM +{ + //-----------------------------------------------------------------// + // Topological types for shapes (like Open Cascade types) // + //-----------------------------------------------------------------// + + enum shape_type { COMPOUND, COMPSOLID, SOLID, SHELL, + FACE, WIRE, EDGE, VERTEX, SHAPE } ; + + //----------------------------------------------------------------// + // Structures // + //--------------------------------------------------- ------------// + struct PointStruct { double x; + double y; + double z; } ; + struct DirStruct { PointStruct PS ; } ; // analog to Occ Direction + + struct AxisStruct { double x; + double y; + double z; + double vx; + double vy; + double vz; } ; + + //----------------------------------------------------------------// + // interface GEOM_Shape methods // + //----------------------------------------------------------------// + + interface GEOM_Gen; + + interface GEOM_Shape + { + typedef sequence ListOfSubShapeID ; + typedef sequence TMPFile; + + attribute string Name; // (to set and get) the name of shape (= CORBA IOR converted into a string) + attribute string MainName; // (to set and get) the name of mainshape (= CORBA IOR converted into a string) + + attribute boolean IsMainShape; // (...) true if this is a main shape (not a sub shape) + attribute string ShapeId; // (...) the entry of the shape in geom/OCAF document + attribute string StudyShapeId; // (...) the entry of the shape in the study/OCAF when added + attribute ListOfSubShapeID Index; // (...) list of references (number) identifing the sub shapes in the main shape + attribute shape_type ShapeType; // (...) a topological type of the shape + + attribute string NameType; // (...) a topological/geometrical name of the shape + + //Transfer resulting shape to client as sequence of bytes + //client can extract shape from stream using BrepTools::Read function + TMPFile GetShapeStream(); + + // the generator engine + GEOM_Gen Engine(); + + }; +}; +#endif diff --git a/idl/Logger.idl b/idl/Logger.idl new file mode 100644 index 000000000..57be3a2f2 --- /dev/null +++ b/idl/Logger.idl @@ -0,0 +1,24 @@ +//============================================================================= +// File : Logger.idl +// Created : nov 18 10:28:17 2002 +// Author : Vasily Rusyaev +// Project : SALOME/PRO +//============================================================================= + +#ifndef SALOME_LOGGER_IDL +#define SALOME_LOGGER_IDL + +#pragma prefix "opencascade.com" + +module SALOME_Logger +{ + interface Logger + { + //put message into one special place for all servers using Logger + oneway void putMessage (in string message); + }; +}; + + + +#endif diff --git a/idl/Med_Gen.idl b/idl/Med_Gen.idl new file mode 100644 index 000000000..5b0ebf458 --- /dev/null +++ b/idl/Med_Gen.idl @@ -0,0 +1,41 @@ +//============================================================================= +// File : Med_Gen.idl +// Project : SALOME +// Copyright : EDF 2001 +//============================================================================= + +#ifndef _Med_GEN_IDL_ +#define _Med_GEN_IDL_ + + +#include "SALOME_Exception.idl" +#include "SALOME_Component.idl" +#include "SALOMEDS.idl" +#include "MED.idl" + +module Engines +{ + interface Med_Gen : Engines::Component, SALOMEDS::Driver + { + SALOME_MED::MESH readMeshInFile(in string fileName, + in string studyName, + in string meshName ) + raises (SALOME::SALOME_Exception); + SALOME_MED::FIELD readFieldInFile(in string fileName, + in string studyName, + in string fieldName, + in long ordre, + in long iter ) + raises (SALOME::SALOME_Exception); + SALOME_MED::MED readStructFile(in string fileName, + in string studyName ) + raises (SALOME::SALOME_Exception); + + void readStructFileWithFieldType(in string fileName, + in string studyName ) + raises (SALOME::SALOME_Exception); + }; + +}; + +#endif diff --git a/idl/SALOMEDS.idl b/idl/SALOMEDS.idl new file mode 100644 index 000000000..54e19f762 --- /dev/null +++ b/idl/SALOMEDS.idl @@ -0,0 +1,361 @@ +//===================================================== +// File : SALOMEDS.idl +// Created : Thu Nov 29 21:25:39 2001 +// Author : Yves FRICAUD +// Project : SALOME +// Copyright : Open CASCADE 2001 +// $Header$ +//===================================================== + +//The Study module contains the following interfaces: +//===================================================== + +#ifndef _SALOMEDS_IDL_ +#define _SALOMEDS_IDL_ + +#include "SALOME_Exception.idl" + +module SALOMEDS +{ + typedef string URL; + typedef string ID; + typedef string PersistentReference; + typedef string SalomeReference; + typedef sequence ListOfOpenStudies ; + typedef sequence ListOfFileNames; + typedef sequence ListOfDates ; + typedef sequence ListOfStrings ; + typedef sequence TMPFile; + + + // Reference to other objects is treated with function AddReference + // and ReferencedObject + // All other type of attributes defined in AttributeType enum are + // treated with AddAdttribute and GetAttribute + // The difference is made because Reference attribute don't contain + // strings but reference to ID of other objects + + interface GenericAttribute; + interface Study; + interface StudyManager; + interface StudyBuilder; + interface SObject; + interface SComponent; + interface SComponentIterator; + interface ChildIterator; + interface Driver; + interface AttributeStudyProperties; + + typedef sequence ListOfAttributes; + + exception NotImplemented {}; + + //=========================================================================== + //Study Interface + //Most of the Study operations are handled by the Study Manager and the Stu= + //dyBuilder. What is left in the Study + //interface are elementary inquiries. (Incidentally, we recall that a CORBA= + // attribute is implemented as a pair of get + //and set methods.) A Study is explored by a set of tools, mainly iterators= + //, described farther. Nevertheless, the Study + //interface allows the search of an object by name or by ID. + //=========================================================================== + + interface Study + { + exception StudyInvalidContext {}; + exception StudyInvalidComponent {}; + exception StudyInvalidDirectory {}; + exception StudyNameAlreadyUsed {}; + exception StudyObjectAlreadyExists {}; + exception StudyNameError {}; + exception StudyCommentError {}; + + attribute string Name; // equivalent to setName() & getName() + attribute short StudyId; + + typedef sequence ListOfSObject; + + PersistentReference GetPersistentReference(); + SalomeReference GetTransientReference(); + // + boolean IsEmpty(); + SComponent FindComponent (in string aComponentName); + SComponent FindComponentID(in ID aComponentID); + + SObject FindObject (in string anObjectName); + SObject FindObjectID (in ID aObjectID); + SObject FindObjectIOR (in ID aObjectIOR); + ListOfSObject FindObjectByName(in string anObjectName, in string aComponentName); + + SObject FindObjectByPath(in string thePath); + string GetObjectPath(in Object theObject); + + void SetContext(in string thePath); + string GetContext(); + + ListOfStrings GetObjectNames(in string theContext); + ListOfStrings GetDirectoryNames(in string theContext); + ListOfStrings GetFileNames(in string theContext); + ListOfStrings GetComponentNames(in string theContext); + + ChildIterator NewChildIterator(in SObject aSO); + SComponentIterator NewComponentIterator(); + //Create a Builder to add or modify object in study. + StudyBuilder NewBuilder() ; + // Updates map with IOR attribute-Labels dependency + void UpdateIORLabelMap(in string anIOR, in string anEntry); + + // returns the attriubte, which contains properties of this study + AttributeStudyProperties GetProperties(); + + attribute boolean IsSaved; + boolean IsModified(); + attribute string URL; + + ListOfSObject FindDependances(in SObject anObject); + + // returns the date of the last saving of study with format: "DD/MM/YYYY HH:MM" + string GetLastModificationDate(); + // returns the list of modification dates (without creation date) with format "DD/MM/YYYY HH:MM" + // first modification is first in the list + ListOfDates GetModificationsDate(); + + string ConvertObjectToIOR(in Object theObject); + Object ConvertIORToObject(in string theIOR); + }; + + + //========================================================================== + //The purpose of the Manager is to manipulate the Study. We will find in this + // interface the methods to create, open, + //close, and save a Study. Since a Salome session is multi-document, we will + // also find the methods to navigate + //amongst the collection of studies present in a session. + //========================================================================== + + interface StudyManager + { + void ping(); + + Study NewStudy(in string study_name); + + // Open a study this method read and activate the structure of the study Objects + // WARNING : This method doesn't activate the corba objects. Only a component can do it + Study Open (in URL aStudyUrl) raises (SALOME::SALOME_Exception); + + void Close(in Study aStudy); + + void Save(in Study aStudy); + + void SaveAs(in URL aUrl, // if the file already exists + in Study aStudy); // overwrite (as option) + ListOfOpenStudies GetOpenStudies(); + + // the following activate a particular Study + // amongst the session collection + Study GetStudyByName (in string aStudyName); + Study GetStudyByID (in short aStudyID); + }; + + + //========================================================================== + //Study Builder Interface + //The purpose of the Builder is to add and/or remove objects and attributes. + //A StudyBuilder is linked to a Study. A + //command management is provided for the undo/redo functionalities. + //========================================================================== + + interface StudyBuilder + { + exception LockProtection {}; + + SComponent NewComponent(in string ComponentDataType); + void DefineComponentInstance (in SComponent aComponent,in Object ComponentIOR); + void RemoveComponent(in SComponent aComponent); + // + SObject NewObject (in SObject theFatherObject); + SObject NewObjectToTag (in SObject theFatherObject, in long atag); + void RemoveObject (in SObject anObject); + void RemoveObjectWithChildren(in SObject anObject); + + // + void LoadWith (in SComponent sco, in Driver Engine); + + void Load (in SObject sco); + + /*! + * Working with attributes + * + */ + + GenericAttribute FindOrCreateAttribute(in SObject anObject, + in string aTypeOfAttribute); + + boolean FindAttribute(in SObject anObject, + out GenericAttribute anAttribute, + in string aTypeOfAttribute); + + void RemoveAttribute(in SObject anObject, + in string aTypeOfAttribute); + + + + void Addreference(in SObject anObject, + in SObject theReferencedObject) ; + + void AddDirectory(in string theName); + + /*! + * Identification of the SObject substructure + * as a GUID use the followin format "00000000-0000-0000-0000-000000000000" + */ + + void SetGUID(in SObject anObject, in string theGUID); + boolean IsGUID(in SObject anObject, in string theGUID); + + + void NewCommand(); // command management + void CommitCommand() raises(LockProtection); // command management + boolean HasOpenCommand(); + void AbortCommand(); // command management + + attribute long UndoLimit; + void Undo() raises (LockProtection); + void Redo() raises (LockProtection); + + boolean GetAvailableUndos(); + boolean GetAvailableRedos(); + }; + + //========================================================================== + //The Study objects are built by the StudyBuilder. The SObject interface pr= + //ovides methods for elementary inquiries, + //like getting an object ID or its attribuites. + //The SComponent interface is a specialisation of the SObject interface. + //========================================================================== + + interface SObject + { + + attribute string Name; // equivalent to setName() & getName() + ID GetID(); + // + SComponent GetFatherComponent(); + SObject GetFather(); + // + short Tag(); + + boolean FindSubObject (in long atag,out SObject obj); + boolean FindAttribute(out GenericAttribute anAttribute, + in string aTypeOfAttribute); + + boolean ReferencedObject(out SObject obj); // A REVOIR + + ListOfAttributes GetAllAttributes(); + Study GetStudy(); + + }; + + + //========================================================================== + // Generic attribute, all attributes inherit this base interface + //========================================================================== + interface GenericAttribute + { + exception LockProtection {}; + void CheckLocked() raises (LockProtection); + }; + + + + + //========================================================================== + //========================================================================== + interface SComponent : SObject + { + string ComponentDataType(); + boolean ComponentIOR (out ID theID); //returns True if there is an instance + //In this case ID identifies this one + }; + + + //========================================================================== + //========================================================================== + interface SComponentIterator + { + void Init(); + boolean More(); + void Next(); + SComponent Value(); + }; + + //========================================================================== + //========================================================================== + interface ChildIterator + { + void Init(); + void InitEx(in boolean allLevels); + boolean More(); + void Next(); + SObject Value(); + }; + + + //========================================================================== + // Interface Component containes the Set of methods used for the management + // of produced object in the study by a component. + //========================================================================== + interface Driver + { + + /*! + * This method Save is called by the StudyManager during the saving of a study . + * points to the component specific data in the study + * The method returns a byte stream TMPFile that contains all saved data + */ + + + TMPFile Save(in SComponent theComponent); + + + /*! + * This method Load is called by the StudyManager during the opening of a study . + * points to the component specific data in the study + * contains all data saved by the component on Save method + */ + + boolean Load(in SComponent theComponent, in TMPFile theStream); + + + /*! + * This method Close is called by the StudyManager during the closing of a study . + * /aStudy which is saved + * /aSComponent which is the father of the produced study objects by the component + */ + + //void Close (in SComponent aSComponent); + void Close ( in string aIORSComponent); + + /*! + * This method ComponentDataType() returns the type of data produced by this Component in the study + */ + + string ComponentDataType(); + + // Driver Transient -> persistent called for each object in study + + string IORToLocalPersistentID (in string IORString, out boolean IsAFile); + + string LocalPersistentIDToIOR (in string aLocalPersistentID); + + // Publishing in the study + + boolean CanPublishInStudy(in Object theIOR); + + SObject PublishInStudy(in Study theStudy, in SObject theSObject, in Object theObject, in string theName); + + }; +}; + +#endif diff --git a/idl/SALOMEDS_Attributes.idl b/idl/SALOMEDS_Attributes.idl new file mode 100644 index 000000000..1c5782c5c --- /dev/null +++ b/idl/SALOMEDS_Attributes.idl @@ -0,0 +1,394 @@ +//===================================================== +// File : SALOMEDS.idl +// Created : Thu Jul 4 19:25:39 2002 +// Author : Yves FRICAUD +// Project : SALOME +// Copyright : Open CASCADE 2002 +// $Header$ +//===================================================== +//The following attributes can be assigned to SObject +//===================================================== + +#ifndef _SALOMEDS_AttributesIDL_ +#define _SALOMEDS_AttributesIDL_ + +#include "SALOMEDS.idl" + +module SALOMEDS +{ + typedef sequence DoubleSeq; + typedef sequence LongSeq; + typedef sequence StringSeq; + struct Color { + double R; + double G; + double B; + }; + //========================================================================== + //Attribute to store real value + //========================================================================== + interface AttributeReal : GenericAttribute + { + double Value(); + void SetValue(in double value); + }; + + //========================================================================== + //Attribute to store integer value + //========================================================================== + interface AttributeInteger : GenericAttribute + { + long Value(); + void SetValue(in long value); + }; + + //========================================================================== + //Attribute - sequence of real, indexing from 1 (like in CASCADE) + //========================================================================== + interface AttributeSequenceOfReal : GenericAttribute + { + void Assign (in DoubleSeq other); + DoubleSeq CorbaSequence(); + void Add (in double value); + void Remove(in long index); + void ChangeValue(in long index, in double value); + double Value(in short index); + long Length(); + }; + + //========================================================================== + //Attribute - sequence of integer, indexing from 1 (like in CASCADE) + //========================================================================== + interface AttributeSequenceOfInteger : GenericAttribute + { + void Assign (in LongSeq other); + LongSeq CorbaSequence(); + void Add (in long value); + void Remove(in long index); + void ChangeValue(in long index, in long value); + long Value(in short index); + long Length(); + }; + + //========================================================================== + //Name attribute + //========================================================================== + + interface AttributeName : GenericAttribute + { + string Value(); + void SetValue(in string value); + }; + + //========================================================================== + //Comment attribute + //========================================================================== + interface AttributeComment : GenericAttribute + { + string Value(); + void SetValue(in string value); + }; + + //========================================================================== + //IOR attribute + //========================================================================== + interface AttributeIOR : GenericAttribute + { + string Value(); + void SetValue(in string value); + }; + + //========================================================================== + //Persistent reference attribute + //========================================================================== + interface AttributePersistentRef : GenericAttribute + { + string Value(); + void SetValue(in string value); + }; + + + //========================================================================== + //Below the list of presentation attributes for display study tree in browser + //========================================================================== + + + //========================================================================== + //Drawable flag. The item + //associated to SObject is created/displayed if TRUE. + //========================================================================== + interface AttributeDrawable : GenericAttribute + { + boolean IsDrawable(); + void SetDrawable(in boolean value); + }; + + //========================================================================== + //Selectable flag. he item is selectable + //by SALOME selection mechanism if TRUE + //========================================================================== + interface AttributeSelectable : GenericAttribute + { + boolean IsSelectable(); + void SetSelectable(in boolean value); + }; + + //========================================================================== + //Expandable flag. Sets this item to be + //expandable even if it has no children if value is TRUE. If value is FALSEe + //expandable only if it has children + //========================================================================== + interface AttributeExpandable : GenericAttribute + { + boolean IsExpandable(); + void SetExpandable(in boolean value); + }; + + //========================================================================== + //Opened flag. Sets this item to be open (its + //children are visible) if bool is TRUE, and to be closed (its children + //are not visible) if bool is FALSE. + //========================================================================== + interface AttributeOpened : GenericAttribute + { + boolean IsOpened(); + void SetOpened(in boolean value); + }; + + //========================================================================== + //TextColorAttribute. Sets item's color. + //========================================================================== + interface AttributeTextColor : GenericAttribute + { + Color TextColor(); + void SetTextColor(in Color value); + }; + + + //========================================================================== + //TextHighlightColorAttribute. Sets item's highlight color. + //========================================================================== + interface AttributeTextHighlightColor : GenericAttribute + { + Color TextHighlightColor(); + void SetTextHighlightColor(in Color value); + }; + + //========================================================================== + //PixMapAttribute. Shows an icon before the name of items. + //========================================================================== + interface AttributePixMap : GenericAttribute + { + boolean HasPixMap(); + string GetPixMap(); + void SetPixMap(in string value); + }; + + //========================================================================== + //TreeNodeAttribute. Auxiliary tree item. + //========================================================================== + interface AttributeTreeNode : GenericAttribute + { + void SetFather(in AttributeTreeNode value); + boolean HasFather(); + AttributeTreeNode GetFather(); + + void SetPrevious(in AttributeTreeNode value); + boolean HasPrevious(); + AttributeTreeNode GetPrevious(); + + void SetNext(in AttributeTreeNode value); + boolean HasNext(); + AttributeTreeNode GetNext(); + + void SetFirst(in AttributeTreeNode value); + boolean HasFirst(); + AttributeTreeNode GetFirst(); + + void SetTreeID(in string value); + string GetTreeID(); + + void Append(in AttributeTreeNode value); + void Prepend(in AttributeTreeNode value); + void InsertBefore(in AttributeTreeNode value); + void InsertAfter(in AttributeTreeNode value); + void Remove(); + + long Depth(); + boolean IsRoot(); + boolean IsDescendant(in AttributeTreeNode value); + boolean IsFather(in AttributeTreeNode value); + boolean IsChild(in AttributeTreeNode value); + + string Label(); + }; + + //========================================================================== + //Attribute to describe link between a SO and a local object in the component + //========================================================================== + interface AttributeLocalID : GenericAttribute + { + long Value(); + void SetValue(in long value); + }; + + //========================================================================== + //Attribute to store GUID + //========================================================================== + interface AttributeUserID : GenericAttribute + { + string Value(); + void SetValue(in string value); + }; + + //========================================================================== + //Attribute to store referenced SObjects to the accorded SObject + //========================================================================== + + interface AttributeTarget : GenericAttribute + { + void Add(in SObject anObject); + SALOMEDS::Study::ListOfSObject Get(); + void Remove(in SObject anObject); + }; + + //========================================================================== + //Attribute to store table of integers (indexing from 1 (like in CASCADE)) + // and string titles: of table, of each row, of each column + //========================================================================== + + interface AttributeTableOfInteger : GenericAttribute + { + exception IncorrectIndex {}; + exception IncorrectArgumentLength {}; + + // titles: for table, for each row, for each column + void SetTitle(in string theTitle); + string GetTitle(); + void SetRowTitle(in long theIndex, in string theTitle) raises(IncorrectIndex); + void SetRowTitles(in StringSeq theTitles) raises(IncorrectArgumentLength); + StringSeq GetRowTitles(); + void SetColumnTitle(in long theIndex, in string theTitle) raises(IncorrectIndex); + void SetColumnTitles(in StringSeq theTitles) raises(IncorrectArgumentLength); + StringSeq GetColumnTitles(); + + //Rows units + void SetRowUnit(in long theIndex, in string theUnit) raises(IncorrectIndex); + void SetRowUnits(in StringSeq theUnits) raises(IncorrectArgumentLength); + StringSeq GetRowUnits(); + + // table information + long GetNbRows(); + long GetNbColumns(); + + // operations with rows + void AddRow(in LongSeq theData) raises(IncorrectArgumentLength); + void SetRow(in long theRow, in LongSeq theData) raises(IncorrectArgumentLength, IncorrectIndex); + LongSeq GetRow(in long theRow) raises(IncorrectIndex); + + // operations with columns + void AddColumn(in LongSeq theData) raises(IncorrectArgumentLength); + void SetColumn(in long theColumn, in LongSeq theData) raises(IncorrectArgumentLength, IncorrectIndex); + LongSeq GetColumn(in long theColumn) raises(IncorrectIndex); + + // operations with elements + void PutValue(in long theValue, in long theRow, in long theColumn) raises(IncorrectIndex); + boolean HasValue(in long theRow, in long theColumn); + long GetValue(in long theRow, in long theColumn) raises(IncorrectIndex); + + // operations with files + void ReadFromFile(in URL theURL) raises (NotImplemented); + void SaveToFile(in URL theURL) raises (NotImplemented); + }; + + //========================================================================== + //Attribute to store table of reals (indexing from 1 (like in CASCADE)) + // and string titles: of table, of each row, of each column + //========================================================================== + + interface AttributeTableOfReal : GenericAttribute + { + exception IncorrectIndex {}; + exception IncorrectArgumentLength {}; + + // titles: for table, for each row, for each column + void SetTitle(in string theTitle); + string GetTitle(); + void SetRowTitle(in long theIndex, in string theTitle) raises(IncorrectIndex); + void SetRowTitles(in StringSeq theTitles) raises(IncorrectArgumentLength); + StringSeq GetRowTitles(); + void SetColumnTitle(in long theIndex, in string theTitle) raises(IncorrectIndex); + void SetColumnTitles(in StringSeq theTitles) raises(IncorrectArgumentLength); + StringSeq GetColumnTitles(); + + //Rows units + void SetRowUnit(in long theIndex, in string theUnit) raises(IncorrectIndex); + void SetRowUnits(in StringSeq theUnits) raises(IncorrectArgumentLength); + StringSeq GetRowUnits(); + + // table information + long GetNbRows(); + long GetNbColumns(); + + // operations with rows + void AddRow(in DoubleSeq theData) raises(IncorrectArgumentLength); + void SetRow(in long theRow, in DoubleSeq theData) raises(IncorrectArgumentLength, IncorrectIndex); + DoubleSeq GetRow(in long theRow) raises(IncorrectIndex); + + // operations with columns + void AddColumn(in DoubleSeq theData) raises(IncorrectArgumentLength); + void SetColumn(in long theColumn, in DoubleSeq theData) raises(IncorrectArgumentLength, IncorrectIndex); + DoubleSeq GetColumn(in long theColumn) raises(IncorrectIndex); + + // operations with elements + void PutValue(in double theValue, in long theRow, in long theColumn) raises(IncorrectIndex); + boolean HasValue(in long theRow, in long theColumn); + double GetValue(in long theRow, in long theColumn) raises(IncorrectIndex); + + // operations with files + void ReadFromFile(in URL theURL) raises (NotImplemented); + void SaveToFile(in URL theURL) raises (NotImplemented); + }; + + //========================================================================== + //Attribute to store study properties: user name, creation date, creation + // mode, modified flag, locked flag + //========================================================================== + + interface AttributeStudyProperties : GenericAttribute + { + void SetUserName(in string theName); + // returns null string, if user name is not set + string GetUserName(); + void SetCreationDate(in long theMinute, in long theHour, in long theDay, in long theMonth, in long theYear); + // returns false, if creation mode is not set + boolean GetCreationDate(out long theMinute, out long theHour, out long theDay, out long theMonth, out long theYear); + // creation mode must be: "from scratch" or "copy from" + void SetCreationMode(in string theMode); + // returns creation mode: "from scratch", "copy from", or null string if creation mode is not set + string GetCreationMode(); + void SetModified(in long theModified); + // returns true, if document is modified and not saved + boolean IsModified(); + long GetModified(); + void SetLocked(in boolean theLocked); + boolean IsLocked(); + + // this method appends modification parameters to the modifications list + void SetModification(in string theName, in long theMinute, in long theHour, in long theDay, in long theMonth, in long theYear); + // this method returns list of: mosdifiers user names, modification dates + void GetModificationsList(out StringSeq theNames, out LongSeq theMinutes, out LongSeq theHours, out LongSeq theDays, out LongSeq theMonths, out LongSeq theYears, in boolean theWithCreator); + }; + + //========================================================================== + //Attribute to store pyton objects as the char sequence + //========================================================================== + + interface AttributePythonObject : GenericAttribute + { + void SetObject(in string theSequence, in boolean IsScript); + string GetObject(); + boolean IsScript(); + }; +}; +#endif diff --git a/idl/SALOME_Component.idl b/idl/SALOME_Component.idl new file mode 100644 index 000000000..b1d5588f2 --- /dev/null +++ b/idl/SALOME_Component.idl @@ -0,0 +1,65 @@ +//============================================================================= +// File : SALOME_Component.idl +// Created : jeu jui 12 08:11:23 CEST 2001 +// Author : Paul RASCLE, EDF +// Project : SALOME +// Copyright : EDF 2001 +// $Header$ +//============================================================================= + +#ifndef _SALOME_COMPONENT_IDL_ +#define _SALOME_COMPONENT_IDL_ + +module Engines +{ + interface Component ; + + interface Container + { + + Container start_impl( in string ContainerName ) ; + + /*! + * Loads a component (SALOME engine) an starts it's CORBA servant + * /nameToRegister to register the component into Registry (or Name Service) + * /componentName to build the library Name + */ + Component load_impl(in string nameToRegister, in string componentName); + + /*! + * Stops the component servant, and deletes related objects + */ + void remove_impl(in Component component_i); + + /*! + * Discharges (dlclose) all stopped component in tne container. + */ + void finalize_removal() ; + + void ping(); + readonly attribute string name ; + readonly attribute string machineName ; + + boolean Kill() ; + }; + + interface Component + { + readonly attribute string instanceName ; + readonly attribute string interfaceName ; + + void ping(); + + void destroy() ; + + Container GetContainerRef() ; + + void Names( in string aGraphName , in string aNodeName ) ; + boolean Kill() ; + boolean Stop() ; + boolean Suspend() ; + boolean Resume() ; + } ; +} ; + +#endif diff --git a/idl/SALOME_DataTypeCatalog.idl b/idl/SALOME_DataTypeCatalog.idl new file mode 100644 index 000000000..34b4edc57 --- /dev/null +++ b/idl/SALOME_DataTypeCatalog.idl @@ -0,0 +1,31 @@ +// File: SALOME_DataTypeCatalog.idl +// Created: Mon August 08 2001 +// Author: Estelle Deville, Paul Rascle +// Project: SALOME +// Copyright : CEA/DEN/DMSS/LGLS +// $Header$ + +module SALOME_DataTypeCatalog{ +// Type definitions + +// List of Data Type Names + typedef sequence ListOfDataTypeName ; + + // Exception thrown if a DataType is not found in the catalog + exception NotFound {}; +//-------------------------------------------------------------------------- +// Interfaces + +// Catalog interface : +// methods to : +// - obtain the data type names of the catalog +// - test the compatibility between two type names +interface DataCatalog +{ + ListOfDataTypeName GetDataTypeList() ; + boolean isDerivedFrom(in string type_in, in string type_out) raises(NotFound); + string GetDataInterfaceRead(in string type) raises(NotFound); + string GetDataInterfaceWrite(in string type)raises(NotFound); + ListOfDataTypeName GetDataTypeParents(in string type) raises(NotFound); +} ; +}; diff --git a/idl/SALOME_Exception.idl b/idl/SALOME_Exception.idl new file mode 100644 index 000000000..2797e4ff1 --- /dev/null +++ b/idl/SALOME_Exception.idl @@ -0,0 +1,39 @@ +//============================================================================= +// File : SALOME_Exception.idl +// Created : mar déc 18 17:57:27 CET 2001 +// Author : Paul RASCLE, EDF +// Project : SALOME +// Copyright : EDF 2001 +// $Header$ +//============================================================================= + +#ifndef _SALOME_EXCEPTION_IDL_ +#define _SALOME_EXCEPTION_IDL_ + +//! module SALOME regroups all idl definitions for SALOME Kernel + +module SALOME +{ + enum ExceptionType + { + COMM, // Communication problem + BAD_PARAM, // Bad User parameters + INTERNAL_ERROR // SALOME Bug, irrecoverable + }; + + struct ExceptionStruct + { + ExceptionType type; + string text; + string sourceFile; + unsigned long lineNumber; + }; + + exception SALOME_Exception + { + ExceptionStruct details; + }; + +}; + +#endif diff --git a/idl/SALOME_ModuleCatalog.idl b/idl/SALOME_ModuleCatalog.idl new file mode 100644 index 000000000..f41233f50 --- /dev/null +++ b/idl/SALOME_ModuleCatalog.idl @@ -0,0 +1,131 @@ +// File: SALOME_ModuleCatalog.idl +// Created: Tue June 25 2001 +// Author: Estelle Deville +// Project: SALOME +// Copyright : CEA/DEN/DMSS/LGLS +// $Header$ + +module SALOME_ModuleCatalog +{ + // Type Definitions + + enum ComponentType {GEOM, MESH, Med, SOLVER, DATA, VISU, SUPERV, OTHER} ; + + struct ServicesParameter + { + string Parametertype; + string Parametername; + } ; + + typedef sequence ListOfServicesParameter; + + struct Service + { + string ServiceName; + ListOfServicesParameter ServiceinParameter; + ListOfServicesParameter ServiceoutParameter; + boolean Servicebydefault; + } ; + + typedef sequence ListOfInterfaceService; + + typedef sequence ListOfServices ; + + struct DefinitionInterface + { + string interfacename ; + ListOfInterfaceService interfaceservicelist ; + } ; + + typedef sequence ListOfDefInterface ; + + typedef sequence ListOfInterfaces ; + + typedef sequence ListOfComponents ; + + typedef sequence ListOfComputers ; + + struct IAPP_Affich + { + string modulename; + string moduleicone; + }; + + typedef sequence ListOfIAPP_Affich ; + + // Exceptions Definitions + exception NotFound + { + string what ; // to indicate if it's component, service or pathPrefix + } ; + + interface Acomponent + { + // GetInterfaceList : operation to get a list of the interfaces name of + // a component + ListOfInterfaces GetInterfaceList() ; + + // GetInterface : operation to get one interface of a component + DefinitionInterface GetInterface(in string interfacename) raises(NotFound); + + // GetServiceList : operation to get a list of the services name of + // an interface of a component + ListOfServices GetServiceList(in string interfacename) raises(NotFound); + + + // GetService : operation to get one service of an interface of a component + Service GetService(in string interfacename, + in string servicename) raises(NotFound); + + // GetDefaultService : operation to get the default service + // of an interface of a component + Service GetDefaultService(in string interfacename) raises(NotFound); + + // GetPathPrefix : operation to get the PathPrefix of a computer + string GetPathPrefix(in string machinename) raises(NotFound); + + // constraint : attribute to obtain the constraint affected to a component + // (to be resolved by LifeCycle for the computer choice) + readonly attribute string constraint ; + + // componentname : attribute to obtain the componentname + readonly attribute string componentname; + + // multistudy : attribute to define if a component can be multistudy or not + readonly attribute boolean multistudy; + + // componenttype : attribute to define the type of the component + readonly attribute ComponentType component_type ; + + // component_icone : attribute to obtain the component icone + readonly attribute string component_icone; + } ; + + interface ModuleCatalog + { + void ping(); + + // GetComputerList : operation to get a list of the computers name of + // the catalog + ListOfComputers GetComputerList(); + + // GetPathPrefix : operation to get the PathPrefix of a computer + string GetPathPrefix(in string machinename) raises(NotFound); + + // GetComponentList : operation to get a list of the components name of + // the catalog + ListOfComponents GetComponentList(); + + // GetComponentIconeList : operation to get a list of couple + // (components name, component icone) for all + // the modules of the catalog + ListOfIAPP_Affich GetComponentIconeList(); + + // GetComponentList : operation to get a list of the components name of + // a particular type of the catalog + ListOfComponents GetTypedComponentList(in ComponentType _component_type); + + // GetComponent : operation to get one component of the catalog + Acomponent GetComponent(in string componentname) raises(NotFound); + } ; +}; diff --git a/idl/SALOME_Registry.idl b/idl/SALOME_Registry.idl new file mode 100644 index 000000000..d3e7a7fed --- /dev/null +++ b/idl/SALOME_Registry.idl @@ -0,0 +1,38 @@ +# ifndef __registry_idl__ +# define __registry_idl__ + +module Registry +{ + struct Infos + { + string name; + long pid; + string machine; + string adip; + long uid; + string pwname; + long tc_start; + long tc_hello; + long tc_end; + long difftime; + string cdir; + long status; + string ior; // client + }; + + typedef sequence AllInfos; + + interface Components + { + void ping(); + unsigned long add ( in Infos lesInfos ) ; + void remove ( in unsigned long id ) ; + unsigned long size() ; + AllInfos getall () ; + AllInfos history () ; + oneway void end() ; + oneway void hello( in unsigned long id ) ; + } ; +} ; + +# endif diff --git a/idl/SALOME_RessourcesCatalog.idl b/idl/SALOME_RessourcesCatalog.idl new file mode 100755 index 000000000..be518177f --- /dev/null +++ b/idl/SALOME_RessourcesCatalog.idl @@ -0,0 +1,46 @@ +// File: SALOME_RessourcesCatalog.idl +// Created: Mon Sep 10 2001 +// Author: Estelle Deville +// Project: SALOME +// Copyright : CEA/DEN/DMSS/LGLS +// $Header$ + +module SALOME_RessourcesCatalog{ + // Type Definitions + + //Proc_info : information about a processor + struct proc_info{ + long number; + string model_name; + float cpu_mhz; + float cache_size; + }; + + typedef sequence ListOfProc; + + //Computer_info : information about a computer + // Os and informations about processors + struct computer_info{ + string name; + string OS; + string OS_version; + ListOfProc procs; + }; + + enum ContainerType {Cpp, python, NP}; + typedef sequence ListOfContainerType; + + typedef sequence ListOfComputer; + + // exception thrown if a computer is not found in the catalog + + exception NotFound {}; + + //------------------------------------------------------------------ + //Interface + interface RessourcesCatalog { + ListOfComputer GetComputerList(); + ListOfContainerType GetContainerTypeList (in string computer) raises(NotFound); + computer_info GetComputerInfo(in string computer) raises(NotFound); + }; +}; diff --git a/idl/SALOME_Session.idl b/idl/SALOME_Session.idl new file mode 100644 index 000000000..8b1de6713 --- /dev/null +++ b/idl/SALOME_Session.idl @@ -0,0 +1,56 @@ +//============================================================================= +// File : SALOME_Session.idl +// Created : mar jun 19 09:15:07 CEST 2001 +// Author : Paul RASCLE, EDF +// Project : SALOME +// Copyright : EDF 2001 +// $Header$ +//============================================================================= + +//! module SALOME regroups all idl definitions for SALOME Kernel +#include "VISU_Gen.idl" +module SALOME +{ + enum SessionState {asleep, running } ; + + //! Session State and Statistics + /*! + * Field list + * - state + * -# asleep : no running study + * -# running : one or more running studies + * - number of running studies + * - active GUI : true/false + */ + + struct StatSession + { + SessionState state ; + short runningStudies ; + boolean activeGUI ; + } ; + + /*! + * Session Server launches and stops GUI (Graphical User Interface) + * Session can be active without GUI (one or more running studies) + */ + + interface Session + { + exception GUIActive {} ; + exception RunningStudies {} ; + + //! Launches GUI + oneway void GetInterface() ; + VISU::VISU_Gen GetVisuGen(); + + //! Stops Session (must be idle) + void StopSession() raises(GUIActive, RunningStudies) ; + + //! Gets Session State + StatSession GetStatSession() ; + + void ping(); + } ; + +} ; diff --git a/idl/SALOME_TestComponent.idl b/idl/SALOME_TestComponent.idl new file mode 100644 index 000000000..212093652 --- /dev/null +++ b/idl/SALOME_TestComponent.idl @@ -0,0 +1,20 @@ +//============================================================================= +// File : SALOME_TestComponent.idl +// Created : jeu jui 12 12:08:17 CEST 2001 +// Author : Paul RASCLE, EDF - MARC TAJCHMAN, CEA +// Project : SALOME +// Copyright : EDF 2001 - CEA 2001 +// $Header$ +//============================================================================= + +#include "SALOME_Component.idl" + +module Engines +{ + + interface TestComponent : Component + { + string Coucou(in long L); + }; + +}; diff --git a/idl/SMESH_BasicHypothesis.idl b/idl/SMESH_BasicHypothesis.idl new file mode 100644 index 000000000..694b791ba --- /dev/null +++ b/idl/SMESH_BasicHypothesis.idl @@ -0,0 +1,64 @@ +//============================================================================= +// File : SMESH_BasicHypothesis.idl +// Created : mer mai 15 13:37:18 CEST 2002 +// Author : Paul RASCLE, EDF +// Project : SALOME +// Copyright : EDF 2002 +// $Header$ +//============================================================================= + +#ifndef _SMESH_BASICHYPOTHESIS_IDL_ +#define _SMESH_BASICHYPOTHESIS_IDL_ + +#include "SALOME_Exception.idl" +#include "SMESH_Hypothesis.idl" + + +module SMESH +{ + interface SMESH_LocalLength : SMESH_Hypothesis + { + void SetLength(in double length) + raises (SALOME::SALOME_Exception); + double GetLength(); + }; + + interface SMESH_NumberOfSegments : SMESH_Hypothesis + { + void SetNumberOfSegments(in long segmentsNumber) + raises (SALOME::SALOME_Exception); + long GetNumberOfSegments(); + }; + + interface SMESH_MaxElementArea : SMESH_Hypothesis + { + void SetMaxElementArea(in double area) + raises (SALOME::SALOME_Exception); + double GetMaxElementArea(); + }; + + interface SMESH_MaxElementVolume : SMESH_Hypothesis + { + void SetMaxElementVolume(in double volume) + raises (SALOME::SALOME_Exception); + double GetMaxElementVolume(); + }; + + interface SMESH_Regular_1D : SMESH_1D_Algo + { + }; + + interface SMESH_MEFISTO_2D : SMESH_2D_Algo + { + }; + + interface SMESH_Quadrangle_2D : SMESH_2D_Algo + { + }; + + interface SMESH_Hexa_3D : SMESH_3D_Algo + { + }; +}; + +#endif diff --git a/idl/SMESH_Hypothesis.idl b/idl/SMESH_Hypothesis.idl new file mode 100644 index 000000000..ec61223eb --- /dev/null +++ b/idl/SMESH_Hypothesis.idl @@ -0,0 +1,71 @@ +//============================================================================= +// File : SMESH_Hypothesis.idl +// Created : jeu avr 11 19:26:16 CEST 2002 +// Author : Paul RASCLE, EDF +// Project : SALOME +// Copyright : EDF 2002 +// $Header$ +//============================================================================= + +#ifndef _SMESH_HYPOTHESIS_IDL_ +#define _SMESH_HYPOTHESIS_IDL_ + +#include "SALOME_Exception.idl" + +module SMESH +{ + interface SMESH_Hypothesis; + + typedef sequence ListOfHypothesis; + typedef sequence ListOfHypothesisName; + + interface SMESH_Hypothesis + { + /*! + * Get the Hypothesis typeName + */ + string GetName(); + + /*! + * Get the internal Id + */ + long GetId(); + }; + + interface SMESH_Algo : SMESH_Hypothesis + { + /*! + * Get list of hypothesis that can be used with this algorithm + */ + ListOfHypothesisName GetCompatibleHypothesis(); + + }; + + interface SMESH_1D_Algo : SMESH_Algo + { + /*! + * + */ + }; + + interface SMESH_2D_Algo : SMESH_Algo + { + /*! + * + */ + }; + + interface SMESH_3D_Algo : SMESH_Algo + { + /*! + * + */ + }; +}; + + // ----------------------------------------------------------------- + // Specific Algorithms in separate idl file + // ----------------------------------------------------------------- + + +#endif diff --git a/idl/SMESH_Mesh.idl b/idl/SMESH_Mesh.idl new file mode 100644 index 000000000..3ba74ea81 --- /dev/null +++ b/idl/SMESH_Mesh.idl @@ -0,0 +1,235 @@ +//============================================================================= +// File : SMESH_Mesh.idl +// Created : jeu avr 11 15:31:39 CEST 2002 +// Author : Paul RASCLE, EDF +// Project : SALOME +// Copyright : EDF 2002 +// $Header$ +//============================================================================= + + +#ifndef _SMESH_MESH_IDL_ +#define _SMESH_MESH_IDL_ + +#include "SALOME_Exception.idl" +#include "SMESH_Hypothesis.idl" + +#include "GEOM_Shape.idl" +#include "MED.idl" + +module SMESH +{ + typedef sequence double_array ; + typedef sequence long_array ; + typedef sequence string_array ; + + enum log_command + { + ADD_NODE, + ADD_EDGE, + ADD_TRIANGLE, + ADD_QUADRANGLE, + ADD_TETRAHEDRON, + ADD_PYRAMID, + ADD_PRISM, + ADD_HEXAHEDRON, + REMOVE_NODE, + REMOVE_ELEMENT + }; + + struct log_block + { + long commandType; + long number; + double_array coords; + long_array indexes; + }; + + typedef sequence log_array; + + interface SMESH_subMesh; + interface SMESH_MeshEditor; + interface SMESH_Mesh + { + /*! + * Associate a Shape to a Mesh created with NewEmpty + */ + +// boolean SetMesh(in GEOM::GEOM_Shape aShape) +// raises (SALOME::SALOME_Exception); + + /*! + * Get the subMesh object associated to a subShape. The subMesh object + * gives access to nodes and elements IDs. + * SubMesh will be used instead of SubShape in a next idl version to + * adress a specific subMesh... + */ + SMESH_subMesh GetElementsOnShape(in GEOM::GEOM_Shape aSubShape) + raises (SALOME::SALOME_Exception); + + /*! + * Create a subMesh without reference to a subShape + */ +// SMESH_subMesh NewEmpty() +// raises (SALOME::SALOME_Exception); + + /*! + * Add hypothesis to the mesh, under a particular subShape + * (or the main shape itself) + * The Add method is only used to prepare the build of the mesh and store + * the algorithms and associated parameters. + * Actual job of mesh the shape is done by MESH_Gen. + * @params + * - aSubShape : subShape obtained by a shape explode in GEOM + * (or main shape) + * - anHyp : hypothesis object + * @return + * - OK if the hypothesis is compatible with the subShape + * (and all previous hypothesis on the subShape) + * - NOK if the hypothesis is not compatible with the subShape + * (or one previous hypothesis on the subShape) + * raises exception if hypothesis has not been created + */ + boolean AddHypothesis(in GEOM::GEOM_Shape aSubShape, in SMESH_Hypothesis anHyp) + raises (SALOME::SALOME_Exception); +// boolean AddHypothesis(in SMESH_subMesh aSubMesh, in SMESH_Hypothesis anHyp) +// raises (SALOME::SALOME_Exception); + + + /*! + * Remove an hypothesis previouly added with AddHypothesis. + */ + boolean RemoveHypothesis(in GEOM::GEOM_Shape aSubShape, + in SMESH_Hypothesis anHyp) + raises (SALOME::SALOME_Exception); +// boolean RemoveHypothesis(in SMESH_subMesh aSubMesh, +// in SMESH_Hypothesis anHyp) +// raises (SALOME::SALOME_Exception); + + /*! + * Get the list of hypothesis added on a subShape + */ + ListOfHypothesis GetHypothesisList(in GEOM::GEOM_Shape aSubShape) + raises (SALOME::SALOME_Exception); +// ListOfHypothesis GetHypothesisList(in SMESH_subMesh aSubMesh) +// raises (SALOME::SALOME_Exception); + + /*! + * Get the log of nodes and elements added or removed since previous + * clear of the log. + * @params + * - clearAfterGet : log is emptied after Get (safe if concurrents access) + */ + // string_array GetLog(in boolean clearAfterGet) + // raises (SALOME::SALOME_Exception); + log_array GetLog(in boolean clearAfterGet) + raises (SALOME::SALOME_Exception); + + /*! + * Clear the log of nodes and elements added or removed since previous + * clear. Must be used immediately after GetLog if clearAfterGet is false. + */ + void ClearLog() + raises (SALOME::SALOME_Exception); + + /*! + * Get the internal Id + */ + long GetId(); + + /*! + * Get the study Id + */ + long GetStudyId(); + + SMESH_MeshEditor GetMeshEditor() + raises (SALOME::SALOME_Exception); + + /*! + * Export Mesh with DAT and MED Formats + */ + void ExportDAT( in string file ) + raises (SALOME::SALOME_Exception); + void ExportMED( in string file ) + raises (SALOME::SALOME_Exception); + void ExportUNV( in string file ) + raises (SALOME::SALOME_Exception); + + /*! + * Get MED Mesh + */ + SALOME_MED::MESH GetMEDMesh() + raises (SALOME::SALOME_Exception); + }; + + interface SMESH_subMesh + { + /*! + * + */ + long GetNumberOfElements() + raises (SALOME::SALOME_Exception); + + /*! + * + */ + long GetNumberOfNodes() + raises (SALOME::SALOME_Exception); + + /*! + * + */ + long_array GetElementsId() + raises (SALOME::SALOME_Exception); + + /*! + * + */ + long_array GetNodesId() + raises (SALOME::SALOME_Exception); + + /*! + * Get SMESH_Mesh which stores nodes coordinates & elements definition + */ + SMESH_Mesh GetFather() + raises (SALOME::SALOME_Exception); + + /*! + * Get the internal Id + */ + long GetId(); + + /*! + * Get MED subMesh + */ + SALOME_MED::FAMILY GetFamily() + raises (SALOME::SALOME_Exception); + }; + + /* + * This interface makes modifications on the Mesh - removing elements and nodes + */ + interface SMESH_MeshEditor { + + + boolean RemoveElements(in long_array IDsOfElements) + raises (SALOME::SALOME_Exception); + + boolean RemoveNodes(in long_array IDsOfNodes) + raises (SALOME::SALOME_Exception); + + boolean AddNode(in double x, in double y, in double z) + raises (SALOME::SALOME_Exception); + + boolean AddEdge(in long_array IDsOfNodes) + raises (SALOME::SALOME_Exception); + + boolean AddFace(in long_array IDsOfNodes) + raises (SALOME::SALOME_Exception); + + boolean AddVolume(in long_array IDsOfNodes) + raises (SALOME::SALOME_Exception); + }; +}; + +#endif diff --git a/idl/VISU_Gen.idl b/idl/VISU_Gen.idl new file mode 100644 index 000000000..3dab632be --- /dev/null +++ b/idl/VISU_Gen.idl @@ -0,0 +1,110 @@ +// File : VISU_Gen.idl +// Created : +// Author : Alexey Petrov +// Project : SALOME +// Copyright : OPEN CASCADE +// $HEADERS: + + +#ifndef __VISU_GEN__ +#define __VISU_GEN__ + +#include "SALOME_Exception.idl" +#include "SALOME_Component.idl" +#include "SALOMEDS.idl" + +module VISU { + interface ViewManager; + interface PrsObject; + interface Med; + interface VISU_Gen : Engines::Component, SALOMEDS::Driver { + ViewManager GetViewManager(); + Med ImportMed(in string theFileName); + PrsObject ScalarMap(in Med theMed, in string theFieldName); + PrsObject DeformedShape(in Med theMed, in string theFieldName); + PrsObject Vectors(in Med theMed, in string theFieldName); + PrsObject IsoSurfaces(in Med theMed, in string theFieldName); + PrsObject CutPlanes(in Med theMed, in string theFieldName); + }; + interface Med { + }; + interface View; + interface ViewManager{ + View GetActiveView(); + View Create3DView(); + }; + typedef unsigned short Color[3]; + interface View{ + unsigned long GetID(); + + void SetTitle(in string theTitle); + string GetTitle(); + + void SetBackground(in Color theColor); + Color GetBackground(); + + void Minimize(); + void Restore(); + void Maximize(); + + void EraseAll(); + void DisplayAll(); + void Erase(in PrsObject thePrsObj); + void Display(in PrsObject thePrsObj); + void DisplayOnly(in PrsObject thePrsObj); + }; + interface View3D{ + enum ViewType{ FRONT, BACK, LEFT, RIGHT, TOP, BOTTOM}; + enum ScaleType{ NOSCALE, SCALEFACTOR, LOGARITHM}; + enum Axis{ X, Y, Z}; + typedef double XYZ[3]; + + void PanView(in double dX, in double dY); //? + void Zoom(in double theScale); + void FitAll(); + void SetView(in ViewType theType); + + void SetPointOfView(in XYZ theCoord); + XYZ GetPointOfView(); + + void SetDirectionOfView(in XYZ theDir); + XYZ GetDirectionOfView(); + + void ScaleView(in ScaleType theType, in Axis theAxis, in double theParam); + void RemoveScale(); + }; + interface PrsObject{ + unsigned long GetID(); + unsigned long GetTypeID(); + }; + interface ScalarMap : PrsObject{ + void SetRange(in double theMin, in double theMax); + double GetMin(); + double GetMax(); + + enum Orientation{ HORIZONTAL, VERTICAL}; + void SetOrientatin(in Orientation theOrient); + + void SetPosition(in double theX, in double theY); + double GetPosX(); + double GetPosY(); + + void SetSize(in double theWidth, in double theHeight); + double GetWidth(); + double GetHeight(); + + void SetColors(in unsigned long theNbColors); + unsigned long GetColors(); + + void SetLabels(in unsigned long theNbLabels); + unsigned long GetLabels(); + + void SetTitle(in string theLabel); + string GetTitle(); + }; + interface IsoSurfaces : ScalarMap{ + void SetSurfacesNb(in unsigned long theNbSurf); + unsigned long GetSurfacesNb(); + }; +}; +#endif diff --git a/src/MEDGUI/Handle_SMESH_TypeFilter.hxx b/src/MEDGUI/Handle_SMESH_TypeFilter.hxx new file mode 100644 index 000000000..79db47025 --- /dev/null +++ b/src/MEDGUI/Handle_SMESH_TypeFilter.hxx @@ -0,0 +1,89 @@ +// File generated by CPPExt (Transient) +// +// Copyright (C) 1991,1995 by +// +// MATRA DATAVISION, FRANCE +// +// This software is furnished in accordance with the terms and conditions +// of the contract and with the inclusion of the above copyright notice. +// This software or any other copy thereof may not be provided or otherwise +// be made available to any other person. No title to an ownership of the +// software is hereby transferred. +// +// At the termination of the contract, the software and all copies of this +// software must be deleted. + +#ifndef _Handle_SMESH_TypeFilter_HeaderFile +#define _Handle_SMESH_TypeFilter_HeaderFile + +#ifndef _Standard_Macro_HeaderFile +#include +#endif +#ifndef _Standard_HeaderFile +#include +#endif + +#ifndef _Handle_SALOME_Filter_HeaderFile +#include "Handle_SALOME_Filter.hxx" +#endif + +class Standard_Transient; +class Handle_Standard_Type; +class Handle(SALOME_Filter); +class SMESH_TypeFilter; +Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(SMESH_TypeFilter); + +class Handle(SMESH_TypeFilter) : public Handle(SALOME_Filter) { + public: + inline void* operator new(size_t,void* anAddress) + { + return anAddress; + } + inline void* operator new(size_t size) + { + return Standard::Allocate(size); + } + inline void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } +// inline void operator delete(void *anAddress, size_t size) +// { +// if (anAddress) Standard::Free((Standard_Address&)anAddress,size); +// } + Handle(SMESH_TypeFilter)():Handle(SALOME_Filter)() {} + Handle(SMESH_TypeFilter)(const Handle(SMESH_TypeFilter)& aHandle) : Handle(SALOME_Filter)(aHandle) + { + } + + Handle(SMESH_TypeFilter)(const SMESH_TypeFilter* anItem) : Handle(SALOME_Filter)((SALOME_Filter *)anItem) + { + } + + Handle(SMESH_TypeFilter)& operator=(const Handle(SMESH_TypeFilter)& aHandle) + { + Assign(aHandle.Access()); + return *this; + } + + Handle(SMESH_TypeFilter)& operator=(const SMESH_TypeFilter* anItem) + { + Assign((Standard_Transient *)anItem); + return *this; + } + + SMESH_TypeFilter* operator->() + { + return (SMESH_TypeFilter *)ControlAccess(); + } + + SMESH_TypeFilter* operator->() const + { + return (SMESH_TypeFilter *)ControlAccess(); + } + + Standard_EXPORT ~Handle(SMESH_TypeFilter)(); + + Standard_EXPORT static const Handle(SMESH_TypeFilter) DownCast(const Handle(Standard_Transient)& AnObject); +}; +#endif diff --git a/src/MEDGUI/SMESH_Type.h b/src/MEDGUI/SMESH_Type.h new file mode 100644 index 000000000..7bf427270 --- /dev/null +++ b/src/MEDGUI/SMESH_Type.h @@ -0,0 +1,21 @@ +// File : SMESH_Type.h +// Created : Mon Jun 03 15:14:15 2002 +// Author : Nicolas REJNERI + +// Project : SALOME +// Module : SMESH +// Copyright : Open CASCADE 2002 +// $Header$ + +enum MeshObjectType { + HYPOTHESIS, + ALGORITHM, + MESH, + SUBMESH, + MESHorSUBMESH, + SUBMESH_VERTEX, + SUBMESH_EDGE, + SUBMESH_FACE, + SUBMESH_SOLID, + SUBMESH_COMPOUND +}; diff --git a/src/MEDGUI/SMESH_TypeFilter.cxx b/src/MEDGUI/SMESH_TypeFilter.cxx new file mode 100644 index 000000000..4aa830bcf --- /dev/null +++ b/src/MEDGUI/SMESH_TypeFilter.cxx @@ -0,0 +1,138 @@ +// File : SMESH_TypeFilter.cxx +// Created : Fri Dec 07 09:57:24 2001 +// Author : Nicolas REJNERI +// Project : SALOME +// Module : SMESH +// Copyright : Open CASCADE +// $Header$ + +#include "SMESH_TypeFilter.ixx" + +#include "SALOME_InteractiveObject.hxx" +#include "SALOME_TypeFilter.hxx" + +#include "utilities.h" +#include "QAD_Application.h" +#include "QAD_Desktop.h" +#include "QAD_Study.h" + + +SMESH_TypeFilter::SMESH_TypeFilter(MeshObjectType aType) +{ + myKind = aType; +} + +Standard_Boolean SMESH_TypeFilter::IsOk(const Handle(SALOME_InteractiveObject)& anObj) const +{ + Handle(SALOME_TypeFilter) meshFilter = new SALOME_TypeFilter( "MESH" ); + if ( !meshFilter->IsOk(anObj) ) + return false; + + if ( anObj->hasEntry() ) { + QAD_Study* ActiveStudy = QAD_Application::getDesktop()->getActiveStudy(); + SALOMEDS::Study_var aStudy = ActiveStudy->getStudyDocument(); + SALOMEDS::SObject_var obj = aStudy->FindObjectID( anObj->getEntry() ); + + bool Ok = false; + + switch ( myKind ) + { + case HYPOTHESIS: + { + SALOMEDS::SObject_var objFather = obj->GetFather(); + SALOMEDS::SComponent_var objComponent = obj->GetFatherComponent(); + if (( objFather->Tag() == 1 ) && (strcmp( objFather->GetID(), objComponent->GetID() ) != 0 ) ) + Ok = true; + break; + } + case ALGORITHM: + { + SALOMEDS::SObject_var objFather = obj->GetFather(); + SALOMEDS::SComponent_var objComponent = obj->GetFatherComponent(); + if (( objFather->Tag() == 2 ) && (strcmp( objFather->GetID(), objComponent->GetID() ) != 0 ) ) + Ok = true; + break; + } + case MESH: + { + SALOMEDS::SObject_var objFather = obj->GetFather(); + SALOMEDS::SComponent_var objComponent = obj->GetFatherComponent(); + + if (( obj->Tag() >= 3 ) && (strcmp( objFather->GetID(), objComponent->GetID() ) == 0 ) ) + Ok = true; + break; + } + case SUBMESH: + { + SALOMEDS::SObject_var objFather = obj->GetFather(); + SALOMEDS::SComponent_var objComponent = obj->GetFatherComponent(); + + if (( objFather->Tag() >= 4 ) && (strcmp( objFather->GetID(), objComponent->GetID() ) != 0 ) ) + Ok = true; + break; + } + case MESHorSUBMESH: + { + SALOMEDS::SObject_var objFather = obj->GetFather(); + SALOMEDS::SComponent_var objComponent = obj->GetFatherComponent(); + + if (( obj->Tag() >= 3 ) && (strcmp( objFather->GetID(), objComponent->GetID() ) == 0 ) ) + Ok = true; + + if (( objFather->Tag() >= 4 ) && (strcmp( objFather->GetID(), objComponent->GetID() ) != 0 ) ) + Ok = true; + + break; + } + case SUBMESH_VERTEX: + { + SALOMEDS::SObject_var objFather = obj->GetFather(); + SALOMEDS::SComponent_var objComponent = obj->GetFatherComponent(); + + if (( obj->Tag() == 4 ) && (strcmp( objFather->GetID(), objComponent->GetID() ) != 0 ) && ( objFather->Tag() >= 3 )) + Ok = true; + break; + } + case SUBMESH_EDGE: + { + SALOMEDS::SObject_var objFather = obj->GetFather(); + SALOMEDS::SComponent_var objComponent = obj->GetFatherComponent(); + + if (( obj->Tag() == 5 ) && (strcmp( objFather->GetID(), objComponent->GetID() ) != 0 ) && ( objFather->Tag() >= 3 )) + Ok = true; + break; + } + case SUBMESH_FACE: + { + SALOMEDS::SObject_var objFather = obj->GetFather(); + SALOMEDS::SComponent_var objComponent = obj->GetFatherComponent(); + + if (( obj->Tag() == 6 ) && (strcmp( objFather->GetID(), objComponent->GetID() ) != 0 ) && ( objFather->Tag() >= 3 )) + Ok = true; + break; + } + case SUBMESH_SOLID: + { + SALOMEDS::SObject_var objFather = obj->GetFather(); + SALOMEDS::SComponent_var objComponent = obj->GetFatherComponent(); + + if (( obj->Tag() == 7 ) && (strcmp( objFather->GetID(), objComponent->GetID() ) != 0 ) && ( objFather->Tag() >= 3 )) + Ok = true; + break; + } + case SUBMESH_COMPOUND: + { + SALOMEDS::SObject_var objFather = obj->GetFather(); + SALOMEDS::SComponent_var objComponent = obj->GetFatherComponent(); + + if (( obj->Tag() == 8 ) && (strcmp( objFather->GetID(), objComponent->GetID() ) != 0 ) && ( objFather->Tag() >= 3 )) + Ok = true; + break; + } + } + + if ( Ok ) + return true; + } + return false; +} diff --git a/src/MEDGUI/SMESH_TypeFilter.hxx b/src/MEDGUI/SMESH_TypeFilter.hxx new file mode 100644 index 000000000..9e98ab8b8 --- /dev/null +++ b/src/MEDGUI/SMESH_TypeFilter.hxx @@ -0,0 +1,95 @@ +// File generated by CPPExt (Transient) +// +// Copyright (C) 1991,1995 by +// +// MATRA DATAVISION, FRANCE +// +// This software is furnished in accordance with the terms and conditions +// of the contract and with the inclusion of the above copyright notice. +// This software or any other copy thereof may not be provided or otherwise +// be made available to any other person. No title to an ownership of the +// software is hereby transferred. +// +// At the termination of the contract, the software and all copies of this +// software must be deleted. +// +#ifndef _SMESH_TypeFilter_HeaderFile +#define _SMESH_TypeFilter_HeaderFile + +#ifndef _Handle_SMESH_TypeFilter_HeaderFile +#include "Handle_SMESH_TypeFilter.hxx" +#endif + +#include "SALOME_InteractiveObject.hxx" +#include "SALOME_Filter.hxx" +#include "SMESH_Type.h" + +// Open CASCADE Includes +#include + +class SMESH_TypeFilter : public SALOME_Filter { + +public: + + inline void* operator new(size_t,void* anAddress) + { + return anAddress; + } + inline void* operator new(size_t size) + { + return Standard::Allocate(size); + } + inline void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } +// inline void operator delete(void *anAddress, size_t size) +// { +// if (anAddress) Standard::Free((Standard_Address&)anAddress,size); +// } + // Methods PUBLIC + // +Standard_EXPORT SMESH_TypeFilter(MeshObjectType aType); +Standard_EXPORT virtual Standard_Boolean IsOk(const Handle(SALOME_InteractiveObject)& anobj) const; +Standard_EXPORT ~SMESH_TypeFilter(); + + + + + // Type management + // + Standard_EXPORT friend Handle_Standard_Type& SMESH_TypeFilter_Type_(); + Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; + Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; + +protected: + + // Methods PROTECTED + // + + + // Fields PROTECTED + // +MeshObjectType myKind; + +private: + + // Methods PRIVATE + // + + + // Fields PRIVATE + // + + +}; + + + + + +// other inline functions and methods (like "C++: function call" methods) +// + + +#endif diff --git a/src/Makefile.in b/src/Makefile.in index 524007f86..dc4754985 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -15,6 +15,7 @@ VPATH=.:@srcdir@ @COMMENCE@ -SUBDIRS = MEDMEM MEDMEM_SWIG MedMem MED MEDGUI MedCorba_Swig +#SUBDIRS = MEDMEM MEDMEM_SWIG MedMem MED MEDGUI MedCorba_Swig +SUBDIRS = MEDMEM MEDMEM_SWIG MedMem MED MedCorba_Swig @MODULE@ -- 2.39.2