diff --git a/adm/UDLIST b/adm/UDLIST index fbe43e9e58..2a967512ff 100644 --- a/adm/UDLIST +++ b/adm/UDLIST @@ -7,17 +7,13 @@ p BVH p CSLib p Convert p Dico -p Dynamic p ElCLib p ElSLib p Expr p ExprIntrp p FSD p GeomAbs -p GraphDS -p GraphTools p MMgt -p Materials p Message p OSD p PLib @@ -40,7 +36,6 @@ p UnitsAPI p gp p math r OS -t TKAdvTools t TKMath t TKernel p Adaptor2d diff --git a/dox/dev_guides/tests/tests.md b/dox/dev_guides/tests/tests.md index f77dbeee2c..aae83053cf 100644 --- a/dox/dev_guides/tests/tests.md +++ b/dox/dev_guides/tests/tests.md @@ -943,7 +943,7 @@ This group allows testing extended data exchange packages. | Data Exchange | TKSTEPBase, TKSTEPAttr, TKSTEP209, TKSTEP | step | | Data Exchange | TKSTL, TKVRML | stlvrml | | Data Exchange | TKXSBase, TKXCAF, TKXCAFSchema, TKXDEIGES, TKXDESTEP, TKXmlXCAF, TKBinXCAF | xde | -| Foundation Classes | TKernel, TKMath, TKAdvTools | fclasses | +| Foundation Classes | TKernel, TKMath | fclasses | | Modeling_algorithms | TKGeomAlgo, TKTopAlgo, TKPrim, TKBO, TKBool, TKHLR, TKFillet, TKOffset, TKFeat, TKXMesh | modalg | | Modeling Data | TKG2d, TKG3d, TKGeomBase, TKBRep | moddata | | Visualization | TKService, TKV2d, TKV3d, TKOpenGl, TKMeshVS, TKNIS, TKVoxel | vis | diff --git a/src/Dynamic/Dynamic.cdl b/src/Dynamic/Dynamic.cdl deleted file mode 100644 index beb95fdd4c..0000000000 --- a/src/Dynamic/Dynamic.cdl +++ /dev/null @@ -1,294 +0,0 @@ --- Created on: 1993-01-22 --- Created by: Gilles DEBARBOUILLE --- 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. - -package Dynamic - - ---Purpose: This package propose a set of abstract persistent - -- classes. These classes may be sort in three main - -- groups, which are : - -- - -- - fuzzy classes - -- - methods - -- - dynamic classes - -- - -- And in two complementary groups used by the - -- previously described family, which are : - -- - -- - parameter classes - -- - variable classes - -- - -- All the main classes are manipulated through two - -- steps which are : - -- - -- - the definition which gives the signature of the - -- object - -- - the instanciation which always references a - -- definition - -- - -- This separation has been created to clearly - -- separate the definition of an object, a method or - -- a class which is the description and the instance - -- which is the utilisation with a particular set of - -- values. In this case for few instanciations of - -- the same object, the definition can be unique. - -- - -- Each family address a particular problem. - -- - -- Dynamic class - -- ------------- - -- - -- This family of classes offers the possibility to - -- define and to manipulate dynamically objets with - -- the same specifications as C++ objects. - -- Dynamically means without CDL description and - -- without compilation and link if all the methods - -- attached are interpreted methods. - -- - -- The first thing to do is to define the signature - -- of the class, in terms of fields and methods. - -- - -- You can also derive a class from others, add - -- fields, and add or redefine methods. - -- - -- Then instances of the class can be created and - -- values can be assigned to the fields. - -- - -- It is then possible to execute methods attached to - -- the definition of the class. These methods may set - -- computed values to other fields, or simply return - -- them. - -- - -- A method can be compiled or interpreted. - -- - -- Fuzzy class - -- ----------- - -- - -- A fuzzy class is a degeneration of a dynamic - -- class. Only the fields are specified. These - -- classes are useful to describe objects with - -- various definitions, and with the number and the - -- nature of fields depending of the definition. - -- - -- The definitions of the lights for Photo Realistic - -- Renderer is an illutration of the use of the fuzzy - -- classes. - -- - -- These lights have the same definitions in terms of - -- parameters as the lights used in the LightWorks - -- module. - -- - -- For each type of light an exhaustive set of - -- parameters is described, and each parameter is - -- defined by its name, its type and, if necessary, - -- its default value as follows : - -- - -- ambient - -- "intensity" Standard_Real 1.0 - -- "colour" Materials_PColor 1.0 1.0 1.0 - -- - -- distant - -- "intensity" Standard_Real 1.0 - -- "colour" Materials_PColor 1.0 1.0 1.0 - -- "location" PGeom_CartesianPoint 0.0 0.0 1.0 - -- "to" PGeom_CartesianPoint 0.0 0.0 0.0 - -- "shadows" Standard_Boolean Standard_False - -- "shadow resolution" Standard_Integer 256 - -- "shadow quality" Standard_Integer 4 - -- "shadow softness" Standard_Real 1.0 - -- - -- eye - -- "intensity" Standard_Real 1.0 - -- "colour" Materials_PColor 1.0 1.0 1.0 - -- - -- point - -- "intensity" Standard_Real 1.0 - -- "colour" Materials_PColor 1.0 1.0 1.0 - -- "location" PGeom_CartesianPoint 0.0 0.0 0.0 - -- "fall off" LightWorks_LiFallOffType LI_FALL_OFF_CONSTANT - -- "shadows" Standard_Boolean Standard_False - -- "shadow resolution" Standard_Integer 256 - -- "shadow quality" Standard_Integer 4 - -- "shadow softness" Standard_Real 1.0 - -- - -- spot - -- "intensity" Standard_Real 1.0 - -- "colour" Materials_PColor 1.0 1.0 1.0 - -- "location" PGeom_CartesianPoint 0.0 0.0 1.0 - -- "to" PGeom_CartesianPoint 0.0 0.0 0.0 - -- "fall off" LightWorks_LiFallOffType LI_FALL_OFF_CONSTANT - -- "cone angle" Standard_Real 60.0 - -- "cone delta angle" Standard_Real 5.0 - -- "beam distribution" Standard_Real 2.0 - -- "shadows" Standard_Boolean Standard_False - -- "shadow resolution" Standard_Integer 256 - -- "shadow quality" Standard_Integer 4 - -- "shadow softness" Standard_Real 1.0 - -- - -- All these definitions are described in a file - -- which is read at the first creation of a light - -- instance to be put in a dictionary. - -- - -- At the creation of an instance, just a reference - -- on the definition is set. All the parameter values - -- are read in the definition. If now a value of one - -- parameter is changed, the modified parameter is - -- added to the instance. So only the modified - -- parameters are directely attached to the instance. - -- This behaviour allows the use of an instance as - -- definition, and can be useful to create catalogs - -- of standards which can be directly questioned in - -- the database. - -- - -- The use of fuzzy classes needs four prerequisites - -- which are : - -- - -- - The creation of a file with the exhaustive - -- description of all the possible types taken by an - -- object and for each type the complete set of - -- parameters in terms of name, type, and, if - -- necessary, default value. - -- - -- - The inheritance from the class - -- FuzzyDefinitionsDictionary and, if necessary, the - -- redefinition of the Switch method for the non- - -- standard type of parameters described in the file. - -- - -- - The following method : - -- - -- void DictionaryOfDefinitions(Handle(MyPackage_MyDictionary)&); - -- - -- must be writen in the file MyPackage.cxx, because - -- this method is automatically called by the - -- constructor of FuzzyInstance. This method tests if - -- the dictionary has been created yet. If it is - -- true the method returns a reference to it, - -- otherwise the method creates the dictionary before - -- returning the reference. - -- - -- - The instanciation of the FuzzyInstance class - -- with the pre-defined dictionary. - -- - -- Method class - -- ------------ - -- - -- The behaviour of these classes are similar to - -- fuzzy classes. Only the semantic is different. - -- These classes are for memorized actions or - -- constraints, e.g. they are useful to memorized - -- persistently the working system of Imagine - -- Conception. - -uses - - TCollection, - MMgt - -is - -enumeration ModeEnum is - IN, - OUT, - INOUT, - INTERNAL, - CONSTANT -end ModeEnum; - - generic class Node; - - deferred class Parameter; - - class BooleanParameter; - - class IntegerParameter; - - class RealParameter; - - class StringParameter; - - class ObjectParameter; - - class InstanceParameter; - - class ParameterNode instantiates Node from Dynamic(Parameter from Dynamic); - - class Variable; - - class VariableGroup; - - deferred class AbstractVariableInstance; - - class VariableInstance; - - class CompositVariableInstance; - - class VariableNode instantiates Node from Dynamic(Variable from Dynamic); - - deferred class Method; - - deferred class MethodDefinition; - - class CompiledMethod; - - class InterpretedMethod; - - class CompositMethod; - - deferred class MethodDefinitionsDictionary; - - class SeqOfMethods instantiates - Sequence from TCollection (Method from Dynamic); - class SequenceOfMethods instantiates - HSequence from TCollection (Method from Dynamic, SeqOfMethods from Dynamic); - - class SeqOfMethodDefinitions instantiates - Sequence from TCollection (MethodDefinition from Dynamic); - class SequenceOfMethodDefinitions instantiates - HSequence from TCollection (MethodDefinition from Dynamic, - SeqOfMethodDefinitions from Dynamic); - - class DynamicClass; - - class DynamicDerivedClass; - - class SeqOfClasses instantiates - Sequence from TCollection (DynamicClass from Dynamic); - class SequenceOfClasses instantiates - HSequence from TCollection (DynamicClass from Dynamic, SeqOfClasses from Dynamic); - - class DynamicInstance; - - deferred class FuzzyClass; - - class FuzzyDefinition; - - class SeqOfFuzzyDefinitions instantiates - Sequence from TCollection (FuzzyDefinition from Dynamic); - class SequenceOfFuzzyDefinitions instantiates - HSequence from TCollection (FuzzyDefinition from Dynamic, - SeqOfFuzzyDefinitions from Dynamic); - - deferred class FuzzyDefinitionsDictionary; - - generic class FuzzyInstance; - - Mode(amode : CString from Standard) returns ModeEnum from Dynamic; - - ---Level: Advanced - -end Dynamic; - - - diff --git a/src/Dynamic/Dynamic.cxx b/src/Dynamic/Dynamic.cxx deleted file mode 100644 index 873568dd50..0000000000 --- a/src/Dynamic/Dynamic.cxx +++ /dev/null @@ -1,53 +0,0 @@ -// Created on: 1994-08-31 -// Created by: Gilles DEBARBOUILLE -// 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. - -// Historique : -// CRD : 15/04/97 : Correction warning de compil. -// CRD : 03/07/97 : Portage Windows NT. - - -#include -#ifdef HAVE_CONFIG_H -# include -#endif -#ifdef HAVE_STRINGS_H -# include -#endif -#ifdef WNT -//#define strcasecmp _stricoll -#include -#endif - - -//======================================================================= -//function : Mode -//purpose : -//======================================================================= - -Dynamic_ModeEnum Dynamic::Mode(const Standard_CString amode) -{ -Dynamic_ModeEnum aMode=Dynamic_IN; - if (!strcasecmp(amode,"in" )) aMode = Dynamic_IN; - else if(!strcasecmp(amode,"out" )) aMode = Dynamic_OUT; - else if(!strcasecmp(amode,"inout" )) aMode = Dynamic_INOUT; - else if(!strcasecmp(amode,"Internal")) aMode = Dynamic_INTERNAL; - else if(!strcasecmp(amode,"constant")) aMode = Dynamic_CONSTANT; -return aMode; -} - - - - diff --git a/src/Dynamic/Dynamic_AbstractVariableInstance.cdl b/src/Dynamic/Dynamic_AbstractVariableInstance.cdl deleted file mode 100644 index 3b62a52ac2..0000000000 --- a/src/Dynamic/Dynamic_AbstractVariableInstance.cdl +++ /dev/null @@ -1,48 +0,0 @@ --- Created on: 1994-09-05 --- Created by: Gilles DEBARBOUILLE --- 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. - -deferred class AbstractVariableInstance from Dynamic - - ---Purpose: This class is the header class to define instances - -- of variables. There are two kinds of instances, - -- These are VariableInstance which addresses only - -- one Variable and CompositVariableInstance which is - -- able to address more than one variable. This last - -- class is useful for methods with a variable number - -- of arguments. - -inherits - - Variable from Dynamic - - -is - - Initialize; - - Variable(me : mutable ; avariable : Variable from Dynamic) - - ---Level: Public - - ---Purpose: This deferred method must be implemented in the - -- derived classes for setting reference(s) to the - -- corresponding variable(s) which define the signature - -- of the method definition. - - is deferred; - - -end AbstractVariableInstance; diff --git a/src/Dynamic/Dynamic_AbstractVariableInstance.cxx b/src/Dynamic/Dynamic_AbstractVariableInstance.cxx deleted file mode 100644 index 4a201163e1..0000000000 --- a/src/Dynamic/Dynamic_AbstractVariableInstance.cxx +++ /dev/null @@ -1,36 +0,0 @@ -// Created on: 1994-09-05 -// Created by: Gilles DEBARBOUILLE -// 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. - -#include - -//======================================================================= -//function : Dynamic_AbstractVariableInstance -//purpose : -//======================================================================= - -Dynamic_AbstractVariableInstance::Dynamic_AbstractVariableInstance() -{} - -//======================================================================= -//function : Variable -//purpose : -//======================================================================= - -//void Dynamic_AbstractVariableInstance::Variable(const Handle(Dynamic_Variable)& avariable) -void Dynamic_AbstractVariableInstance::Variable(const Handle(Dynamic_Variable)& ) -{ -} - diff --git a/src/Dynamic/Dynamic_BooleanParameter.cdl b/src/Dynamic/Dynamic_BooleanParameter.cdl deleted file mode 100644 index 357bdd4d4c..0000000000 --- a/src/Dynamic/Dynamic_BooleanParameter.cdl +++ /dev/null @@ -1,88 +0,0 @@ --- Created on: 1994-01-24 --- Created by: Gilles DEBARBOUILLE --- 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. - -class BooleanParameter from Dynamic - -inherits - Parameter from Dynamic - - ---Purpose: This class describes a parameter with a boolean - -- as value. - -uses - - CString from Standard, - OStream from Standard - -is - - Create(aparameter : CString from Standard) - - ---Level: Advanced - - ---Purpose: Creates a boolean parameter with as name. - - returns mutable BooleanParameter from Dynamic; - - Create(aparameter : CString from Standard; - avalue : Boolean from Standard) - - ---Level: Advanced - - ---Purpose: Creates a boolean parameter with and - -- respectively as name and value. - - returns mutable BooleanParameter from Dynamic; - - Create(aparameter , avalue : CString from Standard) - - ---Level: Advanced - - ---Purpose: Creates a boolean parameter with as name - -- and as value. is a CString with two possible - -- values which are : "Standard_True" and "Standard_False". - - returns mutable BooleanParameter from Dynamic; - - Value(me) returns Boolean from Standard - - ---Level: Public - - ---Purpose: Returns the boolean value . - - is static; - - Value (me : mutable ; avalue : Boolean from Standard) - - ---Level: Advanced - - --- Purpose: Sets the field with the boolean value - - is static; - - Dump(me ; astream : in out OStream from Standard) - - ---Level: Internal - - ---Purpose: Useful for debugging. - - is redefined; - -fields - - thevalue : Boolean from Standard; - -end BooleanParameter; diff --git a/src/Dynamic/Dynamic_BooleanParameter.cxx b/src/Dynamic/Dynamic_BooleanParameter.cxx deleted file mode 100644 index 1dc5ea6b53..0000000000 --- a/src/Dynamic/Dynamic_BooleanParameter.cxx +++ /dev/null @@ -1,100 +0,0 @@ -// Created on: 1994-01-24 -// Created by: Gilles DEBARBOUILLE -// 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. - -// Historique : -// CRD : 03/07/97 : Portage Windows NT. - - -#include -#ifdef HAVE_CONFIG_H -# include -#endif -#ifdef HAVE_STRINGS_H -# include -#endif -#ifdef WNT -//#define strcasecmp _stricoll -#include -#endif - -//======================================================================= -//function : Dynamic_BooleanParameter -//purpose : -//======================================================================= - -Dynamic_BooleanParameter::Dynamic_BooleanParameter - (const Standard_CString aparameter) - : Dynamic_Parameter(aparameter) -{} - -//======================================================================= -//function : Dynamic_BooleanParameter -//purpose : -//======================================================================= - -Dynamic_BooleanParameter::Dynamic_BooleanParameter - (const Standard_CString aparameter, - const Standard_Boolean avalue) - : Dynamic_Parameter(aparameter) -{ - thevalue = avalue; -} - -//======================================================================= -//function : Dynamic_BooleanParameter -//purpose : -//======================================================================= - -Dynamic_BooleanParameter::Dynamic_BooleanParameter - (const Standard_CString aparameter, - const Standard_CString avalue) - : Dynamic_Parameter(aparameter) -{ - if (!strcasecmp(avalue,"Standard_True")) thevalue = Standard_True; - else if(!strcasecmp(avalue,"Standard_False")) thevalue = Standard_False; - else cout<<"BooleanParameter ("< as user name - -- and as C++ mangled name. - - Function(me : mutable ; afunction : CString from Standard) - - ---Level: Advanced - - ---Purpose: Sets the C++ mangled name of the method to the field - -- . - - is static; - - Function(me) returns AsciiString from TCollection - - ---Level: Advanced - - ---Purpose: Returns the C++ mangled name of the function. - - is static; - -fields - - thefunction : HAsciiString from TCollection; - -end CompiledMethod; diff --git a/src/Dynamic/Dynamic_CompiledMethod.cxx b/src/Dynamic/Dynamic_CompiledMethod.cxx deleted file mode 100644 index a8188c4f55..0000000000 --- a/src/Dynamic/Dynamic_CompiledMethod.cxx +++ /dev/null @@ -1,50 +0,0 @@ -// Created on: 1993-01-28 -// Created by: Gilles DEBARBOUILLE -// 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. - -#include -#include - -//======================================================================= -//function : Dynamic_CompiledMethod -//purpose : -//======================================================================= - -Dynamic_CompiledMethod::Dynamic_CompiledMethod(const Standard_CString aname, - const Standard_CString afunction) - : Dynamic_MethodDefinition(aname) -{ - thefunction = new TCollection_HAsciiString(afunction); -} - -//======================================================================= -//function : Function -//purpose : -//======================================================================= - -void Dynamic_CompiledMethod::Function(const Standard_CString afunction) -{ - thefunction = new TCollection_HAsciiString(afunction); -} - -//======================================================================= -//function : Function -//purpose : -//======================================================================= - -TCollection_AsciiString Dynamic_CompiledMethod::Function() const -{ - return thefunction->String(); -} diff --git a/src/Dynamic/Dynamic_CompositMethod.cdl b/src/Dynamic/Dynamic_CompositMethod.cdl deleted file mode 100644 index 889a8e4e57..0000000000 --- a/src/Dynamic/Dynamic_CompositMethod.cdl +++ /dev/null @@ -1,86 +0,0 @@ --- Created on: 1994-08-26 --- Created by: Gilles DEBARBOUILLE --- 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. - -class CompositMethod from Dynamic - -inherits - - MethodDefinition from Dynamic - ---Purpose: A composite method is defined as a collection of - -- method instances. This collection describes a more - -- complex program or a network of elementary - -- functions. The order of the method instances is - -- not significant. It is the references to the - -- variables which define the signature of the - -- composite method which define the precedence of - -- one method in relation with another. - -uses - - OStream from Standard, - Integer from Standard, - CString from Standard, - Method from Dynamic, - SequenceOfMethods from Dynamic - - -is - - Create(aname : CString from Standard) returns mutable CompositMethod from Dynamic; - - ---Level: Advanced - - ---Purpose: Creates a composit method with as name. - - Method(me : mutable ; amethod : Method from Dynamic) - - ---Level: Advanced - - ---Purpose: Adds , which is an elementary or a composit - -- method to . - - is static; - - NumberOfMethods(me) returns Integer from Standard - - ---Level: Advanced - - ---Purpose: Returns the number of methods referenced by the - -- composit method . - - is static; - - Method(me ; anindex : Integer from Standard) returns any Method from Dynamic - - ---Level: Advanced - - ---Purpose: Returns the method of range . - - is static; - - Dump(me ; astream : in out OStream from Standard) - - ---Level: Internal - - ---Purpose: Useful for debugging. - - is redefined; - -fields - - thesequenceofmethods : SequenceOfMethods from Dynamic; - -end CompositMethod; diff --git a/src/Dynamic/Dynamic_CompositMethod.cxx b/src/Dynamic/Dynamic_CompositMethod.cxx deleted file mode 100644 index d6c5fc45c7..0000000000 --- a/src/Dynamic/Dynamic_CompositMethod.cxx +++ /dev/null @@ -1,81 +0,0 @@ -// Created on: 1994-08-26 -// Created by: Gilles DEBARBOUILLE -// 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. - -// CRD : 15/04/97 : Passage WOK++ : Remplacement de TYPE par STANDARD_TYPE - -#include - - -//======================================================================= -//function : Dynamic_CompositMethod -//purpose : -//======================================================================= - -Dynamic_CompositMethod::Dynamic_CompositMethod(const Standard_CString aname) -: Dynamic_MethodDefinition(aname) -{ - thesequenceofmethods = new Dynamic_SequenceOfMethods(); -} - -//======================================================================= -//function : Method -//purpose : -//======================================================================= - -void Dynamic_CompositMethod::Method(const Handle(Dynamic_Method)& amethod) -{ - if(amethod->IsKind(STANDARD_TYPE(Dynamic_MethodDefinition))) - cout<<"bad argument type"<Append(amethod); -} - -//======================================================================= -//function : NumberOfMethods -//purpose : -//======================================================================= - -Standard_Integer Dynamic_CompositMethod::NumberOfMethods() const -{ - return thesequenceofmethods->Length(); -} - -//======================================================================= -//function : Method -//purpose : -//======================================================================= - -Handle(Dynamic_Method) Dynamic_CompositMethod::Method(const Standard_Integer anindex) const -{ - return thesequenceofmethods->Value(anindex); -} - -//======================================================================= -//function : Dump -//purpose : -//======================================================================= - -void Dynamic_CompositMethod::Dump(Standard_OStream& astream) const -{ - astream << "CompositMethod : " << endl; - Dynamic_MethodDefinition::Dump(astream); - astream << "Dump of Methods Instances : " << endl; - for (Standard_Integer i=1; i<= thesequenceofmethods->Length(); i++) { - astream << "Method No : " << i << endl; - thesequenceofmethods->Value(i)->Dump(astream); - astream << endl; - } -} diff --git a/src/Dynamic/Dynamic_CompositVariableInstance.cdl b/src/Dynamic/Dynamic_CompositVariableInstance.cdl deleted file mode 100644 index db79df698f..0000000000 --- a/src/Dynamic/Dynamic_CompositVariableInstance.cdl +++ /dev/null @@ -1,61 +0,0 @@ --- Created on: 1994-09-05 --- Created by: Gilles DEBARBOUILLE --- 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. - -class CompositVariableInstance from Dynamic - -inherits - - AbstractVariableInstance from Dynamic - ---Purpose: This class corresponds to the instanciation of a - -- variable group. It allows the setting of more than - -- one variable in a variable instance. It is useful - -- when a method takes a collection of homogeneous - -- objects as argument. For example a wire needs - -- edges as argument. - -uses - - Variable from Dynamic, - VariableNode from Dynamic - - -is - - Create returns mutable CompositVariableInstance from Dynamic; - - ---Level: Advanced - - ---Purpose: Creates a new empty instance of CompositVariable- - -- Instance. - - Variable(me : mutable ; avariable : Variable from Dynamic) - - ---Purpose: Sets into the collection of variable. - - is redefined; - - FirstVariableNode(me) returns VariableNode from Dynamic - - ---Purpose: Returns the first VariableNode useful to explore the - -- list of variables addressed by . - - is static; - -fields - - thefirstvariablenode : VariableNode from Dynamic; - -end CompositVariableInstance; diff --git a/src/Dynamic/Dynamic_CompositVariableInstance.cxx b/src/Dynamic/Dynamic_CompositVariableInstance.cxx deleted file mode 100644 index 712b8caf61..0000000000 --- a/src/Dynamic/Dynamic_CompositVariableInstance.cxx +++ /dev/null @@ -1,47 +0,0 @@ -// Created on: 1994-09-05 -// Created by: Gilles DEBARBOUILLE -// 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. - -#include - -//======================================================================= -//function : Dynamic_CompositVariableInstance -//purpose : -//======================================================================= - -Dynamic_CompositVariableInstance::Dynamic_CompositVariableInstance() -{} - -//======================================================================= -//function : Variable -//purpose : -//======================================================================= - -void Dynamic_CompositVariableInstance::Variable(const Handle(Dynamic_Variable)& avariable) -{ - Handle(Dynamic_VariableNode) variablenode = new Dynamic_VariableNode(avariable); - variablenode->Next(thefirstvariablenode); - thefirstvariablenode = variablenode; -} - -//======================================================================= -//function : FirstVariable -//purpose : -//======================================================================= - -Handle(Dynamic_VariableNode) Dynamic_CompositVariableInstance::FirstVariableNode() const -{ - return thefirstvariablenode; -} diff --git a/src/Dynamic/Dynamic_DynamicClass.cdl b/src/Dynamic/Dynamic_DynamicClass.cdl deleted file mode 100644 index 1523114e42..0000000000 --- a/src/Dynamic/Dynamic_DynamicClass.cdl +++ /dev/null @@ -1,110 +0,0 @@ --- Created on: 1993-01-22 --- Created by: Gilles DEBARBOUILLE --- 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. - -class DynamicClass from Dynamic - -inherits - - TShared from MMgt - ---Purpose: A dynamic class is defined as a sequence of - -- parameters and as a sequence of methods. The - -- specifications are similar to C++ classes. The - -- class has to be defined in terms of fields - -- (Parameters) and methods. An instance of the class - -- must be made to set the fields and to use the - -- functionalities. - - -uses - - OStream from Standard, - CString from Standard, - HAsciiString from TCollection, - DynamicInstance from Dynamic, - Parameter from Dynamic, - ParameterNode from Dynamic, - Method from Dynamic, - SequenceOfMethods from Dynamic - - -is - - Create(aname : CString from Standard) returns mutable DynamicClass from Dynamic; - - ---Level: Public - - ---Purpose: Creates a new empty instance of DynamicClass. - - Parameter(me : mutable ; aparameter : Parameter from Dynamic) - - ---Level: Public - - ---Purpose: Adds another parameter to the sequence of - -- parameter definitions. - - is static; - - CompiledMethod(me : mutable ; amethod , anaddress : CString from Standard) - - ---Level: Public - - ---Purpose: Adds another method to the sequence of methods. It has - -- as name and as mangled name of - -- the corresponding C++ function which must be called. - - is static; - - InterpretedMethod(me : mutable ; amethod , afile : CString from Standard) - - ---Level: Public - - ---Purpose: Adds another method to the sequence of methods. It - -- has as name and as interpreted file. - - is static; - - Method(me ; amethod : CString from Standard) returns any Method from Dynamic - - ---Level: Public - - ---Purpose: Returns a reference to the method object identified by - -- the string . - - is virtual; - - Instance(me) returns mutable DynamicInstance from Dynamic - - ---Level: Public - - ---Purpose: Returns an instance object of this class. - - is virtual; - - Dump(me ; astream : in out OStream from Standard) - - ---Level: Internal - - ---Purpose: useful for debugging. - - is virtual; - -fields - - thename : HAsciiString from TCollection; - thefirstparameternode : ParameterNode from Dynamic; - thesequenceofmethods : SequenceOfMethods from Dynamic; - -end ; diff --git a/src/Dynamic/Dynamic_DynamicClass.cxx b/src/Dynamic/Dynamic_DynamicClass.cxx deleted file mode 100644 index dee6a69bc8..0000000000 --- a/src/Dynamic/Dynamic_DynamicClass.cxx +++ /dev/null @@ -1,137 +0,0 @@ -// Created on: 1993-01-22 -// Created by: Gilles DEBARBOUILLE -// 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. - -#include -#include -#include -#include -#include -#include -#include - - -//======================================================================= -//function : Dynamic_DynamicClass -//purpose : -//======================================================================= - -Dynamic_DynamicClass::Dynamic_DynamicClass(const Standard_CString aname) -{ - thename = new TCollection_HAsciiString(aname); - thesequenceofmethods = new Dynamic_SequenceOfMethods(); -} - -//======================================================================= -//function : Parameter -//purpose : -//======================================================================= - -void Dynamic_DynamicClass::Parameter(const Handle(Dynamic_Parameter)& aparameter) -{ - Handle(Dynamic_ParameterNode) parameternode = new Dynamic_ParameterNode(aparameter); - parameternode->Next(thefirstparameternode); - thefirstparameternode = parameternode; -} - -//======================================================================= -//function : CompiledMethod -//purpose : -//======================================================================= - -void Dynamic_DynamicClass::CompiledMethod(const Standard_CString amethod, - const Standard_CString anaddress) -{ - TCollection_AsciiString string = thename->String(); - string = string + "_" + amethod; - Handle(Dynamic_CompiledMethod) method = new Dynamic_CompiledMethod(string.ToCString(),anaddress); - thesequenceofmethods->Append(method); -} - -//======================================================================= -//function : InterpretedMethod -//purpose : -//======================================================================= - -void Dynamic_DynamicClass::InterpretedMethod(const Standard_CString amethod, - const Standard_CString afile) -{ - TCollection_AsciiString string = thename->String(); - string = string + "_" + amethod; - Handle(Dynamic_InterpretedMethod) method = - new Dynamic_InterpretedMethod(string.ToCString(),afile); - thesequenceofmethods->Append(method); -} - -//======================================================================= -//function : Method -//purpose : -//======================================================================= - -Handle(Dynamic_Method) Dynamic_DynamicClass::Method(const Standard_CString amethod) const -{ - Standard_Integer index; - TCollection_AsciiString methodname(amethod); - Handle(Dynamic_Method) method; - Handle(Dynamic_Method) nullmethod; - Handle(Dynamic_SequenceOfMethods) sequenceofmethods = thesequenceofmethods; - - if(methodname.Search("_") == -1) - { - methodname = thename->String(); - methodname = methodname + "_" + amethod; - } - - for(index=1;index<=thesequenceofmethods->Length();index++) - { - method = thesequenceofmethods->Value(index); - if(method->Type() == methodname) return method; - } - return nullmethod; -} - -//======================================================================= -//function : Instance -//purpose : -//======================================================================= - -Handle(Dynamic_DynamicInstance) Dynamic_DynamicClass::Instance() const -{ - Handle(Dynamic_DynamicInstance) instance = new Dynamic_DynamicInstance(); - Handle(Dynamic_DynamicClass) me(this); - - Handle(Dynamic_ParameterNode) parameternode; - - parameternode = thefirstparameternode; - - while(!parameternode.IsNull()) - { - instance->Parameter(parameternode->Object()); - parameternode = parameternode->Next(); - } - - instance->Class(me); - - return instance; -} - -//======================================================================= -//function : Dump -//purpose : -//======================================================================= - -//void Dynamic_DynamicClass::Dump(Standard_OStream& astream) const -void Dynamic_DynamicClass::Dump(Standard_OStream& ) const -{} diff --git a/src/Dynamic/Dynamic_DynamicDerivedClass.cdl b/src/Dynamic/Dynamic_DynamicDerivedClass.cdl deleted file mode 100644 index a74abcf899..0000000000 --- a/src/Dynamic/Dynamic_DynamicDerivedClass.cdl +++ /dev/null @@ -1,76 +0,0 @@ --- Created on: 1993-02-05 --- Created by: Gilles DEBARBOUILLE --- 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. - -class DynamicDerivedClass from Dynamic - - -inherits - - DynamicClass from Dynamic - - ---Purpose: The object of this class is to allow, as in the - -- C++ language, the possibility to define a - -- DynamicDerivedClass which inherits from one or - -- more DynamicClass. - -uses - - CString from Standard, - Method from Dynamic, - DynamicInstance from Dynamic, - SequenceOfClasses from Dynamic - -is - - Create(aname : CString from Standard) returns mutable DynamicDerivedClass from Dynamic; - - ---Level: Public - - ---Purpose: Creates a new instance of this class with as name. - - AddClass(me : mutable ; aclass : any DynamicClass from Dynamic) - - ---Level: Public - - ---Purpose: Adds another class to the sequence of derived - -- classes. - - is static; - - Method(me ; amethod : CString from Standard) returns any Method from Dynamic - - ---Level: Public - - ---Purpose: Starting with the name of a method, this redefined - -- method searches for the right method object in the - -- sequence of methods of the derived class and in all - -- the inherited classes. - - is redefined; - - Instance(me) returns mutable DynamicInstance from Dynamic - - ---Level: Public - - ---Purpose: Defines an instance of this class definition. - - is redefined; - -fields - - thesequenceofclasses : SequenceOfClasses from Dynamic; - -end DynamicDerivedClass; diff --git a/src/Dynamic/Dynamic_DynamicDerivedClass.cxx b/src/Dynamic/Dynamic_DynamicDerivedClass.cxx deleted file mode 100644 index 10f5efb3fe..0000000000 --- a/src/Dynamic/Dynamic_DynamicDerivedClass.cxx +++ /dev/null @@ -1,77 +0,0 @@ -// Created on: 1993-02-05 -// Created by: Gilles DEBARBOUILLE -// 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. - -#include - -//======================================================================= -//function : Dynamic_DynamicDerivedClass -//purpose : -//======================================================================= - -Dynamic_DynamicDerivedClass::Dynamic_DynamicDerivedClass(const Standard_CString aname) - : Dynamic_DynamicClass(aname) -{ - thesequenceofclasses = new Dynamic_SequenceOfClasses(); -} - -//======================================================================= -//function : AddClass -//purpose : -//======================================================================= - -void Dynamic_DynamicDerivedClass::AddClass(const Handle(Dynamic_DynamicClass)& aclass) -{ - thesequenceofclasses->Append(aclass); -} - -//======================================================================= -//function : Method -//purpose : -//======================================================================= - -Handle(Dynamic_Method) Dynamic_DynamicDerivedClass::Method - (const Standard_CString amethod) const -{ - Standard_Integer index; - Handle(Dynamic_Method) method = Dynamic_DynamicClass::Method(amethod); - - if(method.IsNull()) - { - for(index=1;index<=thesequenceofclasses->Length();index++) - { - method = (thesequenceofclasses->Value(index))->Method(amethod); - if(!method.IsNull()) break; - } - } - return method; -} - -//======================================================================= -//function : Instance -//purpose : -//======================================================================= - -Handle(Dynamic_DynamicInstance) Dynamic_DynamicDerivedClass::Instance() const -{ - Standard_Integer index; - Handle(Dynamic_DynamicInstance) instance = Dynamic_DynamicClass::Instance(); - - for(index=1;index<=thesequenceofclasses->Length();index++) - { - ((thesequenceofclasses->Value(index))->Instance())->Parameter(instance); - } - return instance; -} diff --git a/src/Dynamic/Dynamic_DynamicInstance.cdl b/src/Dynamic/Dynamic_DynamicInstance.cdl deleted file mode 100644 index 16a7dd10d0..0000000000 --- a/src/Dynamic/Dynamic_DynamicInstance.cdl +++ /dev/null @@ -1,131 +0,0 @@ --- Created on: 1993-01-22 --- Created by: Gilles DEBARBOUILLE --- 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. - -class DynamicInstance from Dynamic - -inherits - - TShared from MMgt - ---Purpose: A dynamic instance is a reference to the dynamic - -- class and a sequence of parameters which is the - -- complete listing of all the parameters of all the - -- inherited classes. - - -uses - - CString from Standard, - Integer from Standard, - Real from Standard, - DynamicClass from Dynamic, - Parameter from Dynamic, - ParameterNode from Dynamic - - - -is - - Create returns mutable DynamicInstance from Dynamic; - - ---Level: Internal - - ---Purpose: Creates an empty instance of this class. - - Parameter(me : mutable ; aparameter : any Parameter from Dynamic) - - ---Level: Internal - - ---Purpose: Adds to the sequence of parameters of - -- . - - is static; - - Parameter(me ; aninstance : mutable DynamicInstance from Dynamic) - - ---Level: Internal - - ---Purpose: Adds all the parameters of , to the sequence of - -- parameters of . - - is static; - - Parameter(me ; aparameter : CString from Standard; avalue : Integer from Standard) - - ---Level: Public - - ---Purpose: Puts the integer value into the parameter - -- object identified by the string . - - is static; - - Parameter(me ; aparameter : CString from Standard ; avalue : Real from Standard) - - ---Level: Public - - ---Purpose: Puts the real value into the parameter - -- object identified by the string . - - is static; - - Parameter(me ; aparameter : CString from Standard; avalue : CString from Standard) - - ---Level: Public - - ---Purpose: Puts the string into the parameter - -- object identified by the string . - - is static; - - Parameter(me ; aparameter : CString from Standard; avalue : any DynamicInstance from Dynamic) - - ---Level: Public - - ---Purpose: Puts the dynamic instance into the parameter - -- object identified by the string . - - is static; - - Parameter(me ; aparameter : CString from Standard) returns any Parameter from Dynamic - - ---Level: Public - - ---Purpose: Searches and returns the parameter object identified - -- by the string . - - is static; - - Class(me : mutable ; aclass : any DynamicClass from Dynamic) - - ---Level: Internal - - ---Purpose: Sets the reference of the class. - - is static; - - Execute(me ; amethod : CString from Standard) - - ---Level: Public - - ---Purpose: Calls the method identified by the string . - - is static; - -fields - - thedynamicclass : DynamicClass from Dynamic; - thefirstparameternode : ParameterNode from Dynamic; - -end ; diff --git a/src/Dynamic/Dynamic_DynamicInstance.cxx b/src/Dynamic/Dynamic_DynamicInstance.cxx deleted file mode 100644 index 729f0852e2..0000000000 --- a/src/Dynamic/Dynamic_DynamicInstance.cxx +++ /dev/null @@ -1,181 +0,0 @@ -// Created on: 1993-01-22 -// Created by: Gilles DEBARBOUILLE -// 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. - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -//======================================================================= -//function : Dynamic_DynamicInstance -//purpose : -//======================================================================= - -Dynamic_DynamicInstance::Dynamic_DynamicInstance() -{ -} - -//======================================================================= -//function : Parameter -//purpose : -//======================================================================= - -void Dynamic_DynamicInstance::Parameter - (const Handle(Dynamic_DynamicInstance)& aninstance) const -{ - Handle(Dynamic_ParameterNode) parameternode = thefirstparameternode; - - while(!parameternode.IsNull()) - { - aninstance->Parameter(parameternode->Object()); - parameternode = parameternode->Next(); - } -} - -//======================================================================= -//function : Parameter -//purpose : -//======================================================================= - -void Dynamic_DynamicInstance::Parameter(const Handle(Dynamic_Parameter)& aparameter) -{ - Handle(Dynamic_ParameterNode) parameternode = new Dynamic_ParameterNode(aparameter); - parameternode->Next(thefirstparameternode); - thefirstparameternode = parameternode; -} - -//======================================================================= -//function : Parameter -//purpose : -//======================================================================= - -void Dynamic_DynamicInstance::Parameter(const Standard_CString aparameter, - const Standard_Integer avalue) const -{ - Handle(Dynamic_IntegerParameter) parameter = - Handle(Dynamic_IntegerParameter)::DownCast(Parameter(aparameter)); - parameter->Value(avalue); -} - -//======================================================================= -//function : Parameter -//purpose : -//======================================================================= - -void Dynamic_DynamicInstance::Parameter(const Standard_CString aparameter, - const Standard_Real avalue) const -{ - Handle(Dynamic_RealParameter) parameter = - Handle(Dynamic_RealParameter)::DownCast(Parameter(aparameter)); - parameter->Value(avalue); -} - -//======================================================================= -//function : Parameter -//purpose : -//======================================================================= - -void Dynamic_DynamicInstance::Parameter(const Standard_CString aparameter, - const Standard_CString avalue) const -{ - Handle(Dynamic_StringParameter) parameter = - Handle(Dynamic_StringParameter)::DownCast(Parameter(aparameter)); - parameter->Value(avalue); -} - -//======================================================================= -//function : Parameter -//purpose : -//======================================================================= - -void Dynamic_DynamicInstance::Parameter - (const Standard_CString aparameter, - const Handle(Dynamic_DynamicInstance)& avalue) const -{ - Handle(Dynamic_InstanceParameter) parameter = - Handle(Dynamic_InstanceParameter)::DownCast(Parameter(aparameter)); - parameter->Value(avalue); -} - -//======================================================================= -//function : Parameter -//purpose : -//======================================================================= - -Handle(Dynamic_Parameter) Dynamic_DynamicInstance::Parameter - (const Standard_CString aparameter) const -{ - Handle(Dynamic_Parameter) parameter; - Handle(Dynamic_ParameterNode) parameternode = thefirstparameternode; - - while(!parameternode.IsNull()) - { - TCollection_AsciiString aStr(aparameter); - parameter = parameternode->Object(); - if(parameter->Name() == aStr) return parameter; - parameternode = parameternode->Next(); - } - return parameter; -} - -//======================================================================= -//function : Class -//purpose : -//======================================================================= - -void Dynamic_DynamicInstance::Class(const Handle(Dynamic_DynamicClass)& aclass) -{ - thedynamicclass = aclass; -} - -//======================================================================= -//function : Execute -//purpose : -//======================================================================= - -//extern source(Standard_Integer argc, char** argv); - -void Dynamic_DynamicInstance::Execute(const Standard_CString amethod) const -{ - Handle(Dynamic_Method) method = thedynamicclass->Method(amethod); - - if(method->IsKind(STANDARD_TYPE(Dynamic_CompiledMethod))) - { - Handle(Dynamic_DynamicInstance) me(this) ; - Handle(Dynamic_CompiledMethod) method_1 = Handle(Dynamic_CompiledMethod)::DownCast(method); - typedef void (*function)(const Handle(Dynamic_DynamicInstance)&); - -// ((function)((*(Handle(Dynamic_CompiledMethod)*)&method)->Function().ToCString()))(me); - ((function)(method_1->Function().ToCString()))(me); - } - else - { -/* Standard_Integer argc = 2; - char* argv[2]; - argv[0] = "source"; - argv[1] = (*(Handle(Dynamic_InterpretedMethod)*)&method)->Function(); - source(argc,argv);*/ - } -} - diff --git a/src/Dynamic/Dynamic_FuzzyClass.cdl b/src/Dynamic/Dynamic_FuzzyClass.cdl deleted file mode 100644 index ab6d0b1469..0000000000 --- a/src/Dynamic/Dynamic_FuzzyClass.cdl +++ /dev/null @@ -1,212 +0,0 @@ --- Created on: 1993-01-22 --- Created by: Gilles DEBARBOUILLE --- 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. - -deferred class FuzzyClass from Dynamic - -inherits - - TShared from MMgt - - ---Purpose: This class is the root class to dynamically define - -- objects of a given type but with various - -- definitions. This root class contains a parameter - -- list which describes in the definition context all - -- the useful information and in the instance context - -- only the redefined values. This class is deferred - -- because no instance has to be created. - - - uses - - CString from Standard, - Integer from Standard, - Real from Standard, - Boolean from Standard, - OStream from Standard, - Parameter from Dynamic, - ParameterNode from Dynamic, - AsciiString from TCollection - -is - - Initialize; - - ---Level: Internal - - ---Purpose: Creates a FuzzyClass. - - Type(me) returns AsciiString from TCollection - - ---Level: Public - - ---Purpose: This deferred method must returns the type of the - -- object. If the instance is of the type FuzzyDefinition - -- the method simply returns the field . If the - -- instance is of the type FuzzyInstance the method calls - -- the Type method on the true definition. - - is deferred; - - FirstParameter(me) returns ParameterNode from Dynamic - - ---Level: Public - - ---Purpose: Returns the head of the list of parameters. For the - -- FuzzyDefinition class this method returns the head of - -- the exaustive list of parameters defining the object - -- and for the FuzzyInstance it just returns the head of - -- the overloaded values. - - is static; - - Parameter(me ; aparameter : CString from Standard) returns Boolean from Standard - - ---Level: Public - - ---Purpose: Returns true if there is a parameter with - -- as name, false otherwise. - - is static; - - Parameter(me : mutable ; aparameter : any Parameter from Dynamic) - - ---Level: Public - - ---Purpose: Adds another parameter to the sequence of - -- parameters. - - is static; - - Parameter(me : mutable ; aparameter : CString from Standard; avalue : Boolean from Standard) - - ---Level: Public - - ---Purpose: Adds to the instance the parameter - -- with the boolean value . - - is virtual; - - Parameter(me : mutable ; aparameter : CString from Standard; avalue : Integer from Standard) - - ---Level: Public - - ---Purpose: Adds to the instance the parameter - -- with the integer value . - - is virtual; - - Parameter(me : mutable ; aparameter : CString from Standard; avalue : Real from Standard) - - ---Level: Public - - ---Purpose: Adds to the instance the parameter - -- with the real value . - - is virtual; - - Parameter(me : mutable ; aparameter : CString from Standard; astring : CString from Standard) - - ---Level: Public - - ---Purpose: Adds to the instance the parameter - -- with the string . - - is virtual; - - Parameter(me : mutable ; aparameter : CString from Standard; anobject : any Transient) - - ---Level: Public - - ---Purpose: Adds to the instance the parameter - -- with the object value . - - is virtual; - - Value(me ; aparameter : CString from Standard; - avalue : out Boolean from Standard) returns Boolean from Standard - - ---Level: Public - - ---Purpose: Returns True, if there is a parameter - -- previously stored in the instance and there is - -- the corresponding boolean value in the output argument - -- , False otherwise. - - is virtual; - - Value(me ; aparameter : CString from Standard; - avalue : out Integer from Standard) - returns Boolean from Standard - - ---Level: Public - - ---Purpose: Returns True, if there is a parameter - -- previously stored in the instance and there is - -- the corresponding integer value in the output argument - -- , False otherwise. - - is virtual; - - Value(me ; aparameter : CString from Standard; - avalue : out Real) - returns Boolean from Standard - - ---Level: Public - - ---Purpose: Returns True, if there is a parameter - -- previously stored in the instance and there is - -- the corresponding real value in the output argument - -- , False otherwise. - - is virtual; - - Value(me ; aparameter : CString from Standard; avalue : out AsciiString from TCollection) - returns Boolean from Standard - - ---Level: Public - - ---Purpose: Returns True, if there is a parameter - -- previously stored in the instance and there is - -- the corresponding string in the output argument - -- , False otherwise. - - is virtual; - - Value(me ; aparameter : CString from Standard; avalue : out any Transient) - returns Boolean from Standard - - ---Level: Public - - ---Purpose: Returns True, if there is a parameter - -- previously stored in the instance and there is - -- the corresponding object value in the output argument - -- , False otherwise. - - is virtual; - - Dump(me ; astream : in out OStream from Standard) - - ---Level: Internal - - ---Purpose: Useful for debugging. - - is virtual; - -fields - - thefirstparameternode : ParameterNode from Dynamic; - -end FuzzyClass; diff --git a/src/Dynamic/Dynamic_FuzzyClass.cxx b/src/Dynamic/Dynamic_FuzzyClass.cxx deleted file mode 100644 index f277f42713..0000000000 --- a/src/Dynamic/Dynamic_FuzzyClass.cxx +++ /dev/null @@ -1,360 +0,0 @@ -// Created on: 1993-01-22 -// Created by: Gilles DEBARBOUILLE -// 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. - -#include -#include -#include -#include -#include -#include -#include - - -//======================================================================= -//function : Dynamic_FuzzyClass -//purpose : -//======================================================================= - -Dynamic_FuzzyClass::Dynamic_FuzzyClass() -{} - - -//======================================================================= -//function : FirstParameter -//purpose : -//======================================================================= - -Handle(Dynamic_ParameterNode) Dynamic_FuzzyClass::FirstParameter() const -{ - return thefirstparameternode; -} - -//======================================================================= -//function : Parameter -//purpose : -//======================================================================= - -Standard_Boolean Dynamic_FuzzyClass::Parameter(const Standard_CString aparameter) const -{ - Handle(Dynamic_Parameter) parameter; - Handle(Dynamic_ParameterNode) definition = thefirstparameternode; - - while(!definition.IsNull()) - { - parameter = definition->Object(); - if(parameter->Name() == aparameter) return Standard_True; - definition = definition->Next(); - } - return Standard_False; -} - -//======================================================================= -//function : Parameter -//purpose : -//======================================================================= - -void Dynamic_FuzzyClass::Parameter(const Handle(Dynamic_Parameter)& aparameter) -{ - Handle(Dynamic_ParameterNode) parameternode = new Dynamic_ParameterNode(aparameter); - parameternode->Next(thefirstparameternode); - thefirstparameternode = parameternode; -} - -//======================================================================= -//function : Parameter -//purpose : -//======================================================================= - -void Dynamic_FuzzyClass::Parameter(const Standard_CString aparameter, - const Standard_Boolean avalue) -{ - Handle(Dynamic_ParameterNode) parameternode; - Handle(Dynamic_Parameter) parameter; - Handle(Dynamic_BooleanParameter) booleanparameter; - - parameternode = thefirstparameternode; - while(!parameternode.IsNull()) - { - parameter = parameternode->Object(); - if(parameter->Name() == aparameter) - { - Handle(Dynamic_BooleanParameter)::DownCast(parameter)->Value(avalue); - return; - } - parameternode = parameternode->Next(); - } - booleanparameter = new Dynamic_BooleanParameter(aparameter,avalue); - Parameter(booleanparameter); -} - -//======================================================================= -//function : Parameter -//purpose : -//======================================================================= - -void Dynamic_FuzzyClass::Parameter(const Standard_CString aparameter, - const Standard_Integer avalue) -{ - Handle(Dynamic_ParameterNode) parameternode; - Handle(Dynamic_Parameter) parameter; - Handle(Dynamic_IntegerParameter) integerparameter; - - parameternode = thefirstparameternode; - while(!parameternode.IsNull()) - { - parameter = parameternode->Object(); - if(parameter->Name() == aparameter) - { - Handle(Dynamic_IntegerParameter)::DownCast(parameter)->Value(avalue); - return; - } - parameternode = parameternode->Next(); - } - integerparameter = new Dynamic_IntegerParameter(aparameter,avalue); - Parameter(integerparameter); -} - -//======================================================================= -//function : Parameter -//purpose : -//======================================================================= - -void Dynamic_FuzzyClass::Parameter(const Standard_CString aparameter, - const Standard_Real avalue) -{ - Handle(Dynamic_ParameterNode) parameternode; - Handle(Dynamic_Parameter) parameter; - Handle(Dynamic_RealParameter) realparameter; - - parameternode = thefirstparameternode; - while(!parameternode.IsNull()) - { - parameter = parameternode->Object(); - if(parameter->Name() == aparameter) - { - Handle(Dynamic_RealParameter)::DownCast(parameter)->Value(avalue); - return; - } - parameternode = parameternode->Next(); - } - realparameter = new Dynamic_RealParameter(aparameter,avalue); - Parameter(realparameter); -} - -//======================================================================= -//function : Parameter -//purpose : -//======================================================================= - -void Dynamic_FuzzyClass::Parameter(const Standard_CString aparameter, - const Standard_CString astring) -{ - Handle(Dynamic_ParameterNode) parameternode; - Handle(Dynamic_Parameter) parameter; - Handle(Dynamic_StringParameter) stringparameter; - - parameternode = thefirstparameternode; - while(!parameternode.IsNull()) - { - parameter = parameternode->Object(); - if(parameter->Name() == aparameter) - { - Handle(Dynamic_StringParameter)::DownCast(parameter)->Value(astring); - return; - } - parameternode = parameternode->Next(); - } - stringparameter = new Dynamic_StringParameter(aparameter,astring); - Parameter(stringparameter); -} - -//======================================================================= -//function : Parameter -//purpose : -//======================================================================= - -void Dynamic_FuzzyClass::Parameter(const Standard_CString aparameter, - const Handle(Standard_Transient)& anobject) -{ - Handle(Dynamic_ParameterNode) parameternode; - Handle(Dynamic_Parameter) parameter; - Handle(Dynamic_ObjectParameter) objectparameter; - - parameternode = thefirstparameternode; - while(!parameternode.IsNull()) - { - parameter = parameternode->Object(); - if(parameter->Name() == aparameter) - { - Handle(Dynamic_ObjectParameter)::DownCast(parameter)->Value(anobject); - return; - } - parameternode = parameternode->Next(); - } - objectparameter = new Dynamic_ObjectParameter(aparameter,anobject); - Parameter(objectparameter); -} - -//======================================================================= -//function : Value -//purpose : -//======================================================================= - -Standard_Boolean Dynamic_FuzzyClass::Value(const Standard_CString aparameter, - Standard_Boolean& avalue) const -{ - Handle(Dynamic_ParameterNode) parameternode; - Handle(Dynamic_Parameter) parameter; - - parameternode = thefirstparameternode; - - while(!parameternode.IsNull()) - { - parameter = parameternode->Object(); - if(parameter->Name() == aparameter) - { - avalue = (*(Handle(Dynamic_BooleanParameter)*)¶meter)->Value(); - return Standard_True; - } - parameternode = parameternode->Next(); - } - - return Standard_False; -} - -//======================================================================= -//function : Value -//purpose : -//======================================================================= - -Standard_Boolean Dynamic_FuzzyClass::Value(const Standard_CString aparameter, - Standard_Integer& avalue) const -{ - Handle(Dynamic_ParameterNode) parameternode; - Handle(Dynamic_Parameter) parameter; - - parameternode = thefirstparameternode; - - while(!parameternode.IsNull()) - { - parameter = parameternode->Object(); - if(parameter->Name() == aparameter) - { - avalue = (*(Handle(Dynamic_IntegerParameter)*)¶meter)->Value(); - return Standard_True; - } - parameternode = parameternode->Next(); - } - - return Standard_False; -} - -//======================================================================= -//function : Value -//purpose : -//======================================================================= - -Standard_Boolean Dynamic_FuzzyClass::Value(const Standard_CString aparameter, - Standard_Real& avalue) const -{ - Handle(Dynamic_ParameterNode) parameternode; - Handle(Dynamic_Parameter) parameter; - - parameternode = thefirstparameternode; - - while(!parameternode.IsNull()) - { - parameter = parameternode->Object(); - if(parameter->Name() == aparameter) - { - avalue = (*(Handle(Dynamic_RealParameter)*)¶meter)->Value(); - return Standard_True; - } - parameternode = parameternode->Next(); - } - - return Standard_False; -} - -//======================================================================= -//function : Value -//purpose : -//======================================================================= - -Standard_Boolean Dynamic_FuzzyClass::Value(const Standard_CString aparameter, - TCollection_AsciiString& avalue) const -{ - Handle(Dynamic_ParameterNode) parameternode; - Handle(Dynamic_Parameter) parameter; - - parameternode = thefirstparameternode; - - while(!parameternode.IsNull()) - { - parameter = parameternode->Object(); - if(parameter->Name() == aparameter) - { - avalue = (*(Handle(Dynamic_StringParameter)*)¶meter)->Value(); - return Standard_True; - } - parameternode = parameternode->Next(); - } - - return Standard_False; -} - -//======================================================================= -//function : Value -//purpose : -//======================================================================= - -Standard_Boolean Dynamic_FuzzyClass::Value(const Standard_CString aparameter, - Handle(Standard_Transient)& anobject) const -{ - Handle(Dynamic_ParameterNode) parameternode; - Handle(Dynamic_Parameter) parameter; - - parameternode = thefirstparameternode; - - while(!parameternode.IsNull()) - { - parameter = parameternode->Object(); - if(parameter->Name() == aparameter) - { - anobject = (*(Handle(Dynamic_ObjectParameter)*)¶meter)->Value(); - return Standard_True; - } - parameternode = parameternode->Next(); - } - - return Standard_False; -} - -//======================================================================= -//function : Dump -//purpose : -//======================================================================= - -//void Dynamic_FuzzyClass::Dump(Standard_OStream& astream) const -void Dynamic_FuzzyClass::Dump(Standard_OStream& ) const -{} - - - - - - - diff --git a/src/Dynamic/Dynamic_FuzzyDefinition.cdl b/src/Dynamic/Dynamic_FuzzyDefinition.cdl deleted file mode 100644 index e82e0097c8..0000000000 --- a/src/Dynamic/Dynamic_FuzzyDefinition.cdl +++ /dev/null @@ -1,65 +0,0 @@ --- Created on: 1993-01-22 --- Created by: Gilles DEBARBOUILLE --- 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. - -class FuzzyDefinition from Dynamic -inherits - - FuzzyClass from Dynamic - - ---Purpose: It is the class useful for setting a particular - -- definition of an object. This definition is - -- caracterized by a collection of parameters. Each - -- parameter is identified by its name, the type of - -- its referenced value and if necessary a default - -- value. - -uses - - OStream from Standard, - CString from Standard, - HAsciiString from TCollection, - AsciiString from TCollection - - -is - - Create(aname : CString from Standard) returns mutable FuzzyDefinition from Dynamic; - - ---Level: Public - - ---Purpose: Creates a FuzzyDefinition with as type. - - Type(me) returns AsciiString from TCollection - - ---Level: Public - - ---Purpose: Returns the type of object. - - is redefined; - - Dump(me ; astream : in out OStream from Standard) - - ---Level: Internal - - ---Purpose: Useful for debugging. - - is redefined; - -fields - - thename : HAsciiString from TCollection; - -end FuzzyDefinition; diff --git a/src/Dynamic/Dynamic_FuzzyDefinition.cxx b/src/Dynamic/Dynamic_FuzzyDefinition.cxx deleted file mode 100644 index ad7120059f..0000000000 --- a/src/Dynamic/Dynamic_FuzzyDefinition.cxx +++ /dev/null @@ -1,48 +0,0 @@ -// Created on: 1993-01-22 -// Created by: Gilles DEBARBOUILLE -// 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. - -#include -#include - - -//======================================================================= -//function : Dynamic_FuzzyDefinition -//purpose : -//======================================================================= - -Dynamic_FuzzyDefinition::Dynamic_FuzzyDefinition(const Standard_CString aname) -{ - thename = new TCollection_HAsciiString(aname); -} - -//======================================================================= -//function : Type -//purpose : -//======================================================================= - -TCollection_AsciiString Dynamic_FuzzyDefinition::Type() const -{ - return thename->String(); -} - -//======================================================================= -//function : Dump -//purpose : -//======================================================================= - -//void Dynamic_FuzzyDefinition::Dump(Standard_OStream& astream) const -void Dynamic_FuzzyDefinition::Dump(Standard_OStream& ) const -{} diff --git a/src/Dynamic/Dynamic_FuzzyDefinitionsDictionary.cdl b/src/Dynamic/Dynamic_FuzzyDefinitionsDictionary.cdl deleted file mode 100644 index 50d19f7aaa..0000000000 --- a/src/Dynamic/Dynamic_FuzzyDefinitionsDictionary.cdl +++ /dev/null @@ -1,128 +0,0 @@ --- Created on: 1992-06-22 --- Created by: Gilles DEBARBOUILLE --- 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. - -deferred class FuzzyDefinitionsDictionary from Dynamic - -inherits - - TShared from MMgt - - ---Purpose: This class groups in a dictionary all of the - -- various definitions of an object. It also allows - -- the sharing of the same definition by more than - -- one FuzzyInstance to preserve a global coherence - -- and also to manage the memory. To use this class - -- an inheritance is necessary with perhaps the - -- overload of the Switch method if the parameter - -- types are not of the type BooleanParameter, - -- IntegerParameter, RealParameter and - -- StringParameter. - -uses - - OStream from Standard, - Integer from Standard, - Boolean from Standard, - CString from Standard, - HAsciiString from TCollection, - Parameter from Dynamic, - SequenceOfFuzzyDefinitions from Dynamic, - FuzzyClass from Dynamic - -is - - Initialize; - - ---Level: Internal - - ---Purpose: Deferred constructor of the class. - - Creates(me : mutable ; afilename : CString from Standard) - - ---Level: Internal - - ---Purpose: Starting with a file named , fills the - -- dictionary with all the wishes definitions. - - is static; - - Switch(me ; aname , atype , avalue : CString from Standard) - - ---Level: Internal - - ---Purpose: This virtual method allows the user to add recognition - -- of its own parameters when reading the file to fill - -- the dictionary. - - returns Parameter from Dynamic - - is virtual; - - Definition(me ; atype : CString from Standard - ; adefinition : out FuzzyClass from Dynamic) returns Boolean from Standard - - ---Level: Public - - ---Purpose: Returns from the dictionary in the out variable - -- a reference to the right instance of the - -- definition identified by its type . The method - -- returns true if the definition exist, false otherwise. - - is static; - - UpToDate(me) returns Boolean from Standard - - ---Level: Advanced - - ---Purpose: Returns true if there has been no modification of the - -- file fuzzyclasses.dat since the creation of the - -- dictionary object, false otherwise. - - is static; - - NumberOfDefinitions(me) returns Integer from Standard - - ---Level: Public - - ---Purpose: Returns the number of definitions stored in the - -- dictionary. - - is static; - - Definition(me ; anindex : Integer from Standard) returns any FuzzyClass from Dynamic - - ---Level: Public - - ---Purpose: Returns a reference on the definition identified by - -- the index . - - is static; - - Dump(me ; astream : in out OStream from Standard) - - ---Level: Internal - - ---Purpose: Useful for debugging. - - is static; - -fields - - thefilename : HAsciiString from TCollection; - thetime : Time from Standard; - thesequenceoffuzzydefinitions : SequenceOfFuzzyDefinitions from Dynamic; - -end FuzzyDefinitionsDictionary; diff --git a/src/Dynamic/Dynamic_FuzzyDefinitionsDictionary.cxx b/src/Dynamic/Dynamic_FuzzyDefinitionsDictionary.cxx deleted file mode 100644 index 7af89635d7..0000000000 --- a/src/Dynamic/Dynamic_FuzzyDefinitionsDictionary.cxx +++ /dev/null @@ -1,266 +0,0 @@ -// Created on: 1992-06-24 -// Created by: Gilles DEBARBOUILLE -// 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. - -// CRD : 03/07/97 : Porting Windows NT. - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifdef HAVE_CONFIG_H -# include -#endif - -#include - -#ifdef HAVE_SYS_TYPES_H -# include -#endif - -#if defined (HAVE_SYS_STAT_H) || defined (WNT) -# include -#endif - -#ifdef HAVE_STRINGS_H -# include -#endif - -#ifdef WNT -//#define strcasecmp _stricoll -#define stat _stat -#endif - -//======================================================================= -//function : Dynamic_FuzzyDefinitionsDictionary -//purpose : -//======================================================================= - -Dynamic_FuzzyDefinitionsDictionary::Dynamic_FuzzyDefinitionsDictionary() -{ -} - -//======================================================================= -//function : Creates -//purpose : -//======================================================================= - -void Dynamic_FuzzyDefinitionsDictionary::Creates(const Standard_CString afilename) -{ - Standard_Integer fr,i,begin,end,endline; - char line[256]; - char name[81]; - char type[81]; - char value[81],value1[81],value2[81],value3[81]; - Handle(Dynamic_FuzzyDefinition) fuzzydefinition; - Handle(Dynamic_Parameter) parameter; - - struct stat buf; - - ifstream file(afilename); - if(!file) - { - cout<<"unable to open "<= 0 && ( line[i] == ' ' || !line[i]))line[i--] = 0; - fr = i+1; - if(fr <= 1)continue; - - if(line[0] != ' ') - { - fuzzydefinition = new Dynamic_FuzzyDefinition(line); - thesequenceoffuzzydefinitions->Append(fuzzydefinition); - } - else - { - begin = end = 0; - for(i=0; iParameter(new Dynamic_BooleanParameter(name,value)); - - else if(!strcasecmp(type,"Standard_Integer")) - fuzzydefinition->Parameter(new Dynamic_IntegerParameter(name,atoi(value))); - - else if(!strcasecmp(type,"Standard_Real")) - fuzzydefinition->Parameter(new Dynamic_RealParameter(name,Atof(value))); - - else if(!strcasecmp(type,"Standard_CString")) - fuzzydefinition->Parameter(new Dynamic_StringParameter(name,value)); - - else - { - parameter = Switch(name,type,value); - if(!parameter.IsNull())fuzzydefinition->Parameter(parameter); - } - - } - } - file.close(); -} - -//======================================================================= -//function : Definition -//purpose : -//======================================================================= - -Standard_Boolean Dynamic_FuzzyDefinitionsDictionary::Definition - (const Standard_CString atype, - Handle(Dynamic_FuzzyClass)& adefinition) const -{ - Handle(Dynamic_FuzzyClass) definition; - - for(Standard_Integer index=1; index<=thesequenceoffuzzydefinitions->Length(); index++) - { - definition = thesequenceoffuzzydefinitions->Value(index); - if(definition->Type() == atype) - { - adefinition = definition; - return Standard_True; - } - } - return Standard_False; -} - -//======================================================================= -//function : Switch -//purpose : -//======================================================================= - -Handle(Dynamic_Parameter) Dynamic_FuzzyDefinitionsDictionary::Switch( - const Standard_CString aname, - const Standard_CString atype, - const Standard_CString avalue) const -{ - Handle(Dynamic_ObjectParameter) objectparameter; - cout<<"Parameter "<String(); - if(!stat(string.ToCString(),&buf)) - { - if(thetime == buf.st_ctime) return Standard_True; - } - - return Standard_False; -} - -//======================================================================= -//function : NumberOfDefinitions -//purpose : -//======================================================================= - -Standard_Integer Dynamic_FuzzyDefinitionsDictionary::NumberOfDefinitions() const -{ - return thesequenceoffuzzydefinitions->Length(); -} - -//======================================================================= -//function : Definition -//purpose : -//======================================================================= - -Handle(Dynamic_FuzzyClass) Dynamic_FuzzyDefinitionsDictionary::Definition - (const Standard_Integer anindex) const -{ - return thesequenceoffuzzydefinitions->Value(anindex); -} - -//======================================================================= -//function : Dump -//purpose : -//======================================================================= - -void Dynamic_FuzzyDefinitionsDictionary::Dump(Standard_OStream& astream) const -{ - Standard_Integer index; - astream<<" DICTIONARY : /n"; - for(index=1;index<=thesequenceoffuzzydefinitions->Length();index++) - thesequenceoffuzzydefinitions->Value(index)->Dump(astream); -} diff --git a/src/Dynamic/Dynamic_FuzzyInstance.cdl b/src/Dynamic/Dynamic_FuzzyInstance.cdl deleted file mode 100644 index 87a91dc931..0000000000 --- a/src/Dynamic/Dynamic_FuzzyInstance.cdl +++ /dev/null @@ -1,119 +0,0 @@ --- Created on: 1993-12-23 --- Created by: Gilles DEBARBOUILLE --- 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. - -generic class FuzzyInstance from Dynamic (Dictionary as Transient) - -inherits - - FuzzyClass from Dynamic - - ---Purpose: This class describes the facilities available to - -- manipulate fuzzy objects. It is a generic class - -- because the creation of a FuzzyInstance requests a - -- specific dictionary of definitions. - -uses - - CString from Standard, - Integer from Standard, - Real from Standard, - Boolean from Standard, - OStream from Standard, - FuzzyDefinition from Dynamic, - Parameter from Dynamic, - AsciiString from TCollection - -is - - Create(atype : CString from Standard) returns mutable FuzzyInstance from Dynamic; - --- Purpose: Creates a FuzzyInstance object of the type - -- . If is not defined in the dictionary, the - -- object created will have no definition. - - Create(afuzzyinstance : FuzzyInstance from Dynamic) returns mutable FuzzyInstance from Dynamic; - --- Purpose: Creates a FuzzyInstance with as definition the fuzzy - -- instance . - - Type(me) returns AsciiString from TCollection is redefined; - ---Purpose: Returns the type of object read in the definition. - - Definition(me) returns FuzzyClass from Dynamic is static; - ---Purpose: Returns a reference to the definition of the - -- FuzzyInstance. - - Parameter(me : mutable ; aparameter : CString from Standard; avalue : Boolean from Standard) is redefined; - ---Purpose: Adds to the instance the parameter - -- with the boolean value . - - Parameter(me : mutable ; aparameter : CString from Standard; avalue : Integer from Standard) is redefined; - ---Purpose: Adds to the instance the parameter - -- with the integer value . - - Parameter(me : mutable ; aparameter : CString from Standard ; avalue : Real from Standard) is redefined; - ---Purpose: Adds to the instance the parameter - -- with the real value . - - Parameter(me : mutable ; aparameter : CString from Standard; astring : CString from Standard) is redefined; - ---Purpose: Adds to the instance the parameter - -- with the string . - - Parameter(me : mutable ; aparameter : CString from Standard ; anobject : any Transient) is redefined; - ---Purpose: Adds to the instance the parameter - -- with the object value . - - Value(me ; aparameter : CString from Standard ; avalue : out Boolean from Standard) - returns Boolean from Standard is redefined; - ---Purpose: Returns True, if there is a parameter - -- previously stored in the instance and there is - -- the corresponding boolean value in the output argument - -- , False otherwise. - - Value(me ; aparameter : CString from Standard ; avalue : out Integer from Standard) - returns Boolean from Standard is redefined; - ---Purpose: Returns True, if there is a parameter - -- previously stored in the instance and there is - -- the corresponding integer value in the output argument - -- , False otherwise. - - Value(me ; aparameter : CString from Standard ; avalue : out Real from Standard) - returns Boolean from Standard is redefined; - ---Purpose: Returns True, if there is a parameter - -- previously stored in the instance and there is - -- the corresponding real value in the output argument - -- , False otherwise. - - Value(me ; aparameter : CString from Standard ; avalue : out AsciiString from TCollection) - returns Boolean from Standard is redefined; - ---Purpose: Returns True, if there is a parameter - -- previously stored in the instance and there is - -- the corresponding string in the output argument - -- , False otherwise. - - Value(me ; aparameter : CString from Standard ; avalue : out any Transient) - returns Boolean from Standard is redefined; - ---Purpose: Returns True, if there is a parameter - -- previously stored in the instance and there is - -- the corresponding object value in the output argument - -- , False otherwise. - - Dump(me ; astream : in out OStream from Standard) is redefined; - ---Purpose: Useful for debugging. - -fields - - thedefinition : FuzzyClass from Dynamic; - -end FuzzyInstance; diff --git a/src/Dynamic/Dynamic_FuzzyInstance.gxx b/src/Dynamic/Dynamic_FuzzyInstance.gxx deleted file mode 100644 index 0b6ecbcc73..0000000000 --- a/src/Dynamic/Dynamic_FuzzyInstance.gxx +++ /dev/null @@ -1,241 +0,0 @@ -// Created on: 1993-12-24 -// Created by: Gilles DEBARBOUILLE -// 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. - -// CRD : 15/04/97 : Passage WOK++ : Remplacement de TYPE par STANDARD_TYPE - - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -void DictionaryOfDefinitions(Handle(Dictionary)&); - -//======================================================================= -//function : Dynamic_FuzzyInstance -//purpose : -//======================================================================= - -Dynamic_FuzzyInstance::Dynamic_FuzzyInstance(const Standard_CString atype) -{ - Handle(Dictionary) dictionary; - DictionaryOfDefinitions(dictionary); - - if(dictionary->Definition(atype,thedefinition)) return; - else cout<Type(); -} - -//======================================================================= -//function : Definition -//purpose : -//======================================================================= - -Handle(Dynamic_FuzzyClass) Dynamic_FuzzyInstance::Definition() const -{ - Handle(Dynamic_FuzzyInstance) definition; - - if(thedefinition->IsKind(STANDARD_TYPE(Dynamic_FuzzyDefinition))) - { - return thedefinition; - } - else - { - definition = *(Handle(Dynamic_FuzzyInstance)*)&thedefinition; - return definition->Definition(); - } -} - -//======================================================================= -//function : Parameter -//purpose : -//======================================================================= - -void Dynamic_FuzzyInstance::Parameter(const Standard_CString aparameter, - const Standard_Boolean avalue) -{ - if(Definition()->Parameter(aparameter)) - Dynamic_FuzzyClass::Parameter(aparameter,avalue); - //else - // cout<<"Pas de parametre du nom de : "<< aparameter<Parameter(aparameter)) - Dynamic_FuzzyClass::Parameter(aparameter,avalue); - //else - // cout<<"Pas de parametre du nom de : "<< aparameter<Parameter(aparameter)) - Dynamic_FuzzyClass::Parameter(aparameter,avalue); - //else - //cout<<"Pas de parametre du nom de : "<< aparameter<Parameter(aparameter)) - Dynamic_FuzzyClass::Parameter(aparameter,astring); - //else - // cout<<"Pas de parametre du nom de : "<< aparameter<Parameter(aparameter)) - Dynamic_FuzzyClass::Parameter(aparameter,anobject); - //else - //cout<<"Pas de parametre du nom de : "<< aparameter<Value(aparameter,avalue); -} - -//======================================================================= -//function : Value -//purpose : -//======================================================================= - -Standard_Boolean Dynamic_FuzzyInstance::Value(const Standard_CString aparameter, - Standard_Integer& avalue) const -{ - if(Dynamic_FuzzyClass::Value(aparameter,avalue)) - return Standard_True; - else - return thedefinition->Value(aparameter,avalue); -} - -//======================================================================= -//function : Value -//purpose : -//======================================================================= - -Standard_Boolean Dynamic_FuzzyInstance::Value(const Standard_CString aparameter, - Standard_Real& avalue) const -{ - if(Dynamic_FuzzyClass::Value(aparameter,avalue)) - return Standard_True; - else - return thedefinition->Value(aparameter,avalue); -} - -//======================================================================= -//function : Value -//purpose : -//======================================================================= - -Standard_Boolean Dynamic_FuzzyInstance::Value(const Standard_CString aparameter, - TCollection_AsciiString& avalue) const -{ - if(Dynamic_FuzzyClass::Value(aparameter,avalue)) - return Standard_True; - else - return thedefinition->Value(aparameter,avalue); -} - -//======================================================================= -//function : Value -//purpose : -//======================================================================= - -Standard_Boolean Dynamic_FuzzyInstance::Value(const Standard_CString aparameter, - Handle(Standard_Transient)& anobject) const -{ - if(Dynamic_FuzzyClass::Value(aparameter,anobject)) - return Standard_True; - else - return thedefinition->Value(aparameter,anobject); -} - -//======================================================================= -//function : Dump -//purpose : -//======================================================================= - -void Dynamic_FuzzyInstance::Dump(Standard_OStream& astream) const -{ - Handle(Dynamic_ParameterNode) parameternode = FirstParameter(); - while(!parameternode.IsNull()) - { - astream<<" "; - parameternode->Object()->Dump(astream); - astream<<"\n"; - parameternode = parameternode->Next(); - } -} diff --git a/src/Dynamic/Dynamic_InstanceParameter.cdl b/src/Dynamic/Dynamic_InstanceParameter.cdl deleted file mode 100644 index f42f7b0b11..0000000000 --- a/src/Dynamic/Dynamic_InstanceParameter.cdl +++ /dev/null @@ -1,81 +0,0 @@ --- Created on: 1993-02-03 --- Created by: Gilles DEBARBOUILLE --- 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. - -class InstanceParameter from Dynamic - -inherits - - Parameter from Dynamic - - ---Purpose: This class describes a parameter with a dynamic - -- fuzzy instance as value. - -uses - - CString from Standard, - OStream from Standard, - DynamicInstance from Dynamic - - -is - - Create(aparameter : CString from Standard) - - ---Level: Public - - ---Purpose: Creates an InstanceParameter with as - -- identifier. - - returns mutable InstanceParameter from Dynamic; - - Create(aparameter : CString from Standard; avalue : DynamicInstance from Dynamic) - - ---Level: Public - - ---Purpose: Creates an InstanceParameter with as - -- identifier and as initial value. - - returns mutable InstanceParameter from Dynamic; - - Value(me) returns DynamicInstance from Dynamic - - ---Level: Public - - ---Purpose: Returns . - - is static; - - Value(me : mutable ; avalue : DynamicInstance from Dynamic) - - ---Level: Public - - ---Purpose: Sets to . - - is static; - - Dump(me ; astream : in out OStream from Standard) - - ---Level: Public - - ---Purpose: Useful for debugging. - - is redefined; - -fields - - thevalue : DynamicInstance from Dynamic; - -end InstanceParameter; diff --git a/src/Dynamic/Dynamic_InstanceParameter.cxx b/src/Dynamic/Dynamic_InstanceParameter.cxx deleted file mode 100644 index 1065618518..0000000000 --- a/src/Dynamic/Dynamic_InstanceParameter.cxx +++ /dev/null @@ -1,70 +0,0 @@ -// Created on: 1993-02-03 -// Created by: Gilles DEBARBOUILLE -// 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. - -#include - -//======================================================================= -//function : Dynamic_InstanceParameter -//purpose : -//======================================================================= - -Dynamic_InstanceParameter::Dynamic_InstanceParameter - (const Standard_CString aparameter) : Dynamic_Parameter(aparameter) -{} - -//======================================================================= -//function : Dynamic_InstanceParameter -//purpose : -//======================================================================= - -Dynamic_InstanceParameter::Dynamic_InstanceParameter - (const Standard_CString aparameter, - const Handle(Dynamic_DynamicInstance)& avalue) - : Dynamic_Parameter(aparameter) -{ - thevalue = avalue; -} - -//======================================================================= -//function : Value -//purpose : -//======================================================================= - -Handle(Dynamic_DynamicInstance) Dynamic_InstanceParameter::Value() const -{ - return thevalue; -} - -//======================================================================= -//function : Value -//purpose : -//======================================================================= - -void Dynamic_InstanceParameter::Value - (const Handle(Dynamic_DynamicInstance)& avalue) -{ - thevalue = avalue; -} - -//======================================================================= -//function : Dump -//purpose : -//======================================================================= - -void Dynamic_InstanceParameter::Dump(Standard_OStream& astream) const -{ - Dynamic_Parameter::Dump(astream); -} diff --git a/src/Dynamic/Dynamic_IntegerParameter.cdl b/src/Dynamic/Dynamic_IntegerParameter.cdl deleted file mode 100644 index 95c0097b88..0000000000 --- a/src/Dynamic/Dynamic_IntegerParameter.cdl +++ /dev/null @@ -1,79 +0,0 @@ --- Created on: 1993-02-03 --- Created by: Gilles DEBARBOUILLE --- 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. - -class IntegerParameter from Dynamic - -inherits - - Parameter from Dynamic - - ---Purpose: This class describes a parameter with an integer - -- as its value. - -uses - CString from Standard, - Integer from Standard, - OStream from Standard - -is - - Create(aparameter : CString from Standard) - - ---Level: Public - - ---Purpose: Creates an IntegerParameter with as - -- identifier. - - returns mutable IntegerParameter from Dynamic; - - Create(aparameter : CString from Standard ; avalue : Integer from Standard) - - ---Level: Public - - ---Purpose: Creates an IntegerParameter with as - -- identifier and as initial value. - - returns mutable IntegerParameter from Dynamic; - - Value(me) returns Integer from Standard - - ---Level: Public - - ---Purpose: Returns the integer value . - - is static; - - Value (me : mutable ; avalue : Integer from Standard) - - ---Level: Public - - --- Purpose: Sets the field with the integer value - - is static; - - Dump(me ; astream : in out OStream from Standard) - - ---Level: Public - - ---Purpose: Useful for debugging. - - is redefined; - -fields - - thevalue : Integer from Standard; - -end IntegerParameter; diff --git a/src/Dynamic/Dynamic_IntegerParameter.cxx b/src/Dynamic/Dynamic_IntegerParameter.cxx deleted file mode 100644 index 32faf7e2f9..0000000000 --- a/src/Dynamic/Dynamic_IntegerParameter.cxx +++ /dev/null @@ -1,71 +0,0 @@ -// Created on: 1993-02-03 -// Created by: Gilles DEBARBOUILLE -// 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. - -#include - -//======================================================================= -//function : Dynamic_IntegerParameter -//purpose : -//======================================================================= - -Dynamic_IntegerParameter::Dynamic_IntegerParameter - (const Standard_CString aparameter) - : Dynamic_Parameter(aparameter) -{} - -//======================================================================= -//function : Dynamic_IntegerParameter -//purpose : -//======================================================================= - -Dynamic_IntegerParameter::Dynamic_IntegerParameter - (const Standard_CString aparameter, - const Standard_Integer avalue) - : Dynamic_Parameter(aparameter) -{ - thevalue = avalue; -} - -//======================================================================= -//function : Value -//purpose : -//======================================================================= - -Standard_Integer Dynamic_IntegerParameter::Value() const -{ - return thevalue; -} - -//======================================================================= -//function : Value -//purpose : -//======================================================================= - -void Dynamic_IntegerParameter::Value(const Standard_Integer avalue) -{ - thevalue = avalue; -} - -//======================================================================= -//function : Dump -//purpose : -//======================================================================= - -void Dynamic_IntegerParameter::Dump(Standard_OStream& astream) const -{ - Dynamic_Parameter::Dump(astream); - astream<<" "< as name - -- and as file name to be interpreted. - - Function(me : mutable ; afile : CString from Standard) - - ---Level: Public - - ---Purpose: Sets the the name of the file to be interpreted to - -- . - - is static; - - Function(me) returns AsciiString from TCollection - - ---Level: Public - - ---Purpose: Returns the name of the file to be interpreted. - - is static; - -fields - - thefunction : HAsciiString from TCollection; - -end InterpretedMethod; diff --git a/src/Dynamic/Dynamic_InterpretedMethod.cxx b/src/Dynamic/Dynamic_InterpretedMethod.cxx deleted file mode 100644 index b0373e50b8..0000000000 --- a/src/Dynamic/Dynamic_InterpretedMethod.cxx +++ /dev/null @@ -1,50 +0,0 @@ -// Created on: 1993-01-28 -// Created by: Gilles DEBARBOUILLE -// 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. - -#include -#include - -//======================================================================= -//function : Dynamic_InterpretedMethod -//purpose : -//======================================================================= - -Dynamic_InterpretedMethod::Dynamic_InterpretedMethod(const Standard_CString aname, - const Standard_CString afile) -: Dynamic_MethodDefinition(aname) -{ - thefunction = new TCollection_HAsciiString(afile); -} - -//======================================================================= -//function : Function -//purpose : -//======================================================================= - -void Dynamic_InterpretedMethod::Function(const Standard_CString afile) -{ - thefunction = new TCollection_HAsciiString(afile); -} - -//======================================================================= -//function : Function -//purpose : -//======================================================================= - -TCollection_AsciiString Dynamic_InterpretedMethod::Function() const -{ - return thefunction->String(); -} diff --git a/src/Dynamic/Dynamic_Method.cdl b/src/Dynamic/Dynamic_Method.cdl deleted file mode 100644 index 4edebe0444..0000000000 --- a/src/Dynamic/Dynamic_Method.cdl +++ /dev/null @@ -1,121 +0,0 @@ --- Created on: 1993-01-22 --- Created by: Gilles DEBARBOUILLE --- 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. - -deferred class Method from Dynamic - -inherits - - TShared from MMgt - - ---Purpose: This class is a root class available for the - -- definition of methods and also for using them - -- throughout method instances. The logical name of - -- the method and the signature as a collection of - -- variables is stored in it. - -uses - - CString from Standard, - Boolean from Standard, - OStream from Standard, - ModeEnum from Dynamic, - Variable from Dynamic, - VariableNode from Dynamic, - Parameter from Dynamic, - AsciiString from TCollection - -is - - Initialize; - - ---Level: Internal - - ---Purpose: It is the constructor of this deferred class - - Type(me) returns AsciiString from TCollection - - ---Level: Advanced - - ---Purpose: Returns the type of object which is the name of the - -- function definition. - - is deferred; - - FirstVariableNode(me) returns VariableNode from Dynamic - - ---Level: Advanced - - ---Purpose: Returns the first variable node of the Method which - -- contains a variable. - - is static; - - Variable(me ; avariable : CString from Standard) returns Boolean from Standard - - ---Level: Advanced - - ---Purpose: Returns true if there is a variable with - -- as name, false otherwise. - - is static; - - Variable(me : mutable ; avariable : Variable from Dynamic) - - ---Level: Advanced - - ---Purpose: Adds another variable to the sequence of - -- variable definitions. - - is static; - - Value(me ; aname : CString from Standard - ; aparameter : out any Parameter from Dynamic - ; amode : out ModeEnum from Dynamic) returns Boolean from Standard - - ---Level: Advanced - - ---Purpose: Returns True, if there is a variable - -- previously stored in the instance and there is - -- the corresponding parameter value in the output - -- argument , False otherwise. - - is static; - - Value(me ; aname : CString from Standard - ; avariable : out any Variable from Dynamic) returns Boolean from Standard - - ---Level: Advanced - - ---Purpose: Returns True, if there is a variable named - -- previously stored in the instance of and returns - -- the corresponding variable in the output argument - -- , False otherwise. - - is static; - - Dump(me ; astream : in out OStream from Standard) - - ---Level: Internal - - ---Purpose: Useful for debugging. - - is virtual; - -fields - - thefirstvariablenode : VariableNode from Dynamic; - -end Method; diff --git a/src/Dynamic/Dynamic_Method.cxx b/src/Dynamic/Dynamic_Method.cxx deleted file mode 100644 index 7c1e60ceb9..0000000000 --- a/src/Dynamic/Dynamic_Method.cxx +++ /dev/null @@ -1,140 +0,0 @@ -// Created on: 1993-01-22 -// Created by: Gilles DEBARBOUILLE -// 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. - -#include -#include -#include - - -//======================================================================= -//function : Dynamic_Method -//purpose : -//======================================================================= - -Dynamic_Method::Dynamic_Method() -{} - - -//======================================================================= -//function : FirstVariableNode -//purpose : -//======================================================================= - -Handle(Dynamic_VariableNode) Dynamic_Method::FirstVariableNode() const -{ - return thefirstvariablenode; -} - -//======================================================================= -//function : Variable -//purpose : -//======================================================================= - -Standard_Boolean Dynamic_Method::Variable(const Standard_CString avariable) const -{ - Handle(Dynamic_Variable) variable; - Handle(Dynamic_VariableNode) definition = thefirstvariablenode; - - while(!definition.IsNull()) - { - variable = definition->Object(); - if(variable->Parameter()->Name() == avariable) return Standard_True; - definition = definition->Next(); - } - return Standard_False; -} - -//======================================================================= -//function : Variable -//purpose : -//======================================================================= - -void Dynamic_Method::Variable(const Handle(Dynamic_Variable)& avariable) -{ - Handle(Dynamic_VariableNode) variablenode = new Dynamic_VariableNode(avariable); - if(!thefirstvariablenode.IsNull()) variablenode->Next(thefirstvariablenode); - thefirstvariablenode = variablenode; -} - -//======================================================================= -//function : Value -//purpose : -//======================================================================= - -Standard_Boolean Dynamic_Method::Value(const Standard_CString aname, - Handle(Dynamic_Parameter)& aparameter, - Dynamic_ModeEnum& amode) const -{ - Handle(Dynamic_Variable) variable; - - if(Value(aname,variable)) - { - amode = variable->Mode(); - aparameter = variable->Parameter(); - return Standard_True; - } - else - { - return Standard_False; - } -} - -//======================================================================= -//function : Value -//purpose : -//======================================================================= - -Standard_Boolean Dynamic_Method::Value(const Standard_CString aname, - Handle(Dynamic_Variable)& avariable) const -{ - Handle(Dynamic_VariableNode) variablenode; - Handle(Dynamic_Variable) variable; - - variablenode = thefirstvariablenode; - - while(!variablenode.IsNull()) - { - variable = variablenode->Object(); - if(variable->Parameter()->Name() == aname) - { - avariable = variable; - return Standard_True; - } - variablenode = variablenode->Next(); - } - - return Standard_False; -} - -//======================================================================= -//function : Dump -//purpose : -//======================================================================= - -void Dynamic_Method::Dump(Standard_OStream& astream) const -{ - Handle(Dynamic_Variable) variable; - Handle(Dynamic_VariableNode) definition = thefirstvariablenode; - - while(!definition.IsNull()) - { - variable = definition->Object(); - variable->Dump(astream); - astream<<" ; "<Next(); - } - astream< as type. - - Type(me) returns AsciiString from TCollection - - ---Level: Advanced - - ---Purpose: Returns the name of the method definition. - - is redefined; - - AddVariable(me : mutable ; aparameter : Parameter from Dynamic ; - amode : ModeEnum from Dynamic ; - agroup : Boolean = Standard_False) - - ---Level: Advanced - - ---Purpose: Adds a new variable created from the parameter - -- , which defines the name of the variable - -- its type and if necessary its default value, the mode - -- which precise if it is an in, out, inout, - -- internal or constant variable and the flag - -- for accepting a set of homogeneous variables. with - -- the parameter value . - - is static; - - Dump(me ; astream : in out OStream from Standard) - - ---Level: Internal - - ---Purpose: Useful for debugging. - - is redefined; - -fields - - thename : HAsciiString from TCollection; - -end MethodDefinition; diff --git a/src/Dynamic/Dynamic_MethodDefinition.cxx b/src/Dynamic/Dynamic_MethodDefinition.cxx deleted file mode 100644 index 4e9dc87150..0000000000 --- a/src/Dynamic/Dynamic_MethodDefinition.cxx +++ /dev/null @@ -1,86 +0,0 @@ -// Created on: 1994-08-25 -// Created by: Gilles DEBARBOUILLE -// 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. - -#include -#include -#include -#include -#include -#include - - -//======================================================================= -//function : Dynamic_MethodDefinition -//purpose : -//======================================================================= - -Dynamic_MethodDefinition::Dynamic_MethodDefinition(const Standard_CString aname) -{ - thename = new TCollection_HAsciiString(aname); -} - -//======================================================================= -//function : Type -//purpose : -//======================================================================= - -TCollection_AsciiString Dynamic_MethodDefinition::Type() const -{ - return thename->String(); -} - -//======================================================================= -//function : AddVariable -//purpose : -//======================================================================= - -void Dynamic_MethodDefinition::AddVariable(const Handle(Dynamic_Parameter)& aparameter, - const Dynamic_ModeEnum amode, - const Standard_Boolean agroup) -{ - Handle(Dynamic_VariableNode) variablenode; - Handle(Dynamic_Variable) variable; - - variablenode = FirstVariableNode(); - while(!variablenode.IsNull()) - { - variable = variablenode->Object(); - if(variable->Parameter()->Name() == aparameter->Name()) - { - variable->Mode(amode); - variable->Parameter(aparameter); - return; - } - variablenode = variablenode->Next(); - } - if(agroup) variable = new Dynamic_VariableGroup(); - else variable = new Dynamic_Variable(); - variable->Mode(amode); - variable->Parameter(aparameter); - Dynamic_Method::Variable(variable); -} - -//======================================================================= -//function : Dump -//purpose : -//======================================================================= - -void Dynamic_MethodDefinition::Dump(Standard_OStream& astream) const -{ - TCollection_AsciiString string = thename->String(); - astream<<"Method Definition : "<, fills the - -- dictionary with all the wishes definitions. - - is static; - - Definition(me : mutable ; adefinition : Method from Dynamic) returns Boolean from Standard - - ---Level: Advanced - - ---Purpose: This method sets the new definition in - -- the dictionary. It returns true if the operation is - -- successful, false otherwise. - - is static; - - Switch(me ; aname , atype , avalue : CString from Standard) - - ---Level: Internal - - ---Purpose: This virtual method allows the user to add recognition - -- of its own parameters when reading the file to fill - -- the dictionary. - - returns Parameter from Dynamic; - - Definition(me ; atype : CString from Standard - ; adefinition : out Method from Dynamic) returns Boolean from Standard - - ---Level: Public - - ---Purpose: Returns from the dictionary in the out variable - -- a reference to the right instance of the - -- definition identified by its type . The method - -- returns true if the definition exist, false otherwise. - - is static; - - UpToDate(me) returns Boolean from Standard - - ---Level: Advanced - - ---Purpose: Returns true if there has been no modification of the - -- file method-definitions.dat since the creation of the - -- dictionary object, false otherwise. - - is static; - - NumberOfDefinitions(me) returns Integer from Standard - - ---Level: Public - - ---Purpose: Returns the number of definitions stored in the - -- dictionary. - - is static; - - Definition(me ; anindex : Integer from Standard) returns any Method from Dynamic - - ---Level: Public - - ---Purpose: Returns a reference on the definition identified by - -- the index . - - is static; - - Dump(me ; astream : in out OStream from Standard) - - ---Level: Internal - - ---Purpose: Useful for debugging. - - is static; - -fields - - thefilename : HAsciiString from TCollection; - thetime : Time from Standard; - thesequenceofmethoddefinitions : SequenceOfMethodDefinitions from Dynamic; - -end MethodDefinitionsDictionary; diff --git a/src/Dynamic/Dynamic_MethodDefinitionsDictionary.cxx b/src/Dynamic/Dynamic_MethodDefinitionsDictionary.cxx deleted file mode 100644 index 19fd061af8..0000000000 --- a/src/Dynamic/Dynamic_MethodDefinitionsDictionary.cxx +++ /dev/null @@ -1,298 +0,0 @@ -// Created on: 1992-06-24 -// Created by: Gilles DEBARBOUILLE -// 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. - -// Historique : -// CRD : 15/04/97 : Passage WOK++ : Replace TYPE by STANDARD_TYPE -// CRD : 03/07/97 : Porting Windows NT. - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifdef HAVE_CONFIG_H -# include -#endif - -#include -#ifdef HAVE_SYS_TYPES_H -# include -#endif - -#if defined (HAVE_SYS_STAT_H) || defined (WNT) -# include -#endif - -#ifdef HAVE_STRINGS_H -# include -#endif -#ifdef WNT -#define stat _stat -//#define strcasecmp _stricoll -#endif - -//======================================================================= -//function : Dynamic_MethodDefinitionsDictionary -//purpose : -//======================================================================= - -Dynamic_MethodDefinitionsDictionary::Dynamic_MethodDefinitionsDictionary() -{ -} - -//======================================================================= -//function : Creates -//purpose : -//======================================================================= - -void Dynamic_MethodDefinitionsDictionary::Creates(const Standard_CString afilename) -{ - Standard_Boolean group; - Standard_Integer fr,i,begin,end,endline; - char line[256]; - char name[81]; - char mode[81]; - char type[81]; - char value[81],value1[81],value2[81],value3[81]; - Handle(Dynamic_CompiledMethod) methoddefinition; - Handle(Dynamic_Parameter) parameter; - - struct stat buf; - - ifstream file(afilename); - if(!file) - { - cout<<"unable to open "<= 0 && ( line[i] == ' ' || !line[i]))line[i--] = 0; - fr = i+1; - if(fr <= 1)continue; - - if(line[0] != ' ') - { - methoddefinition = new Dynamic_CompiledMethod(line,line); - thesequenceofmethoddefinitions->Append(methoddefinition); - } - else - { - begin = end = 0; - for(i=0; iAddVariable(new Dynamic_BooleanParameter(name,value),Dynamic::Mode(mode),group); - - else if(!strcasecmp(type,"Standard_Integer")) - methoddefinition->AddVariable(new Dynamic_IntegerParameter(name,atoi(value)),Dynamic::Mode(mode),group); - - else if(!strcasecmp(type,"Standard_Real")) - methoddefinition->AddVariable(new Dynamic_RealParameter(name,Atof(value)),Dynamic::Mode(mode),group); - - else if(!strcasecmp(type,"Standard_CString")) - methoddefinition->AddVariable(new Dynamic_StringParameter(name,value),Dynamic::Mode(mode),group); - - else - { - parameter = Switch(name,type,value); - if(!parameter.IsNull())methoddefinition->AddVariable(parameter,Dynamic::Mode(mode),group); - } - - } - } - file.close(); -} - -//======================================================================= -//function : Definition -//purpose : -//======================================================================= - -Standard_Boolean Dynamic_MethodDefinitionsDictionary::Definition(const Handle(Dynamic_Method)& adefinition) -{ - Handle(Dynamic_MethodDefinition) methoddefinition; - if(adefinition->IsKind(STANDARD_TYPE(Dynamic_MethodDefinition))) - { - methoddefinition = *(Handle(Dynamic_MethodDefinition)*)&adefinition; - thesequenceofmethoddefinitions->Append(methoddefinition); - return Standard_True; - } - else - { - cout<<"the definition is not a method definition"<Length(); index++) - { - definition = thesequenceofmethoddefinitions->Value(index); - if(definition->Type() == atype) - { - adefinition = definition; - return Standard_True; - } - } - return Standard_False; -} - -//======================================================================= -//function : Switch -//purpose : -//======================================================================= - -Handle(Dynamic_Parameter) Dynamic_MethodDefinitionsDictionary::Switch( - const Standard_CString aname, - const Standard_CString atype, - const Standard_CString avalue) const -{ - Handle(Dynamic_ObjectParameter) objectparameter; - cout<<"Parameter "<String(); - if(!stat(string.ToCString(),&buf)) - { - if(thetime == buf.st_ctime) return Standard_True; - } - - return Standard_False; -} - -//======================================================================= -//function : NumberOfDefinitions -//purpose : -//======================================================================= - -Standard_Integer Dynamic_MethodDefinitionsDictionary::NumberOfDefinitions() const -{ - return thesequenceofmethoddefinitions->Length(); -} - -//======================================================================= -//function : Definition -//purpose : -//======================================================================= - -Handle(Dynamic_Method) Dynamic_MethodDefinitionsDictionary::Definition - (const Standard_Integer anindex) const -{ - return thesequenceofmethoddefinitions->Value(anindex); -} - -//======================================================================= -//function : Dump -//purpose : -//======================================================================= - -void Dynamic_MethodDefinitionsDictionary::Dump(Standard_OStream& astream) const -{ - Standard_Integer index; - astream<<" DICTIONARY : \n\n"; - for(index=1;index<=thesequenceofmethoddefinitions->Length();index++) - thesequenceofmethoddefinitions->Value(index)->Dump(astream); -} diff --git a/src/Dynamic/Dynamic_Node.cdl b/src/Dynamic/Dynamic_Node.cdl deleted file mode 100644 index 944c7fb1f7..0000000000 --- a/src/Dynamic/Dynamic_Node.cdl +++ /dev/null @@ -1,83 +0,0 @@ --- Created on: 1994-09-19 --- Created by: Gilles DEBARBOUILLE --- 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. - -generic class Node from Dynamic (Item as Transient) - - ---Purpose: This generic class is a light way to store a - -- persistent homogeneous collection of objects - -- inside another persistent object. - -inherits - - TShared from MMgt - - -is - - Create returns mutable Node from Dynamic; - - ---Level: Advanced - - ---Purpose: Returns an empty instance of this class. - - Create(anitem : any Item) returns mutable Node from Dynamic; - - ---Level: Advanced - - ---Purpose: Returns an instance of this class initialized with - -- as object. - - Object(me : mutable ; anitem : any Item) - - ---Level: Advanced - - ---Purpose: Sets to the object . - - is static; - - Object(me) returns any Item - - ---Level: Advanced - - ---Purpose: Returns the object into . - - is static; - - Next(me : mutable ; anode : Node from Dynamic) - - ---Level: Advanced - - ---Purpose: Links to the node . - - is static; - - Next(me) returns any Node from Dynamic - - ---Level: Advanced - - ---Purpose: Returns the node linked to . - - is static; - -fields - - thenextnode : Node from Dynamic; - theitem : Item; - -end Node; - - - diff --git a/src/Dynamic/Dynamic_Node.gxx b/src/Dynamic/Dynamic_Node.gxx deleted file mode 100644 index 6498ea104e..0000000000 --- a/src/Dynamic/Dynamic_Node.gxx +++ /dev/null @@ -1,74 +0,0 @@ -// Created on: 1994-09-19 -// Created by: Gilles DEBARBOUILLE -// 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. - -//======================================================================= -//function : Dynamic_Node -//purpose : -//======================================================================= - -Dynamic_Node::Dynamic_Node() -{ -} - -//======================================================================= -//function : Dynamic_Node -//purpose : -//======================================================================= - -Dynamic_Node::Dynamic_Node(const Handle(Item)& anitem) -{ - theitem = anitem; -} - -//======================================================================= -//function : Object -//purpose : -//======================================================================= - -void Dynamic_Node::Object(const Handle(Item)& anitem) -{ - theitem = anitem; -} - -//======================================================================= -//function : Object -//purpose : -//======================================================================= - -Handle(Item) Dynamic_Node::Object() const -{ - return theitem; -} - -//======================================================================= -//function : Next -//purpose : -//======================================================================= - -void Dynamic_Node::Next(const Handle(Dynamic_Node)& anode) -{ - thenextnode = anode; -} - -//======================================================================= -//function : Next -//purpose : -//======================================================================= - -Handle(Dynamic_Node) Dynamic_Node::Next() const -{ - return thenextnode; -} diff --git a/src/Dynamic/Dynamic_ObjectParameter.cdl b/src/Dynamic/Dynamic_ObjectParameter.cdl deleted file mode 100644 index 820c3660f4..0000000000 --- a/src/Dynamic/Dynamic_ObjectParameter.cdl +++ /dev/null @@ -1,78 +0,0 @@ --- Created on: 1993-12-24 --- Created by: Gilles DEBARBOUILLE --- 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. - -class ObjectParameter from Dynamic - -inherits - - Parameter from Dynamic - - ---Purpose: This inherited class from Parameter describes all - -- the parameters, which are characterized by an - -- object value. - - -uses - OStream from Standard, - CString from Standard - -is - - Create(aparameter : CString from Standard) returns mutable ObjectParameter from Dynamic; - - ---Level: Public - - ---Purpose: Creates an ObjectParameter with as name. - - Create(aparameter : CString from Standard; anobject : any Transient) - - ---Level: Public - - ---Purpose: With the name of the Parameter and the - -- object , creates an instance of - -- ObjectParameter. - - returns mutable ObjectParameter from Dynamic; - - Value(me) returns any Transient - - ---Level: Public - - ---Purpose: Returns the value of the parameter which is an object. - - is static; - - Value (me : mutable ; anobject : Transient) - - ---Level: Public - - --- Purpose: Sets the object in . - - is static; - - Dump(me ; astream : in out OStream from Standard) - - ---Level: Internal - - ---Purpose: Useful for debugging. - - is redefined; - -fields - - theobject : Transient; - -end ObjectParameter; diff --git a/src/Dynamic/Dynamic_ObjectParameter.cxx b/src/Dynamic/Dynamic_ObjectParameter.cxx deleted file mode 100644 index 96a5b66822..0000000000 --- a/src/Dynamic/Dynamic_ObjectParameter.cxx +++ /dev/null @@ -1,70 +0,0 @@ -// Created on: 1993-12-24 -// Created by: Gilles DEBARBOUILLE -// 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. - -#include - -//======================================================================= -//function : Dynamic_ObjectParameter -//purpose : -//======================================================================= - -Dynamic_ObjectParameter::Dynamic_ObjectParameter - (const Standard_CString aparameter) -: Dynamic_Parameter(aparameter) -{} - -//======================================================================= -//function : Dynamic_ObjectParameter -//purpose : -//======================================================================= - -Dynamic_ObjectParameter::Dynamic_ObjectParameter - (const Standard_CString aparameter, - const Handle(Standard_Transient)& anobject) -: Dynamic_Parameter(aparameter) -{ - theobject = anobject; -} - -//======================================================================= -//function : Value -//purpose : -//======================================================================= - -Handle(Standard_Transient) Dynamic_ObjectParameter::Value() const -{ - return theobject; -} - -//======================================================================= -//function : Value -//purpose : -//======================================================================= - -void Dynamic_ObjectParameter::Value(const Handle(Standard_Transient)& anobject) -{ - theobject = anobject; -} - -//======================================================================= -//function : Dump -//purpose : -//======================================================================= - -void Dynamic_ObjectParameter::Dump(Standard_OStream& astream) const -{ - Dynamic_Parameter::Dump(astream); -} diff --git a/src/Dynamic/Dynamic_Parameter.cdl b/src/Dynamic/Dynamic_Parameter.cdl deleted file mode 100644 index cd7d7cd6d3..0000000000 --- a/src/Dynamic/Dynamic_Parameter.cdl +++ /dev/null @@ -1,72 +0,0 @@ --- Created on: 1993-01-28 --- Created by: Gilles DEBARBOUILLE --- 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. - -deferred class Parameter from Dynamic -inherits - - TShared from MMgt - - - ---Purpose: A parameter is defined as the association of a - -- name and a value. For easy use, inherited classes - -- have been created to manipulate values by their - -- C++ type. This class is the root class of all the - -- derived parameter classes. Only the identifier of - -- the parameter is stored in it. The associated - -- value is stored in the inherited classes where it - -- is more easy to overload the methods manipulating - -- the value. No instance of this class must be - -- created. It is for this reason that this class is - -- deferred. - -uses - - OStream from Standard, - CString from Standard, - HAsciiString from TCollection, - AsciiString from TCollection - - -is - - Initialize(aname : CString from Standard) ; - - ---Level: Internal - - ---Purpose: Initializer of this class taking in argument the name - -- of the parameter . - - Name(me) returns AsciiString from TCollection - - ---Level: Public - - ---Purpose: Returns in an AsciiString the name of the parameter. - - is static; - - Dump(me ; astream : in out OStream from Standard) - - ---Level: Internal - - ---Purpose: Useful for debugging. - - is virtual; - -fields - - theparametername : HAsciiString from TCollection; - -end Parameter; diff --git a/src/Dynamic/Dynamic_Parameter.cxx b/src/Dynamic/Dynamic_Parameter.cxx deleted file mode 100644 index 4acdb250cc..0000000000 --- a/src/Dynamic/Dynamic_Parameter.cxx +++ /dev/null @@ -1,47 +0,0 @@ -// Created on: 1993-01-28 -// Created by: Gilles DEBARBOUILLE -// 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. - -#include - -//======================================================================= -//function : Dynamic_Parameter -//purpose : -//======================================================================= - -Dynamic_Parameter::Dynamic_Parameter(const Standard_CString aname) -{ - theparametername = new TCollection_HAsciiString(aname); -} - -//======================================================================= -//function : Name -//purpose : -//======================================================================= -TCollection_AsciiString Dynamic_Parameter::Name() const -{ - return theparametername->String(); -} - -//======================================================================= -//function : Dump -//purpose : -//======================================================================= - -void Dynamic_Parameter::Dump(Standard_OStream& astream) const -{ - TCollection_AsciiString string = theparametername->String(); - astream << string.ToCString(); -} diff --git a/src/Dynamic/Dynamic_RealParameter.cdl b/src/Dynamic/Dynamic_RealParameter.cdl deleted file mode 100644 index e4fc2f715c..0000000000 --- a/src/Dynamic/Dynamic_RealParameter.cdl +++ /dev/null @@ -1,80 +0,0 @@ --- Created on: 1993-02-03 --- Created by: Gilles DEBARBOUILLE --- 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. - -class RealParameter from Dynamic - -inherits - - Parameter from Dynamic - ---Purpose: This inherited class from Parameter describes all - -- the parameters, which are characterized by a real - -- value. - -uses - - OStream from Standard, - CString from Standard, - Real from Standard - - -is - - Create(aparameter : CString from Standard ) - - ---Level: Public - - ---Purpose: Creates a RealParameter with as name. - - returns mutable RealParameter from Dynamic; - - Create(aparameter : CString from Standard ; avalue : Real from Standard) - - ---Level: Public - - ---Purpose: With the name of the Parameter and the - -- real , creates an instance of RealParameter. - - returns mutable RealParameter from Dynamic; - - Value(me) returns Real from Standard - - ---Level: Public - - ---Purpose: Returns the value of the parameter which is a real. - - is static; - - Value (me : mutable ; avalue : Real from Standard) - - ---Level: Public - - --- Purpose: Sets the real in . - - is static; - - Dump(me ; astream : in out OStream from Standard) - - ---Level: Internal - - ---Purpose: Useful for debugging. - - is redefined; - -fields - - thevalue : Real from Standard; - -end RealParameter; diff --git a/src/Dynamic/Dynamic_RealParameter.cxx b/src/Dynamic/Dynamic_RealParameter.cxx deleted file mode 100644 index a308647401..0000000000 --- a/src/Dynamic/Dynamic_RealParameter.cxx +++ /dev/null @@ -1,72 +0,0 @@ -// Created on: 1993-02-03 -// Created by: Gilles DEBARBOUILLE -// 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. - -#include -#include - -//======================================================================= -//function : Dynamic_RealParameter -//purpose : -//======================================================================= - -Dynamic_RealParameter::Dynamic_RealParameter - (const Standard_CString aparameter) - : Dynamic_Parameter(aparameter) -{} - -//======================================================================= -//function : Dynamic_RealParameter -//purpose : -//======================================================================= - -Dynamic_RealParameter::Dynamic_RealParameter - (const Standard_CString aparameter, - const Standard_Real avalue) - : Dynamic_Parameter(aparameter) -{ - thevalue = avalue; -} - -//======================================================================= -//function : Value -//purpose : -//======================================================================= - -Standard_Real Dynamic_RealParameter::Value() const -{ - return thevalue; -} - -//======================================================================= -//function : Value -//purpose : -//======================================================================= - -void Dynamic_RealParameter::Value(const Standard_Real avalue) -{ - thevalue = avalue; -} - -//======================================================================= -//function : Dump -//purpose : -//======================================================================= - -void Dynamic_RealParameter::Dump(Standard_OStream& astream) const -{ - Dynamic_Parameter::Dump(astream); - astream<<" : "< as name. - - returns mutable StringParameter from Dynamic; - - Create(aparameter : CString from Standard ; astring : CString from Standard) - - ---Level: Public - - ---Purpose: With the name of the Parameter and the - -- string , creates an instance of - -- StringParameter. - - returns mutable StringParameter from Dynamic; - - Value(me) returns AsciiString from TCollection - - ---Level: Public - - ---Purpose: Returns the value of the parameter which is an - -- AsciiString. - - is static; - - Value (me : mutable ; avalue : CString from Standard) - - ---Level: Public - - --- Purpose: Sets the string in . - - is static; - - Dump(me ; astream : in out OStream from Standard) - - ---Level: Internal - - ---Purpose: Useful for debugging. - - is redefined; - -fields - - thestring : HAsciiString from TCollection; - -end StringParameter; diff --git a/src/Dynamic/Dynamic_StringParameter.cxx b/src/Dynamic/Dynamic_StringParameter.cxx deleted file mode 100644 index 9daad10767..0000000000 --- a/src/Dynamic/Dynamic_StringParameter.cxx +++ /dev/null @@ -1,72 +0,0 @@ -// Created on: 1993-02-03 -// Created by: Gilles DEBARBOUILLE -// 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. - -#include -#include -#include - -//======================================================================= -//function : Dynamic_StringParameter -//purpose : -//======================================================================= - -Dynamic_StringParameter::Dynamic_StringParameter(const Standard_CString aparameter) -: Dynamic_Parameter(aparameter) -{} - -//======================================================================= -//function : Dynamic_StringParameter -//purpose : -//======================================================================= - -Dynamic_StringParameter::Dynamic_StringParameter(const Standard_CString aparameter, - const Standard_CString avalue) -: Dynamic_Parameter(aparameter) -{ - thestring = new TCollection_HAsciiString(avalue); -} - -//======================================================================= -//function : Value -//purpose : -//======================================================================= - -TCollection_AsciiString Dynamic_StringParameter::Value() const -{ - return thestring->String(); -} - -//======================================================================= -//function : Value -//purpose : -//======================================================================= - -void Dynamic_StringParameter::Value(const Standard_CString avalue) -{ - thestring = new TCollection_HAsciiString(avalue); -} - -//======================================================================= -//function : Dump -//purpose : -//======================================================================= - -void Dynamic_StringParameter::Dump(Standard_OStream& astream) const -{ - Dynamic_Parameter::Dump(astream); - TCollection_AsciiString string = thestring->String(); - astream<<" "< in . This - -- parameter gives the name, the type of value, and if - -- necessary the default value of the variable. - - is static; - - Parameter(me) returns any Parameter from Dynamic - - ---Level: Advanced - - ---Purpose: Returns the parameter stored in . - - is static; - - Mode(me : mutable ; amode : ModeEnum from Dynamic) - - ---Level: Advanced - - ---Purpose: Sets the mode to the variable. the mode is to take in - -- the enumeration IN, OUT, INOUT, INTERNAL, CONSTANT, - -- which describes the type of the variable. - - is static; - - Mode(me) returns ModeEnum from Dynamic - - ---Level: Advanced - - ---Purpose: Returns the mode of the variable. - - is static; - - Dump(me; astream : in out OStream from Standard); - - ---Level: Internal - - ---Purpose: Useful for debugging. - -fields - - theparameter : Parameter from Dynamic; - themode : ModeEnum from Dynamic; - -end Variable; diff --git a/src/Dynamic/Dynamic_Variable.cxx b/src/Dynamic/Dynamic_Variable.cxx deleted file mode 100644 index 26323a109a..0000000000 --- a/src/Dynamic/Dynamic_Variable.cxx +++ /dev/null @@ -1,76 +0,0 @@ -// Created on: 1994-08-24 -// Created by: Gilles DEBARBOUILLE -// 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. - -#include - -//======================================================================= -//function : Dynamic_Variable -//purpose : -//======================================================================= - -Dynamic_Variable::Dynamic_Variable() -{ -} - -//======================================================================= -//function : Parameter -//purpose : -//======================================================================= - -void Dynamic_Variable::Parameter(const Handle(Dynamic_Parameter)& aparameter) -{ - theparameter = aparameter; -} - -//======================================================================= -//function : Parameter -//purpose : -//======================================================================= - -Handle(Dynamic_Parameter) Dynamic_Variable::Parameter() const -{ - return theparameter; -} - -//======================================================================= -//function : Mode -//purpose : -//======================================================================= - -void Dynamic_Variable::Mode(const Dynamic_ModeEnum amode) -{ - themode = amode; -} - -//======================================================================= -//function : Mode -//purpose : -//======================================================================= - -Dynamic_ModeEnum Dynamic_Variable::Mode() const -{ - return themode; -} - -//======================================================================= -//function : Dump -//purpose : -//======================================================================= - -void Dynamic_Variable::Dump(Standard_OStream& astream) const -{ - theparameter->Dump(astream); -} diff --git a/src/Dynamic/Dynamic_VariableGroup.cdl b/src/Dynamic/Dynamic_VariableGroup.cdl deleted file mode 100644 index fdaa502ee4..0000000000 --- a/src/Dynamic/Dynamic_VariableGroup.cdl +++ /dev/null @@ -1,41 +0,0 @@ --- Created on: 1994-08-24 --- Created by: Gilles DEBARBOUILLE --- 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. - -class VariableGroup from Dynamic - -inherits - - Variable from Dynamic - - ---Purpose: This inherited class from variable is for - -- specifing that the variable does not accept only - -- one value but a collection of homogeneous - -- values. This class is for describing the signature - -- of the method definition. When an instance of this - -- kind of method is done, it is a - -- CompositVariableInstance which is used. - - -is - - Create returns mutable VariableGroup from Dynamic; - - ---Level: Advanced - - ---Purpose: Creates and Returns a new instance of this class. - - -end VariableGroup; diff --git a/src/Dynamic/Dynamic_VariableGroup.cxx b/src/Dynamic/Dynamic_VariableGroup.cxx deleted file mode 100644 index c55e23ceba..0000000000 --- a/src/Dynamic/Dynamic_VariableGroup.cxx +++ /dev/null @@ -1,26 +0,0 @@ -// Created on: 1994-08-24 -// Created by: Gilles DEBARBOUILLE -// 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. - -#include - -//======================================================================= -//function : Dynamic_VariableGroup -//purpose : -//======================================================================= - -Dynamic_VariableGroup::Dynamic_VariableGroup() : Dynamic_Variable() -{ -} diff --git a/src/Dynamic/Dynamic_VariableInstance.cdl b/src/Dynamic/Dynamic_VariableInstance.cdl deleted file mode 100644 index 0ac14501b7..0000000000 --- a/src/Dynamic/Dynamic_VariableInstance.cdl +++ /dev/null @@ -1,71 +0,0 @@ --- Created on: 1994-09-05 --- Created by: Gilles DEBARBOUILLE --- 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. - -class VariableInstance from Dynamic - -inherits - - AbstractVariableInstance from Dynamic - - ---Purpose: This class is set in the fields of the - -- MethodInstance class. When a MethodInstance is - -- done each variable of the definition must be - -- defined in the instance by a VariableInstance with - -- the same name as in the definition. If the method - -- instance is directly used by an application the - -- user value is directly set into the - -- VariableInstance. If now the MethodInstance enters - -- in the definition of a CompositMethod It is - -- necessary to define the correspondance between the - -- variables of the CompositMethod definition and the - -- use throughout the MethodInstance. - -uses - - Variable from Dynamic - - -is - - Create returns mutable VariableInstance from Dynamic; - - ---Level: Public - - ---Purpose: Returns a new empty instance of this class. - - Variable(me : mutable ; avariable : Variable from Dynamic) - - ---Level: Public - - ---Purpose: Sets the variable into the - -- VariableInstance . - - is redefined; - - Variable(me) returns Variable from Dynamic - - ---Level: Public - - ---Purpose: Returns the variable contained into the - -- VariableInstance . - - is static; - -fields - - thevariable : Variable from Dynamic; - -end VariableInstance; diff --git a/src/Dynamic/Dynamic_VariableInstance.cxx b/src/Dynamic/Dynamic_VariableInstance.cxx deleted file mode 100644 index 50c9f890c2..0000000000 --- a/src/Dynamic/Dynamic_VariableInstance.cxx +++ /dev/null @@ -1,45 +0,0 @@ -// Created on: 1994-09-05 -// Created by: Gilles DEBARBOUILLE -// 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. - -#include - -//======================================================================= -//function : Dynamic_VariableInstance -//purpose : -//======================================================================= - -Dynamic_VariableInstance::Dynamic_VariableInstance() : Dynamic_AbstractVariableInstance() -{} - -//======================================================================= -//function : Variable -//purpose : -//======================================================================= - -void Dynamic_VariableInstance::Variable(const Handle(Dynamic_Variable)& avariable) -{ - thevariable = avariable; -} - -//======================================================================= -//function : Variable -//purpose : -//======================================================================= - -Handle(Dynamic_Variable) Dynamic_VariableInstance::Variable() const -{ - return thevariable; -} diff --git a/src/GraphDS/GraphDS.cdl b/src/GraphDS/GraphDS.cdl deleted file mode 100644 index a7e406110a..0000000000 --- a/src/GraphDS/GraphDS.cdl +++ /dev/null @@ -1,70 +0,0 @@ --- Created on: 1993-08-06 --- Created by: Denis PASCAL --- 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. - -package GraphDS - - ---Purpose: This package provides generic classes to - -- describe transient graph data structure. - -uses Standard, - MMgt, - TCollection, - TColStd - -is - enumeration EntityRole is - OnlyInput, - OnlyOutput, - InputAndOutput - end EntityRole; - - enumeration RelationRole is - OnlyFront, - OnlyBack, - FrontAndBack - end RelationRole; - - class EntityRoleMap instantiates DataMap from TCollection - (Transient from Standard, - EntityRole from GraphDS, - MapTransientHasher from TColStd); - - generic class DirectedGraph, - Vertex, - Edge, - VerticesIterator, - EdgesIterator; - - - generic class RelationGraph, - Entity, - Relation, - EntitiesIterator, - IncidentEntitiesIterator, - RelationsIterator, - IncidentRelationsIterator; - -end GraphDS; - - - - - - - - - - diff --git a/src/GraphDS/GraphDS_DirectedGraph.cdl b/src/GraphDS/GraphDS_DirectedGraph.cdl deleted file mode 100644 index a211fddff0..0000000000 --- a/src/GraphDS/GraphDS_DirectedGraph.cdl +++ /dev/null @@ -1,386 +0,0 @@ --- Created on: 1991-04-24 --- Created by: Denis PASCAL --- Copyright (c) 1991-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. - -generic class DirectedGraph from GraphDS - (GraphDS_Item as any ; - GraphDS_Attribute as any) - - ---Purpose: This class describes a structure which contains a - -- list of Vertices and a list of Edges. The vertex - -- (also called a Node), is the basic element of the - -- graph, it contains an Item. Each edge (also called - -- an Arc) defines an oriented link between two - -- vertices. it contains an Attribute. In the scheme - -- A->B, vertex A is called the SOURCE of the link, B - -- its DESTINATION, and B is ADJACENT to A. If there is - -- no edge which destinates to a vertex, this vertex is - -- a ROOT of the graph. If there is no edge which - -- originates from a vertex, this vertex is a LEAF of - -- the graph. - -- Keywords: SOURCE vertex, DESTINATION Vertex, ROOT vertex, LEAF - -- vertex, ADJACENT vertex. Depth-first search, breadth - -- first Search. - -- References: Software Components with ADA (The Benjamin/Cummings - -- Company, Inc. 1986). - -uses MapOfTransient from TColStd - -raises NoSuchObject from Standard, - DomainError from Standard - - - class Vertex inherits TShared from MMgt - - ---Purpose: nested public class vertex (composed of an - -- associated Item). - - uses MapOfTransient from TColStd - - raises NoSuchObject from Standard - - is - - Create (value : GraphDS_Item) - returns mutable Vertex from GraphDS; - --is private; - - GetItem (me) - returns any GraphDS_Item; - ---Purpose: returns item associated to . - ---C++: return const & - ---Level: Internal - - SetItem (me : mutable; value : GraphDS_Item); - ---Purpose: Associates a new item to . - ---Level: Internal - - Contains (me; E : Edge) - returns Boolean from Standard; - - IsFront (me; E : Edge) - returns Boolean from Standard; - - IsBack (me; E : Edge) - returns Boolean from Standard; - - IsRoot (me; ignoreselfloop : Boolean from Standard = Standard_True) - ---Purpose: Returns TRUE if NbBackEdges = 0. - ---Level: Internal - returns Boolean from Standard; - - IsLeaf (me; ignoreselfloop : Boolean from Standard = Standard_True) - ---Purpose: Returns TRUE if NbFrontEdges = 0. - ---Level: Internal - returns Boolean from Standard; - - AddEdge (me : mutable; E : Edge) - returns Boolean from Standard - is private; - - RemoveEdge (me : mutable; anEdge : Edge) - raises NoSuchObject from Standard - is private; - - GetEdges (me) - returns MapOfTransient from TColStd - ---C++: return const& - ---Purpose: Returns field for Iterator; - ---Level: Internal - is private; - - fields - - myItem : GraphDS_Item; - myEdges : MapOfTransient from TColStd; - - friends - class DirectedGraph from GraphDS, - class Edge from GraphDS, - class VerticesIterator from GraphDS, - class EdgesIterator from GraphDS - - end; - - - class Edge inherits TShared from MMgt - - ---Purpose: Nested public class Edge (composed of an - -- associated attribute) An Edge is an oriented link - -- between two vertices. - - raises NoMoreObject from Standard , - NoSuchObject from Standard - is - - Create (source,destination : Vertex; value : GraphDS_Attribute) - returns mutable Edge; - --is private; - - GetAttribute (me) - ---Purpose: returns attribute associated to . - ---C++: return const & - ---Level: Internal - returns any GraphDS_Attribute; - - SetAttribute (me : mutable; Value : GraphDS_Attribute); - ---Purpose: To associate a new attribute to . - ---Level: Internal - - Contains (me; V : Vertex) - returns Boolean from Standard; - - Source (me) - ---C++: return const& - ---Purpose: Returns the vertex which originates from . - ---Level: Internal - returns mutable Vertex; - - Destination (me) - ---C++: return const& - ---Purpose: Returns the vertex which destinates to . - ---Level: Internal - returns mutable Vertex; - - Reverse (me : mutable); - ---Purpose: Reverse the orientation of . the source - -- vertex becomes the destination vertex. And - -- the destination the source. - ---Level: Internal - - IsLoop (me) - returns Boolean from Standard; - ---Purpose: Returns True if the source and destination vertices - -- are equal. - ---Level: Internal - - fields - - myAttribute : GraphDS_Attribute; - mySource : Vertex from GraphDS; - myDestination : Vertex from GraphDS; - - friends - class DirectedGraph from GraphDS, - class Vertex from GraphDS, - class VerticesIterator from GraphDS, - class EdgesIterator from GraphDS - - end; - - class VerticesIterator - - ---Purpose: basic tool to iterate on vertices. - -- 1 - vertices member of a DirectedGraph. - -- 2 - adjacent vertices of a given one. - - uses MapOfTransient from TColStd, - MapIteratorOfMapOfTransient from TColStd - - raises NoMoreObject from Standard, - NoSuchObject from Standard - - is - - Create - returns VerticesIterator from GraphDS; - - Create (G : DirectedGraph from GraphDS) - returns VerticesIterator from GraphDS; - - Create (G : DirectedGraph from GraphDS; - V : Vertex from GraphDS) - returns VerticesIterator from GraphDS; - - Initialize (me : in out; G : DirectedGraph from GraphDS); - ---Level: Public - - Initialize (me : in out; G : DirectedGraph from GraphDS; - V : Vertex from GraphDS); - ---Level: Public - - More (me) - returns Boolean from Standard; - ---Level: Public - - Next (me : in out) - raises NoMoreObject from Standard; - ---Level: Public - - Value (me) - ---C++: return const& - ---Level: Public - returns Vertex - raises NoSuchObject from Standard; - - fields - - myMap : MapOfTransient from TColStd; - myVertices : MapIteratorOfMapOfTransient from TColStd; - - end; - - - class EdgesIterator - - ---Purpose: basic tool to iterate on edges : - -- 1 - edges member of a DirectedGraph. - -- 2 - edges referenced by a given vertex. - - uses MapIteratorOfMapOfTransient from TColStd - - raises NoMoreObject from Standard , - NoSuchObject from Standard - - is - - Create - returns EdgesIterator from GraphDS; - - Create (G : DirectedGraph from GraphDS) - returns EdgesIterator from GraphDS; - - Create (G : DirectedGraph from GraphDS; - V : Vertex from GraphDS) - returns EdgesIterator from GraphDS; - - Initialize (me : in out; G : DirectedGraph from GraphDS); - ---Level: Public - - Initialize (me : in out; G : DirectedGraph from GraphDS; - V : Vertex from GraphDS); - ---Level: Public - - More (me) - returns Boolean from Standard; - ---Level: Public - - Next (me : in out) - raises NoMoreObject from Standard; - ---Level: Public - - Value (me) - ---C++: return const& - ---Level: Public - returns Edge - raises NoSuchObject from Standard; - - fields - - myEdges : MapIteratorOfMapOfTransient from TColStd; - - end; - - -is - - Create - returns DirectedGraph from GraphDS; - ---Purpose: Create an empty Directed Graph. - - IsEmpty (me) - returns Boolean from Standard; - ---Level: Public - - NbVertices (me) - returns Integer from Standard; - ---Level: Public - - NbEdges (me) - returns Integer from Standard; - ---Level: Public - - Clear (me : in out); - ---Purpose: removes all edges and vertices of . - ---Level: Public - - Contains (me; E : Edge) - returns Boolean from Standard; - ---Level: Public - - Contains (me; V : Vertex) - returns Boolean from Standard; - ---Level: Public - - IsRoot (me; V : Vertex; ignoreselfloop : Boolean from Standard = Standard_True) - returns Boolean from Standard; - ---Level: Public - - IsLeaf (me; V : Vertex; ignoreselfloop : Boolean from Standard = Standard_True) - returns Boolean from Standard; - ---Level: Public - - Add (me : in out; value : GraphDS_Item) - ---Purpose: Creates a vertex, with a given Item , and - -- Adds it to . Of course this new Vertex - -- (returned by the method) is a "root" and "leaf" - -- vertex of . - ---Level: Public - returns mutable Vertex; - - Remove (me : in out; V : Vertex) - ---Purpose: Removes from . is raised - -- if is not member of . is - -- raised if is used by at least one edge of - ---Level: Public - raises NoSuchObject from Standard, - DomainError from Standard; - - Add (me : in out; source : mutable Vertex; - destination : mutable Vertex; - value : GraphDS_Attribute) - ---Purpose: Creates an Edge, with a given Attribute , - -- from to , and Adds it to - -- . This new edge is returned by the method. - -- is raised if and/or - -- are not members of . - ---Level: Public - returns mutable Edge - raises NoSuchObject from Standard; - - Remove (me : in out; E : Edge) - ---Purpose: Removes from . is raised if - -- is not member of . - ---Level: Public - raises NoSuchObject from Standard; - -fields - - myVertices : MapOfTransient from TColStd; - myEdges : MapOfTransient from TColStd; - -friends - class VerticesIterator from GraphDS, - class EdgesIterator from GraphDS - -end; - - - - - - - - - - - - - - - - - - diff --git a/src/GraphDS/GraphDS_DirectedGraph.gxx b/src/GraphDS/GraphDS_DirectedGraph.gxx deleted file mode 100644 index dde40b7d57..0000000000 --- a/src/GraphDS/GraphDS_DirectedGraph.gxx +++ /dev/null @@ -1,185 +0,0 @@ -// Created on: 1993-03-16 -// Created by: Denis PASCAL -// 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. - -#include -#include - - -//======================================================================= -//function : GraphDS_DirectedGraph -//purpose : -//======================================================================= - -GraphDS_DirectedGraph::GraphDS_DirectedGraph () -{ -} - - -//======================================================================= -//function : NbVertices -//purpose : -//======================================================================= - -Standard_Integer GraphDS_DirectedGraph::NbVertices () const -{ - return myVertices.Extent(); -} - - -//======================================================================= -//function : NbEdges -//purpose : -//======================================================================= - -Standard_Integer GraphDS_DirectedGraph::NbEdges () const -{ - return myEdges.Extent(); -} - - -//======================================================================= -//function : IsEmpty -//purpose : -//======================================================================= - -Standard_Boolean GraphDS_DirectedGraph::IsEmpty () const -{ - return (myVertices.IsEmpty()); -} - - -//======================================================================= -//function : Clear -//purpose : -//======================================================================= - -void GraphDS_DirectedGraph::Clear () -{ - myVertices.Clear(); - myEdges.Clear(); - -} - - -//======================================================================= -//function : Contains -//purpose : -//======================================================================= - -Standard_Boolean GraphDS_DirectedGraph::Contains - (const Handle(GraphDS_Vertex)& V) const -{ - return myVertices.Contains(V); -} - -//======================================================================= -//function : IsRoot -//purpose : -//======================================================================= - -Standard_Boolean GraphDS_DirectedGraph::IsRoot - (const Handle(GraphDS_Vertex)& V, - const Standard_Boolean ignoreselfloop) const -{ - return V->IsRoot(ignoreselfloop); -} - -//======================================================================= -//function : IsLeaf -//purpose : -//======================================================================= - -Standard_Boolean GraphDS_DirectedGraph::IsLeaf - (const Handle(GraphDS_Vertex)& V, - const Standard_Boolean ignoreselfloop) const -{ - return V->IsLeaf(ignoreselfloop); -} - -//======================================================================= -//function : Contains -//purpose : -//======================================================================= - -Standard_Boolean GraphDS_DirectedGraph::Contains - (const Handle(GraphDS_Edge)& E) const -{ - return myEdges.Contains(E); -} - - -//======================================================================= -//function : Add -//purpose : -//======================================================================= - -Handle(GraphDS_Vertex) GraphDS_DirectedGraph::Add - (const GraphDS_Item& value) -{ - Handle(GraphDS_Vertex) V = new GraphDS_Vertex (value); - myVertices.Add(V); - return V; -} - - -//======================================================================= -//function : Remove -//purpose : -//======================================================================= - -void GraphDS_DirectedGraph::Remove (const Handle(GraphDS_Vertex)& V) -{ - if (!V->GetEdges().IsEmpty()) Standard_DomainError::Raise(); - myVertices.Remove(V); -} - - - -//======================================================================= -//function : Add -//purpose : -//======================================================================= - -Handle(GraphDS_Edge) GraphDS_DirectedGraph::Add - (const Handle(GraphDS_Vertex)& source, - const Handle(GraphDS_Vertex)& destination, - const GraphDS_Attribute& A) -{ - Handle(GraphDS_Edge) E = new GraphDS_Edge (source,destination,A); - source->AddEdge (E); - destination->AddEdge(E); - myEdges.Add(E); - return E; -} - - -//======================================================================= -//function : Remove -//purpose : -//======================================================================= - -void GraphDS_DirectedGraph::Remove (const Handle(GraphDS_Edge)& E) -{ - E->Source()->RemoveEdge(E); - E->Destination()->RemoveEdge(E); - myEdges.Remove(E); -} - - - - - - diff --git a/src/GraphDS/GraphDS_Edge.gxx b/src/GraphDS/GraphDS_Edge.gxx deleted file mode 100644 index f533a09f63..0000000000 --- a/src/GraphDS/GraphDS_Edge.gxx +++ /dev/null @@ -1,120 +0,0 @@ -// Created on: 1993-03-16 -// Created by: Denis PASCAL -// 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. - -#include -#include - - -//======================================================================= -//function : GraphDS_Edge -//purpose : -//======================================================================= - -GraphDS_Edge::GraphDS_Edge - (const Handle(GraphDS_Vertex)& source, - const Handle(GraphDS_Vertex)& destination, - const GraphDS_Attribute& value) : myAttribute (value) -{ - mySource = source; - myDestination = destination; -} - - -//======================================================================= -//function : GetAttribute -//purpose : -//======================================================================= - -const GraphDS_Attribute& GraphDS_Edge::GetAttribute () const -{ - return myAttribute; -} - - -//======================================================================= -//function : SetAttribute -//purpose : -//======================================================================= - -void GraphDS_Edge::SetAttribute (const GraphDS_Attribute& Value) -{ - myAttribute = Value; -} - -//======================================================================= -//function : Contains -//purpose : -//======================================================================= - -Standard_Boolean GraphDS_Edge::Contains (const Handle(GraphDS_Vertex)& V) const -{ - return (mySource == V || myDestination == V); -} - -//======================================================================= -//function : Source -//purpose : -//======================================================================= - -const Handle(GraphDS_Vertex)& GraphDS_Edge::Source () const -{ - return mySource; -} - - -//======================================================================= -//function : Destination -//purpose : -//======================================================================= - -const Handle(GraphDS_Vertex)& GraphDS_Edge::Destination () const -{ - return myDestination; -} - - -//======================================================================= -//function : Reverse -//purpose : -//======================================================================= - -void GraphDS_Edge::Reverse () -{ - Handle (GraphDS_Vertex) temp = myDestination; - myDestination = mySource; - mySource = temp; -} - - -//======================================================================= -//function : IsLoop -//purpose : -//======================================================================= - -Standard_Boolean GraphDS_Edge::IsLoop () const -{ - return (myDestination == mySource); -} - - - - - - - - - - diff --git a/src/GraphDS/GraphDS_EdgesIterator.gxx b/src/GraphDS/GraphDS_EdgesIterator.gxx deleted file mode 100644 index ec9d3db1a4..0000000000 --- a/src/GraphDS/GraphDS_EdgesIterator.gxx +++ /dev/null @@ -1,118 +0,0 @@ -// Created on: 1993-03-16 -// Created by: Denis PASCAL -// 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. - -#include -#include - -//======================================================================= -//function : GraphDS_EdgesIterator -//purpose : -//======================================================================= - -GraphDS_EdgesIterator::GraphDS_EdgesIterator () -{ -} - - -//======================================================================= -//function : GraphDS_EdgesIterator -//purpose : -//======================================================================= - -GraphDS_EdgesIterator::GraphDS_EdgesIterator - (const GraphDS_DirectedGraph& G) -{ - Initialize (G); -} - - -//======================================================================= -//function : GraphDS_EdgesIterator -//purpose : -//======================================================================= - -GraphDS_EdgesIterator::GraphDS_EdgesIterator - (const GraphDS_DirectedGraph& G, - const Handle(GraphDS_Vertex)& V) -{ - Initialize (G,V); -} - - -//======================================================================= -//function : Initialize -//purpose : -//======================================================================= - -void GraphDS_EdgesIterator::Initialize - (const GraphDS_DirectedGraph& G) -{ - myEdges.Initialize(G.myEdges); -} - - -//======================================================================= -//function : Initialize -//purpose : -//======================================================================= - -void GraphDS_EdgesIterator::Initialize - (const GraphDS_DirectedGraph&, - const Handle(GraphDS_Vertex)& V) -{ - myEdges.Initialize(V->GetEdges()); -} - - -//======================================================================= -//function : More -//purpose : -//======================================================================= - -Standard_Boolean GraphDS_EdgesIterator::More () const -{ - return myEdges.More(); -} - - -//======================================================================= -//function : Next -//purpose : -//======================================================================= - -void GraphDS_EdgesIterator::Next () -{ - myEdges.Next(); -} - - - -//======================================================================= -//function : Value -//purpose : -//======================================================================= - -const Handle(GraphDS_Edge)& GraphDS_EdgesIterator::Value () const -{ - return *((Handle(GraphDS_Edge)*)& myEdges.Key()); - //return Handle(GraphDS_Edge)::DownCast(myEdges.Key()); -} - - - - - - diff --git a/src/GraphDS/GraphDS_EntitiesIterator.gxx b/src/GraphDS/GraphDS_EntitiesIterator.gxx deleted file mode 100644 index 89bd8d451e..0000000000 --- a/src/GraphDS/GraphDS_EntitiesIterator.gxx +++ /dev/null @@ -1,165 +0,0 @@ -// Created on: 1991-09-10 -// Created by: Denis PASCAL -// Copyright (c) 1991-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. - -// - -#include -#include -#include - -//======================================================================= -//function : GraphDS_EntitiesIterator -//purpose : -//======================================================================= - -GraphDS_EntitiesIterator::GraphDS_EntitiesIterator () -{ -} - -//======================================================================= -//function : GraphDS_EntitiesIterator -//purpose : -//======================================================================= - -GraphDS_EntitiesIterator::GraphDS_EntitiesIterator - (const GraphDS_RelationGraph& G) -{ - Initialize (G); -} - -//======================================================================= -//function : GraphDS_EntitiesIterator -//purpose : -//======================================================================= - -GraphDS_EntitiesIterator::GraphDS_EntitiesIterator - (const GraphDS_RelationGraph& G, - const Handle(GraphDS_Entity)& E) -{ - Initialize (G,E); -} - - -//======================================================================= -//function : GraphDS_EntitiesIterator -//purpose : -//======================================================================= - -GraphDS_EntitiesIterator::GraphDS_EntitiesIterator - (const GraphDS_RelationGraph& G, - const Handle(GraphDS_Relation)& R) -{ - Initialize (G,R); -} - - -//======================================================================= -//function : Initialize -//purpose : -//======================================================================= - -void GraphDS_EntitiesIterator::Initialize - (const GraphDS_RelationGraph& G) -{ - myEntities.Initialize(G.myEntities); -} - - -//======================================================================= -//function : Initialize -//purpose : adjacent entities search -//======================================================================= - -void GraphDS_EntitiesIterator::Initialize - (const GraphDS_RelationGraph&, - const Handle(GraphDS_Entity)& E) -{ - myMap.Clear(); - - Handle(GraphDS_Relation) REL; - GraphDS_DataMapIteratorOfEntityRoleMap itv; - TColStd_MapIteratorOfMapOfTransient itr; - - for (itr.Initialize(E->GetRelations());itr.More();itr.Next()) { - REL = Handle(GraphDS_Relation)::DownCast(itr.Key()); - if (REL->IsInput(E)) { - for (itv.Initialize(REL->GetEntities());itv.More();itv.Next()) { - if (itv.Value() != GraphDS_OnlyInput) { - myMap.Add(itv.Key()); - } - } - } - } - myEntities.Initialize(myMap); -} - - -//======================================================================= -//function : Initialize -//purpose : -//======================================================================= - -void GraphDS_EntitiesIterator::Initialize - (const GraphDS_RelationGraph&, - const Handle(GraphDS_Relation)& R) -{ - myMap.Clear(); - GraphDS_DataMapIteratorOfEntityRoleMap itv; - for (itv.Initialize(R->GetEntities());itv.More();itv.Next()) { - myMap.Add(itv.Key()); - } - myEntities.Initialize(myMap); -} - - -//======================================================================= -//function : More -//purpose : -//======================================================================= - -Standard_Boolean GraphDS_EntitiesIterator::More () const -{ - return myEntities.More(); -} - - -//======================================================================= -//function : Next -//purpose : -//======================================================================= - -void GraphDS_EntitiesIterator::Next () -{ - myEntities.Next(); -} - - -//======================================================================= -//function : Value -//purpose : -//======================================================================= - -const Handle(GraphDS_Entity)& GraphDS_EntitiesIterator::Value () const -{ - return *((Handle(GraphDS_Entity)*)& myEntities.Key()); - //return Handle(GraphDS_Entity)::DownCast(myEntities.Key()); -} - - - - - - diff --git a/src/GraphDS/GraphDS_Entity.gxx b/src/GraphDS/GraphDS_Entity.gxx deleted file mode 100644 index 075be3d49f..0000000000 --- a/src/GraphDS/GraphDS_Entity.gxx +++ /dev/null @@ -1,154 +0,0 @@ -// Created on: 1991-09-10 -// Created by: Denis PASCAL -// Copyright (c) 1991-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. - -// - -# include -# include - -//======================================================================= -//function : GraphDS_Entity -//purpose : -//======================================================================= - -GraphDS_Entity::GraphDS_Entity - (const GraphDS_Item& item) : myItem(item) -{ -} - - -//======================================================================= -//function : GetItem -//purpose : -//======================================================================= - -const GraphDS_Item& GraphDS_Entity::GetItem() const -{ - return myItem; -} - - -//======================================================================= -//function : Contains -//purpose : -//======================================================================= - -Standard_Boolean GraphDS_Entity::Contains - (const Handle(GraphDS_Relation)& R) const -{ - return myRelations.Contains(R); -} - -//======================================================================= -//function : Add -//purpose : -//======================================================================= - -void GraphDS_Entity::Add (const Handle(GraphDS_Relation)& R) -{ - myRelations.Add(R); -} - - -//======================================================================= -//function : Remove -//purpose : -//======================================================================= - -void GraphDS_Entity::Remove (const Handle(GraphDS_Relation)& R) -{ - myRelations.Remove(R); -} - - -//======================================================================= -//function : HasRelation -//purpose : -//======================================================================= - -Standard_Boolean GraphDS_Entity::HasRelation () const -{ - return !myRelations.IsEmpty(); -} - - -//======================================================================= -//function : GetRole -//purpose : -//======================================================================= - -GraphDS_RelationRole GraphDS_Entity::GetRole - (const Handle(GraphDS_Relation)& R) const -{ - GraphDS_RelationRole RR; - Handle(GraphDS_Entity) me = this; - GraphDS_EntityRole ER = R->GetRole(me); - switch(ER) { - case GraphDS_OnlyInput: - RR = GraphDS_OnlyFront; - break; - case GraphDS_OnlyOutput: - RR = GraphDS_OnlyBack; - break; - case GraphDS_InputAndOutput: - RR = GraphDS_FrontAndBack; - break; - } - return RR; -} - - -//======================================================================= -//function : IsFront -//purpose : -//======================================================================= - -Standard_Boolean GraphDS_Entity::IsFront -(const Handle(GraphDS_Relation)& R) const -{ - Handle(GraphDS_Entity) me = this; - return R->IsInput(me); -} - - -//======================================================================= -//function : IsBack -//purpose : -//======================================================================= - -Standard_Boolean GraphDS_Entity::IsBack - (const Handle(GraphDS_Relation)& R) const -{ - Handle(GraphDS_Entity) me = this; - return R->IsOutput(me); -} - - -//======================================================================= -//function : GetRelations -//purpose : -//======================================================================= - -const TColStd_MapOfTransient& GraphDS_Entity::GetRelations() const -{ - return myRelations; -} - - - - - - diff --git a/src/GraphDS/GraphDS_IncidentEntitiesIterator.gxx b/src/GraphDS/GraphDS_IncidentEntitiesIterator.gxx deleted file mode 100644 index 02dfa15bd9..0000000000 --- a/src/GraphDS/GraphDS_IncidentEntitiesIterator.gxx +++ /dev/null @@ -1,326 +0,0 @@ -// Created on: 1991-10-15 -// Created by: Denis PASCAL -// Copyright (c) 1991-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. - -// - -#include -#include -#include - -//======================================================================= -//function : Create -//purpose : -//======================================================================= - -GraphDS_IncidentEntitiesIterator::GraphDS_IncidentEntitiesIterator () -{ -} - - -//======================================================================= -//function : Create -//purpose : -//======================================================================= - -GraphDS_IncidentEntitiesIterator::GraphDS_IncidentEntitiesIterator - (const GraphDS_RelationGraph& G, - const Handle(GraphDS_Entity)& V) -{ - Initialize (G,V); -} - - -//======================================================================= -//function : Initialize -//purpose : -//======================================================================= - -void GraphDS_IncidentEntitiesIterator::Initialize - (const GraphDS_RelationGraph&, - const Handle(GraphDS_Entity)& E) -{ - myMap.Clear(); - - Handle(GraphDS_Relation) REL; - GraphDS_DataMapIteratorOfEntityRoleMap itv; - TColStd_MapIteratorOfMapOfTransient itr; - - for (itr.Initialize(E->GetRelations());itr.More();itr.Next()) { - REL = Handle(GraphDS_Relation)::DownCast(itr.Key()); - if (REL->IsOutput(E)) { - for (itv.Initialize(REL->GetEntities());itv.More();itv.Next()) { - if (itv.Value() != GraphDS_OnlyOutput) { - myMap.Add(itv.Key()); - } - } - } - } - myEntities.Initialize(myMap); -} - - - -//======================================================================= -//function : More -//purpose : -//======================================================================= - -Standard_Boolean GraphDS_IncidentEntitiesIterator::More () const -{ - return myEntities.More(); -} - - -//======================================================================= -//function : Next -//purpose : -//======================================================================= - -void GraphDS_IncidentEntitiesIterator::Next () -{ - myEntities.Next(); -} - - -//======================================================================= -//function : Value -//purpose : -//======================================================================= - -const Handle(GraphDS_Entity)& GraphDS_IncidentEntitiesIterator::Value () const -{ - return *((Handle(GraphDS_Entity)*)& myEntities.Key()); - // return Handle(GraphDS_Entity)::DownCast(myEntities.Key()); -} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/GraphDS/GraphDS_IncidentRelationsIterator.gxx b/src/GraphDS/GraphDS_IncidentRelationsIterator.gxx deleted file mode 100644 index e523072fab..0000000000 --- a/src/GraphDS/GraphDS_IncidentRelationsIterator.gxx +++ /dev/null @@ -1,115 +0,0 @@ -// Created on: 1991-09-10 -// Created by: Denis PASCAL -// Copyright (c) 1991-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. - -// - -#include -#include -#include - -//======================================================================= -//function : GraphDS_IncidentRelationsIterator -//purpose : -//======================================================================= - -GraphDS_IncidentRelationsIterator::GraphDS_IncidentRelationsIterator () -{ -} - - -//======================================================================= -//function : GraphDS_IncidentRelationsIterator -//purpose : -//======================================================================= - -GraphDS_IncidentRelationsIterator::GraphDS_IncidentRelationsIterator - (const GraphDS_RelationGraph& G, - const Handle(GraphDS_Relation)& R) -{ - Initialize (G,R); -} - - -//======================================================================= -//function : GraphDS_Initialize -//purpose : -//======================================================================= - -void GraphDS_IncidentRelationsIterator::Initialize - (const GraphDS_RelationGraph&, - const Handle(GraphDS_Relation)& R) -{ - - myMap.Clear(); - - Handle(GraphDS_Entity) ENT; - Handle(GraphDS_Relation) REL; - GraphDS_DataMapIteratorOfEntityRoleMap itv; - TColStd_MapIteratorOfMapOfTransient itr; - - for (itv.Initialize(R->GetEntities());itv.More();itv.Next()) { - ENT = Handle(GraphDS_Entity)::DownCast(itv.Key()); - if (itv.Value() != GraphDS_OnlyOutput) { - for (itr.Initialize(ENT->GetRelations()); itr.More(); itr.Next()) { - REL = Handle(GraphDS_Relation)::DownCast(itr.Key()); - if (REL->IsOutput(ENT)) myMap.Add(REL); - } - } - } - myRelations.Initialize(myMap); -} - - -//======================================================================= -//function : More -//purpose : -//======================================================================= - -Standard_Boolean GraphDS_IncidentRelationsIterator::More () const -{ - return myRelations.More(); -} - - -//======================================================================= -//function : Next -//purpose : -//======================================================================= - -void GraphDS_IncidentRelationsIterator::Next () -{ - myRelations.Next(); -} - - -//======================================================================= -//function : Value -//purpose : -//======================================================================= - -const Handle(GraphDS_Relation)& GraphDS_IncidentRelationsIterator::Value () const -{ - return *((Handle(GraphDS_Relation)*)& myRelations.Key()); - //return Handle(GraphDS_Relation)::DownCast(myRelations.Key()); -} - - - - - - - - diff --git a/src/GraphDS/GraphDS_Relation.gxx b/src/GraphDS/GraphDS_Relation.gxx deleted file mode 100644 index b2bf36ee91..0000000000 --- a/src/GraphDS/GraphDS_Relation.gxx +++ /dev/null @@ -1,209 +0,0 @@ -// Created on: 1991-10-11 -// Created by: Denis PASCAL -// Copyright (c) 1991-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. - -// - -# include -# include - -//======================================================================= -//function : GraphDS_Relation -//purpose : -//======================================================================= - -GraphDS_Relation::GraphDS_Relation - (const GraphDS_Attribute& att) : myAttribute(att) -{ -} - - -//======================================================================= -//function : GetAttribute -//purpose : -//======================================================================= - -const GraphDS_Attribute& GraphDS_Relation::GetAttribute () const -{ - return myAttribute; -} - - -//======================================================================= -//function : Contains -//purpose : -//======================================================================= - -Standard_Boolean GraphDS_Relation::Contains - (const Handle(GraphDS_Entity)& E) const -{ - return myEntities.IsBound(E); -} - - -//======================================================================= -//function : IsEmpty -//purpose : -//======================================================================= - -Standard_Boolean GraphDS_Relation::IsEmpty () const -{ - return myEntities.IsEmpty(); -} - - -//======================================================================= -//function : Add -//purpose : -//======================================================================= - -void GraphDS_Relation::Add - (const Handle(GraphDS_Entity)& E, const GraphDS_EntityRole R) -{ - myEntities.Bind(E,R); -} - -//======================================================================= -//function : SetRole -//purpose : -//======================================================================= - -void GraphDS_Relation::SetRole - (const Handle(GraphDS_Entity)& E, const GraphDS_EntityRole R) -{ - myEntities(E) = R; -} - - -//======================================================================= -//function : Remove -//purpose : -//======================================================================= - -void GraphDS_Relation::Remove (const Handle(GraphDS_Entity)& E) -{ - myEntities.UnBind(E); -} - - -//======================================================================= -//function : GetRole -//purpose : -//======================================================================= - -GraphDS_EntityRole GraphDS_Relation::GetRole - (const Handle(GraphDS_Entity)& E) const -{ - return myEntities(E); -} - - -//======================================================================= -//function : IsInput -//purpose : -//======================================================================= - -Standard_Boolean GraphDS_Relation::IsInput - (const Handle(GraphDS_Entity)& E) const -{ - return (myEntities(E) != GraphDS_OnlyOutput); -} - - -//======================================================================= -//function : IsOutput -//purpose : -//======================================================================= - -Standard_Boolean GraphDS_Relation::IsOutput - (const Handle(GraphDS_Entity)& E) const -{ - return (myEntities(E) != GraphDS_OnlyInput); -} - - -//======================================================================= -//function : GetEntities -//purpose : -//======================================================================= - -const GraphDS_EntityRoleMap& GraphDS_Relation::GetEntities() const -{ - return myEntities; -} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/GraphDS/GraphDS_RelationGraph.cdl b/src/GraphDS/GraphDS_RelationGraph.cdl deleted file mode 100644 index dd0ff982d6..0000000000 --- a/src/GraphDS/GraphDS_RelationGraph.cdl +++ /dev/null @@ -1,523 +0,0 @@ --- Created on: 1991-09-06 --- Created by: Denis PASCAL --- Copyright (c) 1991-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. - -generic class RelationGraph from GraphDS - (GraphDS_Item as any; - GraphDS_Attribute as any) - - ---Purpose: This generic class describe a network (or graph) of - -- Relations between Entities. an Item can be associated - -- to the Entity and respectively an Attribute to the - -- Relation. This class can be compared to the - -- DirectedGraph of this package. But here the Relation - -- (compared to the Edge) can describe links between more - -- than two Entities. Each link can be described as - -- oriented or not. Nested classes permit to edit and - -- visit that structure. Interface of visiting tools are - -- done as iterators. - - -uses TShared from MMgt, - MapOfTransient from TColStd, - EntityRole from GraphDS - -raises NoSuchObject from Standard, - NoMoreObject from Standard, - DomainError from Standard - - class Entity from GraphDS inherits TShared from MMgt - - uses RelationRole from GraphDS, - MapOfTransient from TColStd - - is - - Create (value : GraphDS_Item) - returns mutable Entity from GraphDS; - - GetItem (me) - ---Level: Internal - ---C++ : return const& - returns any GraphDS_Item; - - Contains (me; R : Relation from GraphDS) - ---Level: Internal - returns Boolean from Standard; - - HasRelation (me) - ---Level: Internal - returns Boolean from Standard; - - GetRole (me; R : Relation from GraphDS) - ---Level: Internal - returns RelationRole from GraphDS; - - IsFront (me; R : Relation from GraphDS) - ---Level: Internal - returns Boolean from Standard; - - IsBack (me; R : Relation from GraphDS) - ---Level: Internal - returns Boolean from Standard; - - Add (me : mutable; R : Relation from GraphDS) - is private; - - Remove (me : mutable; R : Relation from GraphDS) - is private; - - GetRelations (me) - ---C++: return const& - returns MapOfTransient from TColStd - is private; - - fields - - myItem : GraphDS_Item; - myRelations : MapOfTransient from TColStd; - - friends - - class RelationGraph from GraphDS, - class EntitiesIterator from GraphDS, - class IncidentEntitiesIterator from GraphDS, - class RelationsIterator from GraphDS, - class IncidentRelationsIterator from GraphDS - - end Entity from GraphDS; - - - class Relation inherits TShared from MMgt - - uses EntityRole from GraphDS, - EntityRoleMap from GraphDS - - is - - Create (value : GraphDS_Attribute) - returns mutable Relation; - - GetAttribute (me) - ---Level: Internal - ---C++: return const& - returns any GraphDS_Attribute; - - Contains (me; E : Entity from GraphDS) - ---Level: Internal - returns Boolean from Standard; - - IsEmpty (me) - ---Level: Internal - returns Boolean from Standard; - - GetRole (me; E : Entity from GraphDS) - ---Level: Internal - returns EntityRole from GraphDS; - - IsInput (me; E : Entity from GraphDS) - ---Level: Internal - returns Boolean from Standard; - - IsOutput (me; E : Entity from GraphDS) - ---Level: Internal - returns Boolean from Standard; - - Remove (me : mutable; E : Entity from GraphDS) - is private; - - Add (me : mutable; E : Entity from GraphDS; - R : EntityRole from GraphDS) - is private; - - SetRole (me : mutable; E : Entity from GraphDS; - R : EntityRole from GraphDS) - is private; - - GetEntities (me) - ---C++: return const& - returns EntityRoleMap from GraphDS - is private; - - fields - - myAttribute : GraphDS_Attribute; - myEntities : EntityRoleMap from GraphDS; - - friends - - class RelationGraph from GraphDS, - class EntitiesIterator from GraphDS, - class IncidentEntitiesIterator from GraphDS, - class RelationsIterator from GraphDS, - class IncidentRelationsIterator from GraphDS - - end Relation; - - - class EntitiesIterator from GraphDS - - ---Purpose: Public nested class which defines an iterator to - -- visit each Entity member of a given RelationGraph. - - uses MapOfTransient from TColStd, - MapIteratorOfMapOfTransient from TColStd - - raises NoMoreObject from Standard, - NoSuchObject from Standard - is - - Create - returns EntitiesIterator from GraphDS; - - Create (G : RelationGraph from GraphDS) - returns EntitiesIterator from GraphDS; - - Create (G : RelationGraph from GraphDS; - E : Entity from GraphDS) - returns EntitiesIterator from GraphDS; - - Create (G : RelationGraph from GraphDS; - E : Relation from GraphDS) - returns EntitiesIterator from GraphDS; - - Initialize (me : in out; G : RelationGraph from GraphDS); - ---Level: Public - - Initialize (me : in out; G : RelationGraph from GraphDS; - E : Entity from GraphDS); - ---Level: Public - - Initialize (me : in out; G : RelationGraph from GraphDS; - R : Relation from GraphDS); - ---Level: Public - - More (me) - ---Level: Public - returns Boolean from Standard; - - Next (me : in out) - ---Level: Public - raises NoMoreObject from Standard; - - Value (me) - ---C++: return const& - ---Level: Public - returns Entity from GraphDS - raises NoSuchObject from Standard; - - fields - - myMap : MapOfTransient from TColStd; - myEntities : MapIteratorOfMapOfTransient from TColStd; - - end EntitiesIterator; - - - class RelationsIterator from GraphDS - - ---Purpose: Public nested class which defines an iterator to - -- visit each Relation member of a given - -- RelationGraph. - - uses MapOfTransient from TColStd, - MapIteratorOfMapOfTransient from TColStd - - raises NoMoreObject from Standard, - NoSuchObject from Standard - is - - Create - returns RelationsIterator from GraphDS; - - Create (G : RelationGraph from GraphDS) - returns RelationsIterator from GraphDS; - - Create (G : RelationGraph from GraphDS; - R : Relation from GraphDS) - returns RelationsIterator from GraphDS; - - Create (G : RelationGraph from GraphDS; - E : Entity from GraphDS) - returns RelationsIterator from GraphDS; - - Initialize (me : in out; G : RelationGraph from GraphDS); - ---Level: Public - - Initialize (me : in out; G : RelationGraph from GraphDS; - R : Relation from GraphDS); - ---Level: Public - - Initialize (me : in out; G : RelationGraph from GraphDS; - E : Entity from GraphDS); - ---Level: Public - - More (me) - returns Boolean from Standard; - ---Level: Public - - Next (me : in out) - raises NoMoreObject from Standard; - ---Level: Public - - Value (me) - ---C++: return const& - returns Relation from GraphDS - raises NoSuchObject from Standard; - ---Level: Public - - fields - - myMap : MapOfTransient from TColStd; - myRelations : MapIteratorOfMapOfTransient from TColStd; - - end RelationsIterator; - - - class IncidentEntitiesIterator from GraphDS - - uses MapOfTransient from TColStd, - MapIteratorOfMapOfTransient from TColStd - - raises NoMoreObject from Standard, - NoSuchObject from Standard - - is - - Create - returns IncidentEntitiesIterator from GraphDS; - - Create (G : RelationGraph from GraphDS; - E : Entity from GraphDS) - returns IncidentEntitiesIterator from GraphDS; - - Initialize (me : in out; G : RelationGraph from GraphDS; - E : Entity from GraphDS); - ---Level: Public - - More (me) - ---Level: Public - returns Boolean from Standard; - - Next (me : in out) - ---Level: Public - raises NoMoreObject from Standard; - - Value (me) - ---C++: return const& - ---Level: Public - returns Entity from GraphDS - raises NoSuchObject from Standard; - - fields - - myMap : MapOfTransient from TColStd; - myEntities : MapIteratorOfMapOfTransient from TColStd; - - end IncidentEntitiesIterator; - - - class IncidentRelationsIterator from GraphDS - - uses MapOfTransient from TColStd, - MapIteratorOfMapOfTransient from TColStd - - raises NoMoreObject from Standard, - NoSuchObject from Standard - is - Create - returns IncidentRelationsIterator from GraphDS; - - Create (G : RelationGraph from GraphDS; - R : Relation from GraphDS) - returns IncidentRelationsIterator from GraphDS; - - Initialize (me : in out; G : RelationGraph from GraphDS; - R : Relation from GraphDS); - ---Level: Public - - More (me) - ---Level: Public - returns Boolean from Standard; - - Next (me : in out) - ---Level: Public - raises NoMoreObject from Standard; - - Value (me) - ---C++: return const& - ---Level: Public - returns Relation from GraphDS - raises NoSuchObject from Standard; - - fields - - myMap : MapOfTransient from TColStd; - myRelations : MapIteratorOfMapOfTransient from TColStd; - - end IncidentRelationsIterator; - -is - - Create - returns RelationGraph from GraphDS; - ---Purpose: Creates an empty relation graph. - - Create (other : RelationGraph from GraphDS) - returns RelationGraph from GraphDS; - - IsEmpty (me) - ---Purpose: tests if contains any Entity. - ---Level: Public - returns Boolean from Standard; - - Clear (me : in out); - ---Purpose: Removes all the Entities and all the relations of - -- . - ---Level: Public - - Contains (me; E : Entity from GraphDS) - ---Purpose: tests if contains . - ---Level: Public - returns Boolean from Standard; - - Contains (me; R : Relation from GraphDS) - ---Purpose: tests if contains . - ---Level: Public - returns Boolean from Standard; - - NbEntities (me) - ---Purpose: returns the number of Entity of me. - ---Level: Public - returns Integer from Standard; - - NbRelations (me) - ---Purpose: returns the number of Relations of . - ---Level: Public - returns Integer from Standard; - - IsInRelation (me; E : Entity from GraphDS) - ---Purpose: To Know if is in relation (as input,output - -- or both as well) with others Entities of . - ---Level: Public - returns Boolean from Standard - raises NoSuchObject from Standard; - - IsInput (me; E : Entity from GraphDS) - returns Boolean from Standard - ---Purpose: returns True if - ---Level: Public - raises NoSuchObject from Standard; - - IsOutput (me; E : Entity from GraphDS) - returns Boolean from Standard - ---Purpose: returns True if is at least output of one of - -- its relation. - ---Level: Public - raises NoSuchObject from Standard; - - IsDependent (me; E : Entity from GraphDS) - returns Boolean from Standard - ---Purpose: returns True if is not input of one of its - -- relation. - ---Level: Public - raises NoSuchObject from Standard; - - AddEntity (me : in out; value : GraphDS_Item) - ---Purpose: Creates an adds a new Entity (which contains item) - -- to . - ---Level: Public - returns Entity from GraphDS; - - RemoveEntity (me : in out; E : Entity from GraphDS) - ---Purpose: Removes a Entity of . Be carefull than an - -- exception is raised if is still member of any - -- relation of . - ---Level: Public - raises NoSuchObject from Standard, - DomainError from Standard; - - AddRelation (me : in out; value : GraphDS_Attribute) - ---Purpose: Creates an adds a new Relation (which contains - -- attribute) to . - ---Level: Public - returns Relation from GraphDS; - - RemoveRelation (me : in out; R : Relation from GraphDS) - ---Purpose: Removes a relation of . - ---Level: Public - raises NoSuchObject from Standard; - - ---Purpose: relation editing function - - IsEmpty (me; R : Relation) - ---Purpose: returns TRUE if noone entity is member of . - ---Level: Public - returns Boolean from Standard - raises NoSuchObject from Standard; - - Add (me : in out; R : Relation; E : Entity) - ---Purpose: add an InputAndOutput entity to - ---Level: Public - raises NoSuchObject from Standard; - - AddInput (me : in out; R : Relation; E : Entity) - ---Purpose: add OnlyInput entity to . - ---Level: Public - raises NoSuchObject from Standard; - - AddOutput (me : in out; R : Relation; E : Entity) - ---Purpose: add an OnlyOutput entity to . - ---Level: Public - raises NoSuchObject from Standard; - - Add (me : in out; R : Relation; - E : Entity; - role : EntityRole from GraphDS) - ---Purpose: add an entity to with role . - ---Level: Public - raises NoSuchObject from Standard; - - SetRole (me : in out; R : Relation; - E : Entity; - role : EntityRole from GraphDS) - ---Purpose: set a new role for the entity member of . - ---Level: Public - raises NoSuchObject from Standard; - - Remove (me : in out; R : Relation; E : Entity) - ---Purpose: remove the entity member of . - ---Level: Public - raises NoSuchObject from Standard; - -fields - - myEntities : MapOfTransient from TColStd; - myRelations : MapOfTransient from TColStd; - -friends - - class EntitiesIterator from GraphDS, - class RelationsIterator from GraphDS - -end RelationGraph; - - - - - - - - diff --git a/src/GraphDS/GraphDS_RelationGraph.gxx b/src/GraphDS/GraphDS_RelationGraph.gxx deleted file mode 100644 index d9f2a724c0..0000000000 --- a/src/GraphDS/GraphDS_RelationGraph.gxx +++ /dev/null @@ -1,325 +0,0 @@ -// Created on: 1991-09-09 -// Created by: Denis PASCAL -// Copyright (c) 1991-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. - -// - -#include -#include -#include -#include - -//======================================================================= -//function : GraphDS_RelationGraph -//purpose : -//======================================================================= - -GraphDS_RelationGraph::GraphDS_RelationGraph () -{ -} - - -//======================================================================= -//function : GraphDS_RelationGraph -//purpose : -//======================================================================= - -GraphDS_RelationGraph::GraphDS_RelationGraph - (const GraphDS_RelationGraph& other) -{ - myEntities = other.myEntities; - myRelations = other.myRelations; -} - - -//======================================================================= -//function : IsEmpty -//purpose : -//======================================================================= - -Standard_Boolean GraphDS_RelationGraph::IsEmpty () const -{ - return myEntities.Extent() ==0; -} - - -//======================================================================= -//function : Clear -//purpose : -//======================================================================= - -void GraphDS_RelationGraph::Clear () -{ - myEntities.Clear(); - myRelations.Clear(); -} - - -//======================================================================= -//function : Contains -//purpose : -//======================================================================= - -Standard_Boolean GraphDS_RelationGraph::Contains - (const Handle(GraphDS_Entity)& V) const -{ - return myEntities.Contains(V); -} - - -//======================================================================= -//function : IsInRelation -//purpose : -//======================================================================= - -Standard_Boolean GraphDS_RelationGraph::IsInRelation - (const Handle(GraphDS_Entity)& V) const -{ - return (V->HasRelation()); -} - - -//======================================================================= -//function : IsInput -//purpose : -//======================================================================= - -Standard_Boolean GraphDS_RelationGraph::IsInput - (const Handle(GraphDS_Entity)& V) const -{ - return !IsDependent(V); -} - - -//======================================================================= -//function : IsOutput -//purpose : -//======================================================================= - -Standard_Boolean GraphDS_RelationGraph::IsOutput - (const Handle(GraphDS_Entity)& V) const -{ - if (V->GetRelations().IsEmpty()) return Standard_True; - TColStd_MapIteratorOfMapOfTransient it (V->GetRelations()); - for (;it.More();it.Next()) { - if (Handle(GraphDS_Relation)::DownCast(it.Key())->IsOutput(V)) return Standard_True; - } - return Standard_False; -} - - -//======================================================================= -//function : IsDependent -//purpose : il est seulement sortie d'une au moins de ses relations -//======================================================================= - -Standard_Boolean GraphDS_RelationGraph::IsDependent - (const Handle(GraphDS_Entity)& E) const -{ - if (E->GetRelations().IsEmpty()) return Standard_False; - TColStd_MapIteratorOfMapOfTransient it (E->GetRelations()); - for (;it.More();it.Next()) { - if (Handle(GraphDS_Relation)::DownCast(it.Key())->IsOutput(E)) { - if (!Handle(GraphDS_Relation)::DownCast(it.Key())->IsInput(E))return Standard_True; - } - } - return Standard_False; -} - -//======================================================================= -//function : Contains -//purpose : -//======================================================================= - -Standard_Boolean GraphDS_RelationGraph::Contains - (const Handle(GraphDS_Relation)& R) const -{ - return (myRelations.Contains(R)); -} - - -//======================================================================= -//function : NbEntities -//purpose : -//======================================================================= - -Standard_Integer GraphDS_RelationGraph::NbEntities() const -{ - return myEntities.Extent(); -} - - -//======================================================================= -//function : NbRelations -//purpose : -//======================================================================= - -Standard_Integer GraphDS_RelationGraph::NbRelations() const -{ - return myRelations.Extent(); -} - - -//======================================================================= -//function : AddEntity -//purpose : -//======================================================================= - -Handle(GraphDS_Entity) GraphDS_RelationGraph::AddEntity - (const GraphDS_Item& item) -{ - Handle(GraphDS_Entity) entity = new GraphDS_Entity(item); - myEntities.Add(entity); - return entity; -} - - -//======================================================================= -//function : RemoveEntity -//purpose : Removes an Entity of the relation graph -//======================================================================= - -void GraphDS_RelationGraph::RemoveEntity - (const Handle(GraphDS_Entity)& E) -{ - if (E->HasRelation()) Standard_DomainError::Raise(); - myEntities.Remove(E); -} - - -//======================================================================= -//function : AddRelation -//purpose : -//======================================================================= -Handle(GraphDS_Relation) GraphDS_RelationGraph::AddRelation - (const GraphDS_Attribute& att) -{ - Handle(GraphDS_Relation) newrel = new GraphDS_Relation(att); - myRelations.Add(newrel); - return newrel; -} - -//======================================================================= -//function : IsEmpty -//purpose : -//======================================================================= - -Standard_Boolean GraphDS_RelationGraph::IsEmpty - (const Handle(GraphDS_Relation)& R) const -{ - return R->IsEmpty(); -} - - -//======================================================================= -//function : Add -//purpose : InputAndOutput -//======================================================================= -void GraphDS_RelationGraph::Add - (const Handle(GraphDS_Relation)& R, - const Handle(GraphDS_Entity)& E) -{ - Add (R,E,GraphDS_InputAndOutput); -} - -//======================================================================= -//function : AddInput -//purpose : OnlyInput -//======================================================================= -void GraphDS_RelationGraph::AddInput - (const Handle(GraphDS_Relation)& R, - const Handle(GraphDS_Entity)& E) -{ - Add (R,E,GraphDS_OnlyInput); -} - -//======================================================================= -//function : AddOutput -//purpose : OnlyOutput -//======================================================================= -void GraphDS_RelationGraph::AddOutput - (const Handle(GraphDS_Relation)& R, - const Handle(GraphDS_Entity)& E) -{ - Add (R,E,GraphDS_OnlyOutput); -} - -//======================================================================= -//function : Add -//purpose : -//======================================================================= -void GraphDS_RelationGraph::Add - (const Handle(GraphDS_Relation)& R, - const Handle(GraphDS_Entity)& E, - const GraphDS_EntityRole role) -{ - R->Add(E,role); - E->Add(R); -} - -//======================================================================= -//function : SetRole -//purpose : -//======================================================================= -void GraphDS_RelationGraph::SetRole - (const Handle(GraphDS_Relation)& R, - const Handle(GraphDS_Entity)& E, - const GraphDS_EntityRole role) -{ - R->SetRole(E,role); -} - - -//======================================================================= -//function : Remove -//purpose : -//======================================================================= -void GraphDS_RelationGraph::Remove - (const Handle(GraphDS_Relation)& R, - const Handle(GraphDS_Entity)& E) -{ - R->Remove(E); - E->Remove(R); -} - - -//======================================================================= -//function : RemoveRelation -//purpose : Removes a relation of the relation graph -//======================================================================= - -void GraphDS_RelationGraph::RemoveRelation - (const Handle(GraphDS_Relation)& R) -{ - Handle(GraphDS_Entity) ENT; - GraphDS_DataMapIteratorOfEntityRoleMap it; - for (it.Initialize(R->GetEntities());it.More();it.Next()) { - ENT = Handle(GraphDS_Entity)::DownCast(it.Key()); - ENT->Remove(R); - } - myRelations.Remove(R); -} - - - - - - - - - - - - diff --git a/src/GraphDS/GraphDS_RelationsIterator.gxx b/src/GraphDS/GraphDS_RelationsIterator.gxx deleted file mode 100644 index 35bae75401..0000000000 --- a/src/GraphDS/GraphDS_RelationsIterator.gxx +++ /dev/null @@ -1,156 +0,0 @@ -// Created on: 1991-09-10 -// Created by: Denis PASCAL -// Copyright (c) 1991-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. - -// - -#include -#include -#include - -//======================================================================= -//function : GraphDS_RelationsIterator -//purpose : -//======================================================================= - -GraphDS_RelationsIterator::GraphDS_RelationsIterator () -{ -} - -//======================================================================= -//function : GraphDS_RelationsIterator -//purpose : -//======================================================================= - -GraphDS_RelationsIterator::GraphDS_RelationsIterator - (const GraphDS_RelationGraph& G) -{ - Initialize (G); -} - -//======================================================================= -//function : GraphDS_RelationsIterator -//purpose : -//======================================================================= - -GraphDS_RelationsIterator::GraphDS_RelationsIterator - (const GraphDS_RelationGraph& G, - const Handle(GraphDS_Entity)& E) -{ - Initialize(G,E); -} - -//======================================================================= -//function : GraphDS_RelationsIterator -//purpose : -//======================================================================= - -GraphDS_RelationsIterator::GraphDS_RelationsIterator - (const GraphDS_RelationGraph& G, - const Handle(GraphDS_Relation)& R) -{ - Initialize(G,R); -} - - -//======================================================================= -//function : Initialize -//purpose : -//======================================================================= - -void GraphDS_RelationsIterator::Initialize - (const GraphDS_RelationGraph& G) -{ - myRelations.Initialize(G.myRelations); -} - - -//======================================================================= -//function : Initialize -//purpose : -//======================================================================= - -void GraphDS_RelationsIterator::Initialize - (const GraphDS_RelationGraph&, - const Handle(GraphDS_Entity)& E) -{ - myRelations.Initialize(E->GetRelations()); -} - - -//======================================================================= -//function : Initialize -//purpose : -//======================================================================= - -void GraphDS_RelationsIterator::Initialize - (const GraphDS_RelationGraph&, - const Handle(GraphDS_Relation)& R) -{ - myMap.Clear(); - - Handle(GraphDS_Entity) ENT; - Handle(GraphDS_Relation) REL; - GraphDS_DataMapIteratorOfEntityRoleMap itv; - TColStd_MapIteratorOfMapOfTransient itr; - - for (itv.Initialize(R->GetEntities());itv.More();itv.Next()) { - ENT = Handle(GraphDS_Entity)::DownCast(itv.Key()); - if (itv.Value() != GraphDS_OnlyInput) { - for (itr.Initialize(ENT->GetRelations()); itr.More(); itr.Next()) { - REL = Handle(GraphDS_Relation)::DownCast(itr.Key()); - if (REL->IsInput(ENT)) myMap.Add(REL); - } - } - } - myRelations.Initialize(myMap); -} - - -//======================================================================= -//function : More -//purpose : -//======================================================================= - -Standard_Boolean GraphDS_RelationsIterator::More () const -{ - return myRelations.More(); -} - - -//======================================================================= -//function : Next -//purpose : -//======================================================================= - -void GraphDS_RelationsIterator::Next () -{ - myRelations.Next(); -} - - -//======================================================================= -//function : Value -//purpose : -//======================================================================= - -const Handle(GraphDS_Relation)& GraphDS_RelationsIterator::Value () const -{ - return *((Handle(GraphDS_Relation)*)& myRelations.Key()); - //return Handle(GraphDS_Relation)::DownCast(myRelations.Key()); -} - - - diff --git a/src/GraphDS/GraphDS_Vertex.gxx b/src/GraphDS/GraphDS_Vertex.gxx deleted file mode 100644 index fd72553b85..0000000000 --- a/src/GraphDS/GraphDS_Vertex.gxx +++ /dev/null @@ -1,156 +0,0 @@ -// Created on: 1993-03-16 -// Created by: Denis PASCAL -// 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. - -#include -#include -#include -#include - - -//======================================================================= -//function : GraphDS_Vertex -//purpose : -//======================================================================= - -GraphDS_Vertex::GraphDS_Vertex (const GraphDS_Item& value) : myItem(value) -{ -} - - -//======================================================================= -//function : GetItem -//purpose : -//======================================================================= - -const GraphDS_Item& GraphDS_Vertex::GetItem () const -{ - return myItem; -} - - -//======================================================================= -//function : SetItem -//purpose : -//======================================================================= - -void GraphDS_Vertex::SetItem (const GraphDS_Item& Value) -{ - myItem = Value; -} - -//======================================================================= -//function : Contains -//purpose : -//======================================================================= - -Standard_Boolean GraphDS_Vertex::Contains (const Handle(GraphDS_Edge)& E) const -{ - return myEdges.Contains(E); -} - - -Standard_Boolean GraphDS_Vertex::IsFront (const Handle(GraphDS_Edge)& ) const -{ - Standard_NotImplemented::Raise(); - return Standard_False; -} - - -Standard_Boolean GraphDS_Vertex::IsBack (const Handle(GraphDS_Edge)& ) const -{ - Standard_NotImplemented::Raise(); - return Standard_False; -} - - - -//======================================================================= -//function : IsRoot -//purpose : never destination of an edge -//======================================================================= - -Standard_Boolean GraphDS_Vertex::IsRoot (const Standard_Boolean ignoreselfloop) const -{ - Handle(GraphDS_Vertex) me = this; - Handle(GraphDS_Edge) E; - TColStd_MapIteratorOfMapOfTransient it; - for (it.Initialize(myEdges); it.More(); it.Next()) { - E = Handle(GraphDS_Edge)::DownCast(it.Key()); - if (ignoreselfloop && E->IsLoop()) continue; - if (E->Destination() == me) return Standard_False; - } - return Standard_True; -} - - -//======================================================================= -//function : IsLeaf -//purpose : never source of an edge -//======================================================================= - -Standard_Boolean GraphDS_Vertex::IsLeaf (const Standard_Boolean ignoreselfloop) const -{ - Handle(GraphDS_Vertex) me = this; - Handle(GraphDS_Edge) E; - TColStd_MapIteratorOfMapOfTransient it; - for (it.Initialize(myEdges); it.More(); it.Next()) { - E = Handle(GraphDS_Edge)::DownCast(it.Key()); - if (ignoreselfloop && E->IsLoop()) continue; - if (E->Source() == me) return Standard_False; - } - return Standard_True; -} - -//======================================================================= -//function : AddEdge -//purpose : private -//======================================================================= - -Standard_Boolean GraphDS_Vertex::AddEdge (const Handle(GraphDS_Edge)& E) -{ - return myEdges.Add(E); -} - - -//======================================================================= -//function : RemoveEdge -//purpose : private -//======================================================================= - -void GraphDS_Vertex::RemoveEdge (const Handle(GraphDS_Edge)& E) -{ - myEdges.Remove(E); -} - - - -//======================================================================= -//function : GetEdges -//purpose : private -//======================================================================= - -const TColStd_MapOfTransient& GraphDS_Vertex::GetEdges () const -{ - return myEdges; -} - - - - - - - - diff --git a/src/GraphDS/GraphDS_VerticesIterator.gxx b/src/GraphDS/GraphDS_VerticesIterator.gxx deleted file mode 100644 index 31b25a9f5b..0000000000 --- a/src/GraphDS/GraphDS_VerticesIterator.gxx +++ /dev/null @@ -1,127 +0,0 @@ -// Created on: 1993-03-16 -// Created by: Denis PASCAL -// 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. - -#include -#include - - -//======================================================================= -//function : GraphDS_VerticesIterator -//purpose : -//======================================================================= - -GraphDS_VerticesIterator::GraphDS_VerticesIterator () -{ -} - -//======================================================================= -//function : GraphDS_VerticesIterator -//purpose : -//======================================================================= - -GraphDS_VerticesIterator::GraphDS_VerticesIterator - (const GraphDS_DirectedGraph& DG) -{ - Initialize (DG); -} - - -//======================================================================= -//function : GraphDS_VerticesIterator -//purpose : -//======================================================================= - -GraphDS_VerticesIterator::GraphDS_VerticesIterator - (const GraphDS_DirectedGraph& DG, - const Handle(GraphDS_Vertex)& V) -{ - Initialize (DG,V); -} - - -//======================================================================= -//function : Initialize -//purpose : -//======================================================================= - -void GraphDS_VerticesIterator::Initialize (const GraphDS_DirectedGraph& DG) -{ - myVertices.Initialize(DG.myVertices); -} - - -//======================================================================= -//function : Initialize -//purpose : -//======================================================================= - -void GraphDS_VerticesIterator::Initialize - (const GraphDS_DirectedGraph& DG, - const Handle(GraphDS_Vertex)& V) -{ - myMap.Clear(); - Handle(GraphDS_Edge) E; - TColStd_MapIteratorOfMapOfTransient it(V->GetEdges()); - for (;it.More();it.Next()) { - E = Handle(GraphDS_Edge)::DownCast(it.Key()); - if (E->Source() == V) myMap.Add(E->Destination()); - } - myVertices.Initialize(myMap); -} - - -//======================================================================= -//function : More -//purpose : -//======================================================================= - -Standard_Boolean GraphDS_VerticesIterator::More () const -{ - return myVertices.More(); -} - - -//======================================================================= -//function : Next -//purpose : -//======================================================================= - -void GraphDS_VerticesIterator::Next () -{ - myVertices.Next(); -} - - -//======================================================================= -//function : Value -//purpose : -//======================================================================= - -const Handle(GraphDS_Vertex)& GraphDS_VerticesIterator::Value () const -{ - return *((Handle(GraphDS_Vertex)*)& myVertices.Key()); - //return Handle(GraphDS_Vertex)::DownCast(myVertices.Key()); -} - - - - - - - - - - diff --git a/src/GraphTools/GraphTools.cdl b/src/GraphTools/GraphTools.cdl deleted file mode 100644 index 425b0d5350..0000000000 --- a/src/GraphTools/GraphTools.cdl +++ /dev/null @@ -1,107 +0,0 @@ --- Created on: 1991-03-07 --- Created by: Denis Pascal --- Copyright (c) 1991-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. - -package GraphTools - - ---Purpose: This package provides algorithms working - -- on a directed graph. Those algorithms are generic for - -- user (Graph and Vertex) data, and tool classes. - - -uses Standard, - MMgt, - TCollection, - TColStd - -is - - - class ListOfSequenceOfInteger instantiates List from TCollection - (SequenceOfInteger from TColStd); - --- Requirements --- ============ - --- Data --- Vertex --- Graph --- Tools - generic class GraphIterator; - generic class VertexIterator; - --- Services (Algorithms) --- ===================== - - - ---Purpose: Depth First Search (DFS) - - generic class DFSIterator, - DFSMap; - - - ---Purpose: Breath First Search (BFS) - - generic class BFSIterator, - BFSMap; - - - ---Purpose: Sorted Strong Components (SC) - - generic class SortedStrgCmptsFromIterator, - SCMap; - - generic class SortedStrgCmptsIterator; - - - ---Purpose: Topological Sort (TS) - - class TSNode; - - generic class TopologicalSortFromIterator, - TSMap; - - generic class TopologicalSortIterator; - - - ---Purpose: Connected Vertices (CV) - - generic class ConnectedVerticesFromIterator, - CVMap, - ConnectMap; - - generic class ConnectedVerticesIterator; - - - ---Purpose: Reduced Graph (RG) - - class RGNode; - - class SC; - - class SCList instantiates List from TCollection - (SC from GraphTools); - - generic class ReducedGraph, - RGMap, - SortedSCIterator, - AdjSCIterator; - -end GraphTools; - - - - - diff --git a/src/GraphTools/GraphTools_AdjSCIterator.gxx b/src/GraphTools/GraphTools_AdjSCIterator.gxx deleted file mode 100644 index 662764ab7f..0000000000 --- a/src/GraphTools/GraphTools_AdjSCIterator.gxx +++ /dev/null @@ -1,91 +0,0 @@ -// Created on: 1991-10-23 -// Created by: Denis PASCAL -// Copyright (c) 1991-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. - -// - -#include -#include - - -//======================================================================= -//function : GraphTools_AdjSCIterator -//purpose : -//======================================================================= -GraphTools_AdjSCIterator::GraphTools_AdjSCIterator () -{ -} - - -//======================================================================= -//function : GraphTools_AdjSCIterator -//purpose : -//======================================================================= -GraphTools_AdjSCIterator::GraphTools_AdjSCIterator - (const GraphTools_ReducedGraph& RG, - const Handle(GraphTools_SC)& SC) -{ - Initialize (RG,SC); -} - - -//======================================================================= -//function : Initialize -//purpose : -//======================================================================= -void GraphTools_AdjSCIterator::Initialize - (const GraphTools_ReducedGraph& RG, - const Handle(GraphTools_SC)& SC) -{ - myIterator.Initialize(SC->GetFrontSC()); -} - - -//======================================================================= -//function : More -//purpose : -//======================================================================= -Standard_Boolean GraphTools_AdjSCIterator::More() const -{ - return myIterator.More(); -} - - -//======================================================================= -//function : Next -//purpose : -//======================================================================= -void GraphTools_AdjSCIterator::Next() -{ - myIterator.Next(); -} - - -//======================================================================= -//function : Value -//purpose : -//======================================================================= -Handle(GraphTools_SC) GraphTools_AdjSCIterator::Value () const -{ - return myIterator.Value(); -} - - - - - - - - diff --git a/src/GraphTools/GraphTools_BFSIterator.cdl b/src/GraphTools/GraphTools_BFSIterator.cdl deleted file mode 100644 index 2c4a256312..0000000000 --- a/src/GraphTools/GraphTools_BFSIterator.cdl +++ /dev/null @@ -1,73 +0,0 @@ --- Created on: 1992-10-12 --- Created by: Denis PASCAL --- 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. - -generic class BFSIterator from GraphTools - (Graph as any; - Vertex as any; - VHasher as any; - VIterator as any) - ---generic class BFSIterator from GraphTools --- (Graph as any; --- Vertex as any; --- VHasher as MapHasher from TCollection (Vertex); --- VIterator as VertexIterator (Graph,Vertex)) - ----Purpose: This generic class implement the Breadth First Search - -- algorithm from a Vertex with an iterator to reached - -- adjacent vertices of a given one. The interface of - -- this algorithm is made as an iterator. - -raises NoMoreObject from Standard, - NoSuchObject from Standard - - class BFSMap instantiates IndexedMap from TCollection (Vertex,VHasher); - -is - - Create - returns BFSIterator; - ---Purpose: Create an empty iterator. - - Perform (me : in out; G : Graph; V : Vertex); - ---Purpose: Initializes the research from member vertex of . - ---Level: Public - - More (me) returns Boolean from Standard; - ---Purpose: Returns True if there are other vertices. - ---Level: Public - - Next(me : in out) - ---Purpose: Set the iterator to the next vertex. - ---Level: Public - raises NoMoreObject from Standard; - - Value(me) returns any Vertex - ---Purpose: returns the vertex value for the current - -- position of the iterator. - ---Level: Public - ---C++: return const & - raises NoSuchObject from Standard; - -fields - - myVisited : BFSMap from GraphTools; - myCurrentIndex : Integer from Standard; - -end BFSIterator; - - - diff --git a/src/GraphTools/GraphTools_BFSIterator.gxx b/src/GraphTools/GraphTools_BFSIterator.gxx deleted file mode 100644 index 115fa3a3bf..0000000000 --- a/src/GraphTools/GraphTools_BFSIterator.gxx +++ /dev/null @@ -1,97 +0,0 @@ -// Created on: 1992-10-12 -// Created by: Denis PASCAL -// 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. - -#include -#include -#include - -//======================================================================= -//function : GraphTools_BFSIterator -//purpose : -//======================================================================= - -GraphTools_BFSIterator::GraphTools_BFSIterator () {} - - -//======================================================================= -//function : Perform -//purpose : -//======================================================================= - -void GraphTools_BFSIterator::Perform - (const Graph& G, const Vertex& V) -{ - Standard_Integer index; - myVisited.Clear(); - TColStd_ListOfInteger myReady; - - index = myVisited.Add(V); - myReady.Append(index); - while (!myReady.IsEmpty()) { - Vertex w1 = myVisited (myReady.First()); - myReady.RemoveFirst(); - for (VIterator it(G,w1); it.More(); it.Next()) { - Vertex w2 = it.Value(); - if (!myVisited.Contains(w2)) { - index = myVisited.Add(w2); - myReady.Append(index); - } - } - } - myCurrentIndex = 1; -} - - -//======================================================================= -//function : More -//purpose : -//======================================================================= - -Standard_Boolean GraphTools_BFSIterator::More () const -{ - return myCurrentIndex <= myVisited.Extent(); -} - - -//======================================================================= -//function : Next -//purpose : -//======================================================================= - -void GraphTools_BFSIterator::Next () -{ - myCurrentIndex++; -} - - -//======================================================================= -//function : Value -//purpose : -//======================================================================= - -const Vertex& GraphTools_BFSIterator::Value () const -{ - return myVisited(myCurrentIndex); -} - - - - - - - - - diff --git a/src/GraphTools/GraphTools_ConnectedVerticesFromIterator.cdl b/src/GraphTools/GraphTools_ConnectedVerticesFromIterator.cdl deleted file mode 100644 index bffc83922b..0000000000 --- a/src/GraphTools/GraphTools_ConnectedVerticesFromIterator.cdl +++ /dev/null @@ -1,101 +0,0 @@ --- Created on: 1992-10-16 --- Created by: Arnaud BOUZY --- 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. - -generic class ConnectedVerticesFromIterator from GraphTools - (Graph as any; - Vertex as any; - VIterator as any) - - - ---Purpose: In a graph, returns subsets of a list of vertices in - -- which all vertices are connected. - -uses HArray1OfInteger from TColStd - - class CVMap instantiates IndexedMap from TCollection - (Vertex, - MapTransientHasher from TColStd); - - class ConnectMap instantiates DataMap from TCollection - (Vertex, - Integer from Standard, - MapTransientHasher from TColStd); - - -is - - Create - ---Purpose: Create an empty algorithm. - returns ConnectedVerticesFromIterator; - - FromVertex (me : in out; V : Vertex); - ---Purpose: Add as initial condition. This method is - -- cumulative. Use Perform method before visting the - -- result of the algorithm. - ---Level: Public - - Reset (me : in out); - ---Purpose: Reset the algorithm. It may be reused with new - -- conditions. - ---Level: Public - - Perform (me : in out; G : Graph); - ---Purpose: Peform the algorithm in from initial setted - -- conditions. - ---Level: Public - - More(me) - ---Purpose: Returns TRUE if there are others subset of - -- connected vertices. - ---Level: Public - returns Boolean from Standard; - - Next (me : in out); - ---Purpose: Set the iterator to the next subset of connected - -- vertices. - ---Level: Public - - NbVertices (me) - returns Integer from Standard; - ---Purpose: Returns number of vertices of the current subset - -- of connected vertices. - ---Level: Public - - Value (me; index : Integer from Standard) - returns any Vertex; - ---Purpose: Returns a vertex member of the current subset of - -- connected vertices. - ---Level: Public - ---C++: return const& - - Visit (me : in out; V : Vertex; - G : Graph; - visited : in out ConnectMap from GraphTools) - ---Purpose: Recursively called to visit the vertices connected to - -- in , with already visited vertices - -- . - ---Level: Internal - is private; - -fields - - initMap : CVMap from GraphTools; - tab : HArray1OfInteger from TColStd; - myCurrent : Integer from Standard; - -end ConnectedVerticesFromIterator; - - diff --git a/src/GraphTools/GraphTools_ConnectedVerticesFromIterator.gxx b/src/GraphTools/GraphTools_ConnectedVerticesFromIterator.gxx deleted file mode 100644 index 162babfdcf..0000000000 --- a/src/GraphTools/GraphTools_ConnectedVerticesFromIterator.gxx +++ /dev/null @@ -1,211 +0,0 @@ -// Created on: 1992-10-19 -// Created by: Arnaud BOUZY -// 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. - -#include -#include - - -//======================================================================= -//function : GraphTools_ConnectedVerticesFromIterator -//purpose : -//======================================================================= - -GraphTools_ConnectedVerticesFromIterator::GraphTools_ConnectedVerticesFromIterator() -{ - myCurrent = 0; -} - - -//======================================================================= -//function : FromVertex -//purpose : -//======================================================================= - -void GraphTools_ConnectedVerticesFromIterator::FromVertex(const Vertex& avert) -{ - initMap.Add(avert); -} - - -//======================================================================= -//function : Reset -//purpose : -//======================================================================= - -void GraphTools_ConnectedVerticesFromIterator::Reset () -{ - myCurrent = 0; - initMap.Clear(); -} - - -//======================================================================= -//function : Perform -//purpose : -//======================================================================= - -void GraphTools_ConnectedVerticesFromIterator::Perform (const Graph& aGraph) -{ - Standard_Integer nbvert = initMap.Extent(); - GraphTools_ConnectMap visited; - Standard_Integer i; - for (i=1;i<=nbvert; i++) { - visited.Bind(initMap(i),i); - } - for (i=1;i<=nbvert; i++) { - if (visited(initMap(i)) == i) { - myCurrent = i; - VIterator vit(aGraph,initMap(i)); - while (vit.More()) { - Visit(vit.Value(),aGraph,visited); - vit.Next(); - } - } - } - - tab = new TColStd_HArray1OfInteger(1,nbvert,0); - for (i=1; i<= nbvert; i++) { - tab->SetValue(i,visited(initMap(i))); - } - myCurrent = 0; - Next(); -} - - -//======================================================================= -//function : More -//purpose : -//======================================================================= - -Standard_Boolean GraphTools_ConnectedVerticesFromIterator::More() const -{ - for (Standard_Integer i=1; i<= tab->Upper(); i++) { - if (tab->Value(i) >= myCurrent) { - return Standard_True; - } - } - return Standard_False; -} - - -//======================================================================= -//function : Next -//purpose : -//======================================================================= - -void GraphTools_ConnectedVerticesFromIterator::Next() -{ - Standard_Boolean found=Standard_False; - myCurrent++; - Standard_Integer nbv = tab->Upper(); - Standard_Integer i; - while (!found && (myCurrent <= nbv)) { - for (i=1; (i<= nbv) && !found; i++) { - if (tab->Value(i) == myCurrent) { - found = Standard_True; - } - } - if (!found) { - myCurrent++; - } - } -} - - -//======================================================================= -//function : NbVertices -//purpose : -//======================================================================= - -Standard_Integer GraphTools_ConnectedVerticesFromIterator::NbVertices() const -{ - if (!More()) { - Standard_NoSuchObject::Raise(); - } - Standard_Integer res = 0; - for (Standard_Integer i=1; i<= tab->Upper(); i++) { - if (tab->Value(i) == myCurrent) { - res++; - } - } - return res; -} - -//======================================================================= -//function : Value -//purpose : -//======================================================================= - -const Vertex& GraphTools_ConnectedVerticesFromIterator::Value - (const Standard_Integer index) const -{ - if (!More()) { - Standard_NoSuchObject::Raise(); - } - Standard_Integer current=0; - for (Standard_Integer i=1; i<= tab->Upper(); i++) { - if (tab->Value(i) == myCurrent) { - current++; - if (current == index) { - return initMap(i); - } - } - } -} - -//======================================================================= -//function : Visit -//purpose : -//======================================================================= - -void GraphTools_ConnectedVerticesFromIterator::Visit - (const Vertex& avert, - const Graph& agraph, - GraphTools_ConnectMap& visited) -{ - Standard_Boolean godown = Standard_False; - if (!visited.IsBound(avert)) { - visited.Bind(avert,myCurrent); - godown = Standard_True; - } - else { - Standard_Integer thebound = visited(avert); - if (thebound > myCurrent) { - visited(avert) = myCurrent; - godown = Standard_True; - } - else if (thebound < myCurrent) { - Standard_Integer rebind = visited(initMap(thebound)); - for (Standard_Integer i=1; i <= initMap.Extent(); i++) { - if ((visited(initMap(i)) == thebound) || - (visited(initMap(i)) == rebind)) { - visited(initMap(i)) = myCurrent; - } - } - } - } - if (godown) { - VIterator vit(agraph,avert); - while (vit.More()) { - Visit(vit.Value(),agraph,visited); - vit.Next(); - } - } -} - - - - diff --git a/src/GraphTools/GraphTools_ConnectedVerticesIterator.cdl b/src/GraphTools/GraphTools_ConnectedVerticesIterator.cdl deleted file mode 100644 index d38b4e568a..0000000000 --- a/src/GraphTools/GraphTools_ConnectedVerticesIterator.cdl +++ /dev/null @@ -1,102 +0,0 @@ --- Created on: 1993-03-18 --- Created by: Denis PASCAL --- 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. - -generic class ConnectedVerticesIterator from GraphTools - (Graph as any; - Vertex as any; - GIterator as any; - CVIterator as any) - ---generic class ConnectedVerticesIterator from GraphTools --- (Graph as any; --- Vertex as any; --- GIterator as GraphIterator (Graph,Vertex)) --- CVIterator as ConnectedVerticesFromIterator - - ---Purpose: In a graph, returns subsets of a list of vertices in - -- which all vertices are connected. - -is - - Create - ---Purpose: Create an empty algorithm. - returns ConnectedVerticesIterator from GraphTools; - - Create (G : Graph) - ---Purpose: Create the algorithm setting each vertex of - -- reached by GIterator tool, as initial conditions. - -- Use Perform method before visting the result of - -- the algorithm. - returns ConnectedVerticesIterator from GraphTools; - - FromGraph (me : in out; G : Graph); - ---Purpose: Add each vertex of reached by GIterator tool - -- as initial conditions. Use Perform method - -- before visiting the result of the algorithm. - ---Level: Public; - - FromVertex (me : in out; V : Vertex); - ---Purpose: Add as research condition. This method is - -- cumulative. User must used Perform method before - -- visting the result of the algorithm. - ---Level: Public - - Reset (me : in out); - ---Purpose: Reset the algorithm. It may be reused with new - -- initial conditions. - ---Level: Public - - Perform (me : in out; G : Graph); - ---Purpose: Peform the algorithm in from initial setted - -- conditions. - ---Level: Public - - More(me) - ---Purpose: Returns TRUE if there are others subset of - -- connected vertices. - ---Level: Public - returns Boolean from Standard; - - Next (me : in out); - ---Purpose: Set the iterator to the next subset of connected - -- vertices. - ---Level: Public - - NbVertices (me) - returns Integer from Standard; - ---Purpose: Returns number of vertices of the current subset - -- of connected vertices. - ---Level: Public - - Value (me; index : Integer from Standard) - returns any Vertex; - ---Purpose: Returns a vertex member of the current subset of - -- connected vertices. - ---Level: Public - ---C++: return const& - -fields - - myIterator : CVIterator; - -end ConnectedVerticesIterator; - - - - - - - diff --git a/src/GraphTools/GraphTools_ConnectedVerticesIterator.gxx b/src/GraphTools/GraphTools_ConnectedVerticesIterator.gxx deleted file mode 100644 index 2fb2b3d769..0000000000 --- a/src/GraphTools/GraphTools_ConnectedVerticesIterator.gxx +++ /dev/null @@ -1,143 +0,0 @@ -// Created on: 1991-05-29 -// Created by: Denis PASCAL -// Copyright (c) 1991-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. - -// - - -//======================================================================= -//function : GraphTools_ConnectedVerticesIterator -//purpose : -//======================================================================= - -GraphTools_ConnectedVerticesIterator::GraphTools_ConnectedVerticesIterator () -{} - - -//======================================================================= -//function : GraphTools_TopologicalSortIterator -//purpose : -//======================================================================= - -GraphTools_ConnectedVerticesIterator::GraphTools_ConnectedVerticesIterator - (const Graph& G) -{ - FromGraph (G); -} - -//======================================================================= -//function : FromVertex -//purpose : -//======================================================================= - -void GraphTools_ConnectedVerticesIterator::FromVertex - (const Vertex& V) -{ - myIterator.FromVertex(V); -} - - -//======================================================================= -//function : GraphTools_ConnectedVerticesIterator -//purpose : -//======================================================================= -void GraphTools_ConnectedVerticesIterator::FromGraph (const Graph& G) -{ - for ( GIterator it (G); it.More(); it.Next() ) { - myIterator.FromVertex(it.Value()); - } -} - - -//======================================================================= -//function : Perform -//purpose : -//======================================================================= - -void GraphTools_ConnectedVerticesIterator::Perform - (const Graph& G) -{ - myIterator.Perform(G); -} - - -//======================================================================= -//function : Reset -//purpose : -//======================================================================= - -void GraphTools_ConnectedVerticesIterator::Reset () -{ - myIterator.Reset(); -} - -//======================================================================= -//function : More -//purpose : -//======================================================================= -Standard_Boolean GraphTools_ConnectedVerticesIterator::More () const -{ - return myIterator.More(); -} - -//======================================================================= -//function : Next -//purpose : -//======================================================================= -void GraphTools_ConnectedVerticesIterator::Next () -{ - myIterator.Next(); -} - - -//======================================================================= -//function : NbVertices -//purpose : -//======================================================================= - -Standard_Integer GraphTools_ConnectedVerticesIterator::NbVertices() const -{ - return myIterator.NbVertices(); -} - - -//======================================================================= -//function : Value -//purpose : -//======================================================================= -const Vertex& GraphTools_ConnectedVerticesIterator::Value - (const Standard_Integer I) const -{ - return myIterator.Value(I); -} - - - - - - - - - - - - - - - - - - - diff --git a/src/GraphTools/GraphTools_DFSIterator.cdl b/src/GraphTools/GraphTools_DFSIterator.cdl deleted file mode 100644 index 066b9aeecf..0000000000 --- a/src/GraphTools/GraphTools_DFSIterator.cdl +++ /dev/null @@ -1,82 +0,0 @@ --- Created on: 1992-09-24 --- Created by: Denis PASCAL --- 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. - -generic class DFSIterator from GraphTools - (Graph as any; - Vertex as any; - VHasher as any; - VIterator as any) - - ---Purpose: This generic class implement the Depth First Search - -- algorithm from a Vertex with an iterator to reached - -- adjacent vertices of a given one. The interface of - -- this algorithm is made as an iterator. - ---generic class DFSIterator from GraphTools --- (Graph as any; --- Vertex as any; --- VHasher as MapHasher from TCollection (Vertex); --- VIterator as VertexIterator (Graph,Vertex)) - -raises NoMoreObject from Standard, - NoSuchObject from Standard - - class DFSMap instantiates IndexedMap from TCollection (Vertex,VHasher); - -is - - Create - returns DFSIterator; - ---Purpose: Create an empty iterator. - - Perform (me : in out; G : Graph; V : Vertex); - ---Purpose: Initializes the research from member vertex of - -- . - ---Level: Public - - More (me) returns Boolean from Standard; - ---Purpose: Returns True if there are other vertices. - ---Level: Public - - Next(me : in out) - ---Purpose: Set the iterator to the next vertex. - ---Level: Public - raises NoMoreObject from Standard; - - Value (me) returns any Vertex - ---Purpose: returns the vertex value for the current position - -- of the iterator. - ---C++: return const & - ---Level: Public - raises NoSuchObject from Standard; - - -fields - - myVisited : DFSMap from GraphTools; - myCurrentIndex : Integer from Standard; - -end DFSIterator; - - - - - - - - - - diff --git a/src/GraphTools/GraphTools_DFSIterator.gxx b/src/GraphTools/GraphTools_DFSIterator.gxx deleted file mode 100644 index a0f577becb..0000000000 --- a/src/GraphTools/GraphTools_DFSIterator.gxx +++ /dev/null @@ -1,89 +0,0 @@ -// Created on: 1992-10-12 -// Created by: Denis PASCAL -// 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. - -#include -#include -#include - -//======================================================================= -//function : GraphTools_DFSIterator -//purpose : -//======================================================================= - -GraphTools_DFSIterator::GraphTools_DFSIterator () {} - - -//======================================================================= -//function : Perform -//purpose : -//======================================================================= - -void GraphTools_DFSIterator::Perform - (const Graph& G, const Vertex& V) -{ - Standard_Integer index; - myVisited.Clear(); - TColStd_ListOfInteger myReady; - - index = myVisited.Add(V); - myReady.Prepend(index); - while (!myReady.IsEmpty()) { - Vertex w1 = myVisited (myReady.First()); - myReady.RemoveFirst(); - for (VIterator it(G,w1); it.More(); it.Next()) { - Vertex w2 = it.Value(); - if (!myVisited.Contains(w2)) { - index = myVisited.Add(w2); - myReady.Prepend(index); - } - } - } - myCurrentIndex = 1; -} - - -//======================================================================= -//function : More -//purpose : -//======================================================================= - -Standard_Boolean GraphTools_DFSIterator::More () const -{ - return myCurrentIndex <= myVisited.Extent(); -} - - -//======================================================================= -//function : Next -//purpose : -//======================================================================= - -void GraphTools_DFSIterator::Next () -{ - myCurrentIndex++; -} - - -//======================================================================= -//function : Value -//purpose : -//======================================================================= - -const Vertex& GraphTools_DFSIterator::Value () const -{ - return myVisited(myCurrentIndex); -} - diff --git a/src/GraphTools/GraphTools_GraphIterator.cdl b/src/GraphTools/GraphTools_GraphIterator.cdl deleted file mode 100644 index 3a5d272302..0000000000 --- a/src/GraphTools/GraphTools_GraphIterator.cdl +++ /dev/null @@ -1,69 +0,0 @@ --- Created on: 1991-03-06 --- Created by: Denis Pascal --- Copyright (c) 1991-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. - -generic class GraphIterator from GraphTools (Graph as any; - Vertex as any) - --- template class GraphIterator from GraphTools (Graph as any; --- Vertex as any) - - ---Purpose: Template class which defines signatures of an - -- iterator to visit each vertex, member of the - -- underlying graph. - - -raises NoMoreObject from Standard, - NoSuchObject from Standard - -is - - Create (G : Graph) returns GraphIterator; - - More (me) returns Boolean; - ---Purpose: Returns TRUE if there are other vertices. - ---Level: Public - - Next (me : in out) - --- Purpose : Set the iterator to the next Vertex. - ---Level: Public - raises NoMoreObject from Standard; - - Value (me) returns Vertex - --- Purpose: Returns the vertex value for the current position - -- of the iterator - ---Level: Public - raises NoSuchObject from Standard; - -end GraphIterator; - - - - - - - - - - - - - - - - - - - diff --git a/src/GraphTools/GraphTools_GraphIterator.gxx b/src/GraphTools/GraphTools_GraphIterator.gxx deleted file mode 100644 index b628db6fa2..0000000000 --- a/src/GraphTools/GraphTools_GraphIterator.gxx +++ /dev/null @@ -1,15 +0,0 @@ -// Created on: 1993-09-27 -// Created by: Denis PASCAL -// 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. diff --git a/src/GraphTools/GraphTools_RGNode.cdl b/src/GraphTools/GraphTools_RGNode.cdl deleted file mode 100644 index 2ee5827754..0000000000 --- a/src/GraphTools/GraphTools_RGNode.cdl +++ /dev/null @@ -1,53 +0,0 @@ --- Created on: 1993-09-29 --- Created by: Denis PASCAL --- 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. - -class RGNode from GraphTools - -uses SC from GraphTools, - SequenceOfInteger from TColStd - -is - - Create returns RGNode; - - Reset (me : in out); - - SetVisited (me : in out; v : Integer from Standard); - - GetVisited (me) - returns Integer from Standard; - - AddAdj (me : in out; adj : Integer from Standard); - - NbAdj (me) - returns Integer from Standard; - - GetAdj (me; index : Integer from Standard) - returns Integer from Standard; - - SetSC (me : in out; SC : SC from GraphTools); - - GetSC (me) - returns SC from GraphTools; - -fields - - visited : Integer from Standard; - myAdj : SequenceOfInteger from TColStd; - mySC : SC from GraphTools; - -end RGNode; - diff --git a/src/GraphTools/GraphTools_RGNode.cxx b/src/GraphTools/GraphTools_RGNode.cxx deleted file mode 100644 index f45e91722a..0000000000 --- a/src/GraphTools/GraphTools_RGNode.cxx +++ /dev/null @@ -1,117 +0,0 @@ -// Created on: 1993-09-29 -// Created by: Denis PASCAL -// 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. - -#include - - -//======================================================================= -//function : GraphTools_RGNode -//purpose : -//======================================================================= - -GraphTools_RGNode::GraphTools_RGNode() -{ - visited = 0; -} - -//======================================================================= -//function : Reset -//purpose : -//======================================================================= - -void GraphTools_RGNode::Reset() -{ - visited = 0; - myAdj.Clear(); - mySC.Nullify(); -} - -//======================================================================= -//function : SetVisited -//purpose : -//======================================================================= - -void GraphTools_RGNode::SetVisited(const Standard_Integer v) -{ - visited = v; -} - - -//======================================================================= -//function : GetVisited -//purpose : -//======================================================================= - -Standard_Integer GraphTools_RGNode::GetVisited() const -{ - return visited; -} - - -//======================================================================= -//function : AddAdj -//purpose : -//======================================================================= - -void GraphTools_RGNode::AddAdj (const Standard_Integer adj) -{ - myAdj.Append(adj); -} - - -//======================================================================= -//function : NbAdj -//purpose : -//======================================================================= - -Standard_Integer GraphTools_RGNode::NbAdj() const -{ - return myAdj.Length(); -} - - -//======================================================================= -//function : GetAdj -//purpose : -//======================================================================= - -Standard_Integer GraphTools_RGNode::GetAdj - (const Standard_Integer index) const -{ - return myAdj(index); -} - - -//======================================================================= -//function : SetSC -//purpose : -//======================================================================= - -void GraphTools_RGNode::SetSC (const Handle(GraphTools_SC)& SC) -{ - mySC = SC; -} - - -//======================================================================= -//function : GetSC -//purpose : -//======================================================================= - -Handle(GraphTools_SC) GraphTools_RGNode::GetSC () const -{ - return mySC; -} diff --git a/src/GraphTools/GraphTools_ReducedGraph.cdl b/src/GraphTools/GraphTools_ReducedGraph.cdl deleted file mode 100644 index 78fa936e05..0000000000 --- a/src/GraphTools/GraphTools_ReducedGraph.cdl +++ /dev/null @@ -1,253 +0,0 @@ --- Created on: 1993-01-06 --- Created by: Denis PASCAL --- 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. - -generic class ReducedGraph from GraphTools - (Graph as any; - Vertex as any; - VHasher as any; - VIterator as any; - GIterator as any) - ---signature class ReducedGraph from GraphTools --- Graph as any; --- Vertex as any; --- VHasher as MapHasher from TCollection (Vertex); --- VIterator as VertexIterator (Graph,Vertex); --- GIterator as GraphIterator (Graph,Vertex)) - - ---Purpose: this generic class defines an algorithm to build and - -- visit the reduced graph of a given directed graph. - -- - -- A reduced graph is defined itself as a graph where - -- each vertex represents a strong component. Each - -- strong component is a subset of vertices of the - -- underlying graph which are mutually dependant in the - -- way that there is always a path to go from a given - -- vertex to another vertex and back (Definition of a - -- cycle) . Of course the Reduced Graph (or Condensed - -- Graph) is a DAG (Directed Acyclic Graph). - -- - -- After initialisation conditions (methods FromXXX) the - -- user has to build the reduced graph using the method - -- Perfrom. So each vertex of the underlying graph will - -- be encapsulated in a strong component (class SC of the - -- package). The algorithm may be reused using the - -- method Reset. - -- - -- nested iterators and methods provides services to - -- visit the reduced graph: - -- - -- * class SortedSCIterator defines an iterator to visit - -- each strong component. This visit is done according - -- to topologiacl sort of the reduced graph (which is a - -- DAG). - -- - -- * class AdjSCIterator defines an iterator to visit - -- each adjacent StrongComponent of a given one. - -- - -- * The methods NbVertices and GetVertex of the reduced - -- graph returned the number and each vertex member of a - -- strong component. The method GetSC returned for a - -- given vertex its strong component.e - -- - -- Warning: Noone method may be used on SC class. This class is only - -- here to identify a StrongComponent. - -uses SC from GraphTools, - SCList from GraphTools, - ListIteratorOfSCList from GraphTools, - ListOfInteger from TColStd - -raises NoSuchObject from Standard, - NoMoreObject from Standard, - OutOfRange from Standard - - private class RGMap instantiates IndexedDataMap from TCollection - (Vertex, - RGNode from GraphTools, - VHasher); - - class SortedSCIterator from GraphTools - - uses SC from GraphTools, - ListIteratorOfSCList from GraphTools - - raises NoMoreObject from Standard, - NoSuchObject from Standard - - is - - Create returns SortedSCIterator from GraphTools; - - Create (RG : ReducedGraph from GraphTools) - returns SortedSCIterator from GraphTools; - - Initialize (me : in out; RG : ReducedGraph from GraphTools); - ---Level: Public - - More (me) returns Boolean from Standard; - ---Purpose: Returns True if there are others Strong - -- Components. - ---Level: Public - - Next (me : in out) - raises NoMoreObject from Standard; - ---Level: Public - - Value (me) returns SC from GraphTools - raises NoSuchObject from Standard; - ---Level: Public - - fields - - myIterator : ListIteratorOfSCList; - - end SortedSCIterator; - - - class AdjSCIterator from GraphTools - - uses SC from GraphTools, - ListIteratorOfSCList from GraphTools - - raises NoMoreObject from Standard, - NoSuchObject from Standard, - OutOfRange from Standard - - is - - Create returns AdjSCIterator from GraphTools; - - Create (RG : ReducedGraph from GraphTools; - SC : SC from GraphTools) - returns AdjSCIterator from GraphTools; - - Initialize (me : in out; RG : ReducedGraph from GraphTools; - SC : SC from GraphTools); - ---Level: Public - - More (me) returns Boolean from Standard; - ---Level: Public - - Next (me : in out) - raises NoMoreObject from Standard; - ---Level: Public - - Value (me) returns SC from GraphTools - ---Level: Public - raises NoSuchObject from Standard; - - fields - - myIterator : ListIteratorOfSCList; - - end AdjSCIterator; - -is - - Create - ---Purpose: Create an empty algorithm - returns ReducedGraph from GraphTools; - - - Create (G : Graph) - ---Purpose: Create the algorithm, set each vertex of - -- reached by GIterator, as research conditions, and - -- perform the algorithm. User may directly visit - -- (nested class xxxIterator) the result of the - -- algorithm. - returns ReducedGraph from GraphTools; - - FromGraph (me : in out; G : Graph); - ---Purpose: Add each vertex of reached by GIterator tool - -- as research conditions. User must used Perform - -- method before visiting the result of the algorithm. - ---Level: Public - - FromVertex (me : in out; V : Vertex); - ---Purpose: Add as research condition. This method is - -- cumulative. User must used Perform method before - -- visting the result of the algorithm. - ---Level: Public - - Perform (me : in out; G : Graph); - ---Purpose: Perform the algorithm IN FROM previous - -- initialisation condition(s). - ---Level: Public - - Reset (me : in out); - ---Purpose: Clear initialisation conditions. The algorithm may - -- be initialized and performed again from new - -- conditions. In that case new nested SCIterator and - -- AdjSCIterator may be reinitialized. - ---Level: Public - - IsRoot (me; SC : SC from GraphTools) - returns Boolean from Standard; - ---Level: Public - - IsLeaf (me; SC : SC from GraphTools) - returns Boolean from Standard; - ---Level: Public - - NbVertices (me; SC : SC from GraphTools) - ---Purpose: returns number of vertices, members of . - ---Level: Public - returns Integer from Standard; - - GetVertex (me; SC : SC from GraphTools; - index : Integer from Standard) - returns any Vertex - ---C++: return const& - ---Level: Public - raises OutOfRange from Standard; - - GetSC (me; V : Vertex) - ---Purpose: Returns the SC which contains . - ---Level: Public - returns SC from GraphTools; - - Visit (me : in out; k : Integer from Standard; - G : Graph) - ---Level: Public - returns Integer from Standard - is private; - -fields - --- conditions - myVertices : RGMap from GraphTools; --- algorithm - performed : Boolean from Standard; - myNowIndex : Integer from Standard; - myStack : ListOfInteger from TColStd; --- result - mySort : SCList from GraphTools; - -friends - - class SortedSCIterator from GraphTools - -end ReducedGraph; - - - - - - - - - diff --git a/src/GraphTools/GraphTools_ReducedGraph.gxx b/src/GraphTools/GraphTools_ReducedGraph.gxx deleted file mode 100644 index 4c58310cf0..0000000000 --- a/src/GraphTools/GraphTools_ReducedGraph.gxx +++ /dev/null @@ -1,261 +0,0 @@ -// Created on: 1991-10-23 -// Created by: Denis PASCAL -// Copyright (c) 1991-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. - -// - -#include -#include -#include -#include - -static Standard_Boolean ContainsBack (const Handle(GraphTools_SC)& SC1, - const Handle(GraphTools_SC)& SC2) -{ - GraphTools_ListIteratorOfSCList it (SC1->GetBackSC()); - for (;it.More();it.Next()) { - if (it.Value() == SC2) return Standard_True; - } - return Standard_False; -} - -static Standard_Boolean ContainsFront (const Handle(GraphTools_SC)& SC1, - const Handle(GraphTools_SC)& SC2) -{ - GraphTools_ListIteratorOfSCList it (SC1->GetFrontSC()); - for (;it.More();it.Next()) { - if (it.Value() == SC2) return Standard_True; - } - return Standard_False; -} - -//======================================================================= -//function : GraphTools_ReducedGraph -//purpose : -//======================================================================= - -GraphTools_ReducedGraph::GraphTools_ReducedGraph () -{ - performed = Standard_False; -} - - -//======================================================================= -//function : GraphTools_ReducedGraph -//purpose : -//======================================================================= - -GraphTools_ReducedGraph::GraphTools_ReducedGraph - (const Graph& G) -{ - FromGraph(G); - Perform(G); -} - - -//======================================================================= -//function : FromGraph -//purpose : -//======================================================================= - -void GraphTools_ReducedGraph::FromGraph (const Graph& G) -{ - performed = Standard_False; - for (GIterator itG (G); itG.More(); itG.Next() ) { - GraphTools_RGNode newnode; - myVertices.Add (itG.Value(),newnode); - } -} - - -//======================================================================= -//function : FromVertex -//purpose : -//======================================================================= - -void GraphTools_ReducedGraph::FromVertex (const Vertex& V) -{ - performed = Standard_False; - GraphTools_RGNode newnode; - myVertices.Add(V,newnode); -} - -//======================================================================= -//function : Perform -//purpose : -//======================================================================= - -void GraphTools_ReducedGraph::Perform (const Graph& G) -{ - performed = Standard_True; - myNowIndex = 0; - myStack.Clear(); - mySort.Clear(); - Standard_Integer visited; - Standard_Integer index = 1; - while (index <= myVertices.Extent()) { - visited = myVertices(index).GetVisited(); - if (visited == 0) Visit(index,G); - index++; - } - // front and back strong components of a given one : Update - Standard_Integer curV,nbV,adjV,nbadjV; - Handle(GraphTools_SC) curSC,adjSC; - GraphTools_ListIteratorOfSCList it; - for (it.Initialize(mySort); it.More(); it.Next()) { - curSC = it.Value(); - nbV = curSC->NbVertices(); - for (Standard_Integer j = 1; j <= nbV; j++) { - curV = curSC->GetVertex(j); - nbadjV = myVertices(curV).NbAdj(); - for (Standard_Integer k = 1; k <= nbadjV; k++) { - adjV = myVertices(curV).GetAdj(k); - adjSC = myVertices(adjV).GetSC(); - if (adjSC != curSC) { - if (!ContainsFront(curSC,adjSC)) curSC->AddFrontSC (adjSC); - if (!ContainsBack(adjSC,curSC)) adjSC->AddBackSC (curSC); - } - } - } - } -} - - -//======================================================================= -//function : Reset -//purpose : -//======================================================================= - -void GraphTools_ReducedGraph::Reset () -{ - performed = Standard_False; - myVertices.Clear(); - myNowIndex = 0; - myStack.Clear(); - mySort.Clear(); -} - - -//======================================================================= -//function : IsRoot -//purpose : -//======================================================================= -Standard_Boolean GraphTools_ReducedGraph::IsRoot - (const Handle(GraphTools_SC)& SC) const -{ - return (SC->GetBackSC().IsEmpty()); -} - - -//======================================================================= -//function : IsLeaf -//purpose : -//======================================================================= -Standard_Boolean GraphTools_ReducedGraph::IsLeaf - (const Handle(GraphTools_SC)& SC) const -{ - return (SC->GetFrontSC().IsEmpty()); -} - - -//======================================================================= -//function : NbVertices -//purpose : -//======================================================================= - -Standard_Integer GraphTools_ReducedGraph::NbVertices - (const Handle(GraphTools_SC)& SC) const -{ - return SC->NbVertices(); -} - - -//======================================================================= -//function : GetVertex -//purpose : -//======================================================================= - -const Vertex& GraphTools_ReducedGraph::GetVertex - (const Handle(GraphTools_SC)& SC, - const Standard_Integer index) const -{ - return myVertices.FindKey(SC->GetVertex(index)); -} - - -//======================================================================= -//function : GetSC -//purpose : -//======================================================================= -Handle(GraphTools_SC) GraphTools_ReducedGraph::GetSC - (const Vertex& V) const -{ - if (!performed) Standard_DomainError::Raise(); - return myVertices.FindFromKey(V).GetSC(); -} - - -//======================================================================= -//function : Visit -//purpose : -//======================================================================= - -Standard_Integer GraphTools_ReducedGraph::Visit - (const Standard_Integer k, const Graph& G) -{ - Standard_Integer MIN; - Standard_Integer M; - myNowIndex++; - myVertices(k).SetVisited(myNowIndex); - MIN = myNowIndex; - myStack.Prepend(k); - Standard_Integer currentVisited; - currentVisited = myVertices(k).GetVisited(); - Standard_Integer adjacentIndex; - Standard_Integer adjacentVisited; - for (VIterator itV (G,myVertices.FindKey(k)); itV.More(); itV.Next()) { - adjacentIndex = myVertices.FindIndex(itV.Value()); - if (adjacentIndex == 0) { - GraphTools_RGNode newnode; - adjacentIndex = myVertices.Add (itV.Value(),newnode); - adjacentVisited = 0; - } - else adjacentVisited = myVertices(adjacentIndex).GetVisited(); - myVertices(k).AddAdj(adjacentIndex); - if (adjacentVisited == 0) M = Visit (adjacentIndex,G); - else M = adjacentVisited; - if (M < MIN) MIN = M; - } - if (MIN == currentVisited) { - Handle(GraphTools_SC) SC = new GraphTools_SC(); - Standard_Boolean more; - do { - SC->AddVertex(myStack.First()); - myVertices(myStack.First()).SetVisited(IntegerLast()); - myVertices(myStack.First()).SetSC(SC); - more = myStack.First() != k; - myStack.RemoveFirst() ; - } - while (more); - mySort.Prepend(SC); - } - return MIN; -} - - - - - - diff --git a/src/GraphTools/GraphTools_SC.cdl b/src/GraphTools/GraphTools_SC.cdl deleted file mode 100644 index 6c10e1824e..0000000000 --- a/src/GraphTools/GraphTools_SC.cdl +++ /dev/null @@ -1,67 +0,0 @@ --- Created on: 1993-09-30 --- Created by: Denis PASCAL --- 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. - -class SC from GraphTools inherits TShared from MMgt - - ---Purpose: This class is used to identify a Strong Component. - -- The user has not to used its methods. - -uses SCList from GraphTools, - SequenceOfInteger from TColStd - -raises OutOfRange from Standard, - NoSuchObject from Standard - -is - - Create returns mutable SC; - - Reset (me : mutable); - ---Level: Public - - AddVertex (me : mutable; V : Integer from Standard); - ---Level: Public - - NbVertices (me) returns Integer from Standard; - ---Level: Public - - GetVertex (me; index: Integer from Standard) - ---Level: Public - returns Integer from Standard; - - AddFrontSC (me : mutable; SC : SC from GraphTools); - ---Level: Public - - GetFrontSC (me) returns SCList from GraphTools; - ---Level: Public - ---C++: return const & - - AddBackSC (me : mutable; SC : SC from GraphTools); - ---Level: Public - - GetBackSC (me) returns SCList from GraphTools; - ---Level: Public - ---C++: return const & - -fields - - myBackSC : SCList from GraphTools; - myVertices : SequenceOfInteger from TColStd; - myFrontSC : SCList from GraphTools; - -end SC; - - diff --git a/src/GraphTools/GraphTools_SC.cxx b/src/GraphTools/GraphTools_SC.cxx deleted file mode 100644 index 64e8ea569b..0000000000 --- a/src/GraphTools/GraphTools_SC.cxx +++ /dev/null @@ -1,116 +0,0 @@ -// Created on: 1993-09-30 -// Created by: Denis PASCAL -// 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. - -#include - -//======================================================================= -//function : GraphTools_SC -//purpose : -//======================================================================= - -GraphTools_SC::GraphTools_SC () {} - - -//======================================================================= -//function : Reset -//purpose : -//======================================================================= - -void GraphTools_SC::Reset() -{ - myBackSC.Clear(); - myVertices.Clear(); - myFrontSC.Clear(); -} - - -//======================================================================= -//function : AddVertex -//purpose : -//======================================================================= - -void GraphTools_SC::AddVertex(const Standard_Integer V) -{ - myVertices.Append (V); -} - - -//======================================================================= -//function : NbVertices -//purpose : -//======================================================================= - -Standard_Integer GraphTools_SC::NbVertices() const -{ - return myVertices.Length(); -} - - - -//======================================================================= -//function : GetVertex -//purpose : -//======================================================================= - -Standard_Integer GraphTools_SC::GetVertex - (const Standard_Integer index) const -{ - return myVertices(index); -} - -//======================================================================= -//function : AddFrontSC -//purpose : -//======================================================================= - -void GraphTools_SC::AddFrontSC(const Handle(GraphTools_SC)& SC) -{ - myFrontSC.Append(SC); -} - - -//======================================================================= -//function : GetFrontSC -//purpose : -//======================================================================= - -const GraphTools_SCList& GraphTools_SC::GetFrontSC() const -{ - return myFrontSC; -} - - -//======================================================================= -//function : AddBackSC -//purpose : -//======================================================================= - -void GraphTools_SC::AddBackSC(const Handle(GraphTools_SC)& SC) -{ - myBackSC.Append(SC); -} - -//======================================================================= -//function : GetBackSC -//purpose : -//======================================================================= - -const GraphTools_SCList& GraphTools_SC::GetBackSC() const -{ - return myBackSC; -} - - diff --git a/src/GraphTools/GraphTools_SortedSCIterator.gxx b/src/GraphTools/GraphTools_SortedSCIterator.gxx deleted file mode 100644 index bbbde42153..0000000000 --- a/src/GraphTools/GraphTools_SortedSCIterator.gxx +++ /dev/null @@ -1,90 +0,0 @@ -// Created on: 1991-10-23 -// Created by: Denis PASCAL -// Copyright (c) 1991-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. - -// - -#include -#include - - -//======================================================================= -//function : GraphTools_SortedSCIterator -//purpose : -//======================================================================= - -GraphTools_SortedSCIterator::GraphTools_SortedSCIterator () -{ -} - - -//======================================================================= -//function : GraphTools_SortedSCIterator -//purpose : -//======================================================================= - -GraphTools_SortedSCIterator::GraphTools_SortedSCIterator - (const GraphTools_ReducedGraph& RG) -{ - Initialize (RG); -} - - -//======================================================================= -//function : Initialize -//purpose : -//======================================================================= - -void GraphTools_SortedSCIterator::Initialize - (const GraphTools_ReducedGraph& RG) -{ - myIterator.Initialize(RG.mySort); -} - - - -//======================================================================= -//function : More -//purpose : -//======================================================================= - -Standard_Boolean GraphTools_SortedSCIterator::More() const -{ - return myIterator.More(); -} - - -//======================================================================= -//function : Next -//purpose : -//======================================================================= - -void GraphTools_SortedSCIterator::Next() -{ - myIterator.Next(); -} - -//======================================================================= -//function : Value -//purpose : -//======================================================================= - -Handle(GraphTools_SC) GraphTools_SortedSCIterator::Value () const -{ - return myIterator.Value(); -} - - - diff --git a/src/GraphTools/GraphTools_SortedStrgCmptsFromIterator.cdl b/src/GraphTools/GraphTools_SortedStrgCmptsFromIterator.cdl deleted file mode 100644 index b91bd41fef..0000000000 --- a/src/GraphTools/GraphTools_SortedStrgCmptsFromIterator.cdl +++ /dev/null @@ -1,129 +0,0 @@ --- Created on: 1991-10-23 --- Created by: Denis PASCAL --- Copyright (c) 1991-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. - -generic class SortedStrgCmptsFromIterator from GraphTools - (Graph as any; - Vertex as any; - VHasher as any; - VIterator as any) - - ---Purposes: This generic class implements the Strong Components - -- Research algorithm from a set of vertices. An - -- iterator on adjacent vertices of a given one, are - -- requested. Each Strong Component encapsulates - -- vertices which are part of a cycle, in the underlying - -- graph. The interface of this algorithm is made as an - -- iterator. A each step it is possible to know the - -- number of vertices, which are members of the current - -- Strong Components, and to visit each one. Strong - -- Components are visited in such an order than noone is - -- returned before an other which point to it. - - -uses ListOfInteger from TColStd, - ListOfSequenceOfInteger from GraphTools, - ListIteratorOfListOfSequenceOfInteger from GraphTools - -raises NoMoreObject from Standard, - NoSuchObject from Standard, - DomainError from Standard - - - private class SCMap instantiates IndexedDataMap from TCollection - (Vertex,Integer,VHasher); - -is - - Create - ---Purpose: Create an empty algorithm. - returns SortedStrgCmptsFromIterator from GraphTools; - - FromVertex (me : in out; V : Vertex) - ---Purpose: Add as initial condition. This method is - -- cumulative. Use Perform method before visting the - -- result of the algorithm. - ---Level: Public - raises DomainError from Standard; - - Reset (me : in out); - ---Purpose: Reset the algorithm. It may be reused with new - -- conditions. - ---Level: Public - - Perform (me : in out; G : Graph); - ---Purpose: Peform the algorithm in from initial setted - -- conditions. - ---Level: Public - - More(me) - returns Boolean from Standard; - ---Purpose: returns True if there are others strong - -- components. - ---Level: Public - - Next(me : in out) - ---Purpose: Set the iterator to the next strong component. - ---Level: Public - raises NoMoreObject from Standard; - - NbVertices (me) - returns Integer from Standard - ---Purpose: Returns number of vertices of the current Strong - -- Components. - ---Level: Public - raises NoSuchObject from Standard; - - Value(me; index : Integer from Standard) - returns any Vertex - ---Purpose: returns the vertex of index of the current - -- Strong Component. - ---Level: Public - ---C++: return const & - raises NoSuchObject from Standard; - - Visit (me : in out; k : Integer from Standard; - G : Graph) - ---Level: Internal - returns Integer from Standard; - -fields - --- conditions - myVertices : SCMap from GraphTools; --- algorithm - myNowIndex : Integer from Standard; - myStack : ListOfInteger from TColStd; --- result - mySort : ListOfSequenceOfInteger from GraphTools; - myIterator : ListIteratorOfListOfSequenceOfInteger from GraphTools; - -end SortedStrgCmptsFromIterator; - - - - - - - - - - - - - - - - diff --git a/src/GraphTools/GraphTools_SortedStrgCmptsFromIterator.gxx b/src/GraphTools/GraphTools_SortedStrgCmptsFromIterator.gxx deleted file mode 100644 index 7bda0e21c9..0000000000 --- a/src/GraphTools/GraphTools_SortedStrgCmptsFromIterator.gxx +++ /dev/null @@ -1,200 +0,0 @@ -// Created on: 1991-10-23 -// Created by: Denis PASCAL -// Copyright (c) 1991-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. - -// - -#include -#include -#include -#include - - - -//======================================================================= -//function : GraphTools_SortedStrgCmptsFromIterator -//purpose : -//======================================================================= - -GraphTools_SortedStrgCmptsFromIterator:: - GraphTools_SortedStrgCmptsFromIterator () -{ - myNowIndex = 0; -} - - -//======================================================================= -//function : FromVertex -//purpose : -//======================================================================= - -void GraphTools_SortedStrgCmptsFromIterator::FromVertex (const Vertex& V) -{ -#ifdef DEB - Standard_Integer index = -#endif - myVertices.Add (V,0); -} - - - -//======================================================================= -//function : Perform -//purpose : -//======================================================================= - -void GraphTools_SortedStrgCmptsFromIterator::Perform (const Graph& G) -{ - myNowIndex = 0; - mySort.Clear(); - Standard_Integer visited; - Standard_Integer temp; - Standard_Integer index = 1; - while (index <= myVertices.Extent()) { - visited = myVertices.FindFromIndex(index); - if (visited == 0) temp = Visit(index,G); - index ++; - } - myIterator.Initialize(mySort); -} - - -//======================================================================= -//function : Reset -//purpose : -//======================================================================= - -void GraphTools_SortedStrgCmptsFromIterator::Reset () -{ - myVertices.Clear(); - myNowIndex = 0; - myStack.Clear(); - mySort.Clear(); -} - - -//======================================================================= -//function : More -//purpose : declenche l'algorithme de recherche des Strong Components -//======================================================================= - -Standard_Boolean GraphTools_SortedStrgCmptsFromIterator::More() const -{ - return myIterator.More(); -} - - -//======================================================================= -//function : Next -//purpose : -//======================================================================= - -void GraphTools_SortedStrgCmptsFromIterator::Next() -{ - myIterator.Next(); -} - - -//======================================================================= -//function : NbVertices -//purpose : -//======================================================================= - -Standard_Integer GraphTools_SortedStrgCmptsFromIterator::NbVertices() const -{ - return myIterator.Value().Length(); -} - - -//======================================================================= -//function : Value -//purpose : -//======================================================================= - -const Vertex& GraphTools_SortedStrgCmptsFromIterator::Value - (const Standard_Integer I) const -{ - Standard_Integer indexvertex = myIterator.Value().Value(I); - return myVertices.FindKey (indexvertex); -} - -//======================================================================= -//function : Visit -//purpose : private -//======================================================================= - -Standard_Integer GraphTools_SortedStrgCmptsFromIterator::Visit - (const Standard_Integer k, const Graph& G) -{ - Standard_Integer MIN; - Standard_Integer M; - myNowIndex++; - myVertices(k) = myNowIndex; - MIN = myNowIndex; - myStack.Prepend(k); - Standard_Integer currentVisited; - currentVisited = myVertices.FindFromIndex (k); - Standard_Integer adjacentIndex; - Standard_Integer adjacentVisited; - for (VIterator itV (G,myVertices.FindKey(k)); itV.More(); itV.Next()) { - adjacentIndex = myVertices.FindIndex(itV.Value()); - if (adjacentIndex == 0) { - adjacentIndex = myVertices.Add (itV.Value(),0); - adjacentVisited = 0; - } - else adjacentVisited = myVertices.FindFromIndex (adjacentIndex); - if (adjacentVisited == 0) M = Visit(adjacentIndex,G); - else M = adjacentVisited; - if (M < MIN) MIN = M; - } - if (MIN == currentVisited) { - TColStd_SequenceOfInteger theSequence; - mySort.Prepend(theSequence); - TColStd_SequenceOfInteger& newSC = mySort.First(); - Standard_Boolean more; - do { - newSC.Append(myStack.First()); - myVertices(myStack.First()) = IntegerLast(); - more = myStack.First() != k; - myStack.RemoveFirst() ; - } - while (more); - } - return MIN; -} - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/GraphTools/GraphTools_SortedStrgCmptsIterator.cdl b/src/GraphTools/GraphTools_SortedStrgCmptsIterator.cdl deleted file mode 100644 index 24e14eaff2..0000000000 --- a/src/GraphTools/GraphTools_SortedStrgCmptsIterator.cdl +++ /dev/null @@ -1,117 +0,0 @@ --- Created on: 1991-10-23 --- Created by: Denis PASCAL --- Copyright (c) 1991-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. - -generic class SortedStrgCmptsIterator from GraphTools - (Graph as any; - Vertex as any; - GIterator as any; - SSCIterator as any) - ---generic class SortedStrgCmptsIterator from GraphTools --- (Graph as any; --- Vertex as any; --- GIterator as GraphIterator (Graph,Vertex)) --- SSCIterator as SortedStrgCmptsFromIterator - - ---Purposes: This generic class implements the - -- SortedStrgCptsFromIterator with all vertices of - -- reached by the Tool GIterator. - -raises NoMoreObject from Standard, - NoSuchObject from Standard - -is - - - Create - returns SortedStrgCmptsIterator from GraphTools; - ---Purpose: Create an empty algorithm. - - Create (G : Graph) - ---Purpose: Create the algorithm setting each vertex of - -- reached by GIterator tool, as initial conditions. - -- Use Perform method before visting the result of - -- the algorithm. - returns SortedStrgCmptsIterator from GraphTools; - - FromGraph (me : in out; G : Graph); - ---Purpose: Add each vertex of reached by GIterator tool - -- as initial conditions. Use Perform method - -- before visiting the result of the algorithm. - ---Level: Public - - FromVertex (me : in out; V : Vertex); - ---Purpose: Add as initial condition. This method is - -- cumulative. Use Perform method before visting the - -- result of the algorithm. - ---Level: Public - - Reset (me : in out); - ---Purpose: Reset the algorithm. It may be reused with new - -- initial conditions. - ---Level: Public - - Perform (me : in out; G : Graph); - ---Purpose: Peform the algorithm in from initial setted - -- conditions. - ---Level: Public - - More(me) returns Boolean from Standard; - ---Purpose: returns True if there are others strong - -- components. - ---Level: Public - - Next(me : in out) - ---Purpose: Set the iterator to the next strong component. - ---Level: Public - raises NoMoreObject from Standard; - - NbVertices (me) returns Integer from Standard - ---Purpose: Returns number of vertices of the current Strong - -- Components. - ---Level: Public - raises NoSuchObject from Standard; - - Value(me; I : Integer from Standard) - returns any Vertex - ---Purpose: returns the vertex of index of the current - -- Strong Component. - ---C++: return const & - ---Level: Public - raises NoSuchObject from Standard; - -fields - - myIterator : SSCIterator; - -end SortedStrgCmptsIterator; - - - - - - - - - - - - - - - - - diff --git a/src/GraphTools/GraphTools_SortedStrgCmptsIterator.gxx b/src/GraphTools/GraphTools_SortedStrgCmptsIterator.gxx deleted file mode 100644 index 4151cf2cd5..0000000000 --- a/src/GraphTools/GraphTools_SortedStrgCmptsIterator.gxx +++ /dev/null @@ -1,140 +0,0 @@ -// Created on: 1991-10-23 -// Created by: Denis PASCAL -// Copyright (c) 1991-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. - -// - -//======================================================================= -//function : GraphTools_SortedStrgCmptsIterator -//purpose : -//======================================================================= - -GraphTools_SortedStrgCmptsIterator::GraphTools_SortedStrgCmptsIterator () -{} - - - -//======================================================================= -//function : GraphTools_SortedStrgCmptsIterator -//purpose : -//======================================================================= - -GraphTools_SortedStrgCmptsIterator::GraphTools_SortedStrgCmptsIterator - (const Graph& G) -{ - FromGraph(G); -} - - -//======================================================================= -//function : FromVertex -//purpose : -//======================================================================= - -void GraphTools_SortedStrgCmptsIterator::FromVertex - (const Vertex& V) -{ - myIterator.FromVertex(V); -} - - -//======================================================================= -//function : FromGraph -//purpose : -//======================================================================= - -void GraphTools_SortedStrgCmptsIterator::FromGraph - (const Graph& G) -{ - for ( GIterator it (G); it.More(); it.Next() ) { - myIterator.FromVertex(it.Value()); - } -} - - -//======================================================================= -//function : Perform -//purpose : -//======================================================================= - -void GraphTools_SortedStrgCmptsIterator::Perform - (const Graph& G) -{ - myIterator.Perform(G); -} - - -//======================================================================= -//function : Reset -//purpose : -//======================================================================= - -void GraphTools_SortedStrgCmptsIterator::Reset () -{ - myIterator.Reset(); -} - - -//======================================================================= -//function : More -//purpose : -//======================================================================= - -Standard_Boolean GraphTools_SortedStrgCmptsIterator::More() const -{ - return myIterator.More(); -} - - -//======================================================================= -//function : Next -//purpose : -//======================================================================= - -void GraphTools_SortedStrgCmptsIterator::Next() -{ - myIterator.Next(); -} - -//======================================================================= -//function : NbVertices -//purpose : -//======================================================================= - -Standard_Integer GraphTools_SortedStrgCmptsIterator::NbVertices() const -{ - return myIterator.NbVertices(); -} - -//======================================================================= -//function : Value -//purpose : -//======================================================================= - -const Vertex& GraphTools_SortedStrgCmptsIterator::Value - (const Standard_Integer I) const -{ - return myIterator.Value(I); -} - - - - - - - - - - diff --git a/src/GraphTools/GraphTools_TSNode.cdl b/src/GraphTools/GraphTools_TSNode.cdl deleted file mode 100644 index cf1d523cb3..0000000000 --- a/src/GraphTools/GraphTools_TSNode.cdl +++ /dev/null @@ -1,49 +0,0 @@ --- Created on: 1993-09-28 --- Created by: Denis PASCAL --- 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. - -class TSNode from GraphTools - -uses SequenceOfInteger from TColStd - -is - - Create returns TSNode from GraphTools; - - Reset (me : in out); - - IncreaseRef (me : in out); - - DecreaseRef (me : in out); - - NbRef (me) returns Integer from Standard; - - AddSuccessor (me : in out; s : Integer from Standard); - - NbSuccessors (me) returns Integer from Standard; - - GetSuccessor (me; index : Integer from Standard) - returns Integer from Standard; - -fields - - referenceCount : Integer from Standard; - mySuccessors : SequenceOfInteger from TColStd; - -end TSNode; - - - - diff --git a/src/GraphTools/GraphTools_TSNode.cxx b/src/GraphTools/GraphTools_TSNode.cxx deleted file mode 100644 index 9cda7bbff3..0000000000 --- a/src/GraphTools/GraphTools_TSNode.cxx +++ /dev/null @@ -1,104 +0,0 @@ -// Created on: 1991-06-20 -// Created by: Denis PASCAL -// Copyright (c) 1991-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. - -// - -#include - -//======================================================================= -//function : GraphTools_TSNode -//purpose : -//======================================================================= -GraphTools_TSNode::GraphTools_TSNode () -{ - referenceCount = 0; -} - - -//======================================================================= -//function : Reset -//purpose : -//======================================================================= - -void GraphTools_TSNode::Reset () -{ - referenceCount = 0; - mySuccessors.Clear(); -} - - - -//======================================================================= -//function : IncreaseRef -//purpose : -//======================================================================= - -void GraphTools_TSNode::IncreaseRef() { referenceCount++; } - -//======================================================================= -//function : DecreaseRef -//purpose : -//======================================================================= - -void GraphTools_TSNode::DecreaseRef() { referenceCount--; } - - -//======================================================================= -//function : NbRef -//purpose : -//======================================================================= - -Standard_Integer GraphTools_TSNode::NbRef() const -{ - return referenceCount; -} - - -//======================================================================= -//function : AddSuccessor -//purpose : -//======================================================================= - -void GraphTools_TSNode::AddSuccessor(const Standard_Integer s) -{ - mySuccessors.Append(s); -} - - -//======================================================================= -//function : NbSuccessors -//purpose : -//======================================================================= - -Standard_Integer GraphTools_TSNode::NbSuccessors() const -{ - return mySuccessors.Length(); -} - -//======================================================================= -//function : GetSuccessor -//purpose : -//======================================================================= - -Standard_Integer GraphTools_TSNode::GetSuccessor - (const Standard_Integer index) const -{ - return mySuccessors(index); -} - - - - diff --git a/src/GraphTools/GraphTools_TopologicalSortFromIterator.cdl b/src/GraphTools/GraphTools_TopologicalSortFromIterator.cdl deleted file mode 100644 index b61b2a1ef9..0000000000 --- a/src/GraphTools/GraphTools_TopologicalSortFromIterator.cdl +++ /dev/null @@ -1,114 +0,0 @@ --- Created on: 1992-12-24 --- Created by: Denis PASCAL --- 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. - -generic class TopologicalSortFromIterator from GraphTools - (Graph as any; - Vertex as any; - VHasher as any; - VIterator as any) - ---generic class TopologicalSortFromIterator from GraphTools --- (Graph as any; --- Vertex as any; --- VHasher as MapHasher from TCollection (Vertex); --- VIterator as VertexIterator (Graph,Vertex)) - - ---Purpose: This generic class defines an iterator to visit - -- each vertex of the underlying graph, in such an - -- order that noone vertex is reach before any vertex - -- that point to it. In general the order produced by - -- topological sort is not unique. Usefull for DAG - -- Topological Sort. The option - -- allows the user to ignore (or not) any vertex wich - -- contains a self loop. The option - -- allows the user to visit (or not> vertices which - -- are in a cycle. - - -uses SequenceOfInteger from TColStd - -raises NoSuchObject from Standard, - NoMoreObject from Standard, - DomainError from Standard - - private class TSMap instantiates IndexedDataMap from TCollection - (Vertex,TSNode from GraphTools,VHasher); - -is - - Create - ---Purpose: Create an empty algorithm. - returns TopologicalSortFromIterator from GraphTools; - - FromVertex (me : in out; V : Vertex); - ---Purpose: Add as initial condition. This method is - -- cumulative. Use Perform method before visting the - -- result of the algorithm. - ---Level: Public - - Reset (me : in out); - ---Purpose: Reset the algorithm. It may be reused with new - -- initial conditions. - ---Level: Public - - Perform (me : in out; G : Graph; - ignoreSelfLoop : Boolean from Standard; - processCycle : Boolean from Standard); - ---Purpose: Peform the algorithm in from initial setted - -- conditions according to the two following flags. - -- * allows the user to ignore (or - -- not) any vertex wich contains a self loop. - -- * allows the user to visit (or not> - -- vertex which is in a cycle. - ---Level: Public - - More (me) - returns Boolean from Standard; - ---Level: Public - - Next (me : in out) - raises NoMoreObject from Standard; - ---Level: Public - - Value (me) - returns any Vertex - ---Level: Public - ---C++: return const & - raises NoSuchObject from Standard; - - IsInCycle (me) - returns Boolean from Standard - ---Purpose: Returns TRUE if the current vertex is in a cycle. - ---Level: Public - raises NoSuchObject from Standard; - - -fields - --- conditions - myVertices : TSMap from GraphTools; - myIgnoreSelfLoop : Boolean from Standard; - myProcessCycle : Boolean from Standard; --- result - mySort : SequenceOfInteger from TColStd; - myCycles : Integer from Standard; - myCurrent : Integer from Standard; - -end TopologicalSortFromIterator; - - - - diff --git a/src/GraphTools/GraphTools_TopologicalSortFromIterator.gxx b/src/GraphTools/GraphTools_TopologicalSortFromIterator.gxx deleted file mode 100644 index 2671914bed..0000000000 --- a/src/GraphTools/GraphTools_TopologicalSortFromIterator.gxx +++ /dev/null @@ -1,225 +0,0 @@ -// Created on: 1991-05-29 -// Created by: Denis PASCAL -// Copyright (c) 1991-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. - -// - -#include -#include -#include -#include -#include - -//======================================================================= -//function : GraphTools_TopologicalSortFromIterator -//purpose : -//======================================================================= - -GraphTools_TopologicalSortFromIterator::GraphTools_TopologicalSortFromIterator () {} - - - -//======================================================================= -//function : FromVertex -//purpose : -//======================================================================= - -void GraphTools_TopologicalSortFromIterator::FromVertex (const Vertex& V) -{ - GraphTools_TSNode newnode; - myVertices.Add(V,newnode); -} - - -//======================================================================= -//function : Perform -//purpose : -//======================================================================= - -void GraphTools_TopologicalSortFromIterator::Perform - (const Graph& G, - const Standard_Boolean ignoreSelfLoop, - const Standard_Boolean processCycle) -{ - myIgnoreSelfLoop = ignoreSelfLoop; - myProcessCycle = processCycle; - myCurrent = 1; - mySort.Clear(); - // algorithm DS - Standard_Integer i, indexcurrent, indexadjacent, nbadjacent; - indexcurrent = 1; - while (indexcurrent <= myVertices.Extent()) { - VIterator itV (G,myVertices.FindKey(indexcurrent)); - for ( ; itV.More(); itV.Next()) { - indexadjacent = myVertices.FindIndex(itV.Value()); - if (indexadjacent == 0) { - GraphTools_TSNode newnode; - indexadjacent = myVertices.Add(itV.Value(),newnode); - } - if (! (indexcurrent == indexadjacent && myIgnoreSelfLoop)) { - myVertices(indexcurrent).AddSuccessor(indexadjacent); - myVertices(indexadjacent).IncreaseRef(); - } - } - indexcurrent++; - } - // current root vertices queue - TColStd_ListOfInteger processQueue; - Standard_Integer nbVertices = myVertices.Extent(); - for (i = 1 ; i <= nbVertices; i++) { - if (myVertices(i).NbRef() == 0) processQueue.Append(i); - } - // acyclic processing - while (!processQueue.IsEmpty()) { - indexcurrent = processQueue.First(); - mySort.Append(indexcurrent); - nbadjacent = myVertices(indexcurrent).NbSuccessors(); - for (i = 1; i <= nbadjacent; i++) { - indexadjacent = myVertices(indexcurrent).GetSuccessor(i); - myVertices(indexadjacent).DecreaseRef(); - if (myVertices(indexadjacent).NbRef() == 0) { - processQueue.Append(indexadjacent); - } - } - processQueue.RemoveFirst(); - } - // cyclic processing - myCycles = mySort.Length() + 1; - if (myProcessCycle) { - for (i = 1 ; i <= nbVertices; i++) { - if (myVertices(i).NbRef() != 0) mySort.Append(i); - } - } -} - - -//======================================================================= -//function : Reset -//purpose : -//======================================================================= - -void GraphTools_TopologicalSortFromIterator::Reset () -{ - myVertices.Clear(); -// myIgnoreSelfLoop : Boolean from Standard; -// myProcessCycle : Boolean from Standard; - mySort.Clear(); -// myCycles : Integer from Standard; - myCurrent = 1; -} - - -//======================================================================= -//function : More -//purpose : -//======================================================================= - -Standard_Boolean GraphTools_TopologicalSortFromIterator::More () const -{ - return myCurrent <= mySort.Length(); -} - - -//======================================================================= -//function : Next -//purpose : -//======================================================================= - -void GraphTools_TopologicalSortFromIterator::Next () -{ - if (!More()) Standard_NoMoreObject::Raise(); - myCurrent ++; -} - - -//======================================================================= -//function : Value -//purpose : -//======================================================================= - -const Vertex& GraphTools_TopologicalSortFromIterator::Value () const { - if (!More()) Standard_NoSuchObject::Raise(); - return myVertices.FindKey (mySort(myCurrent)); -} - - -//======================================================================= -//function : IsInCycle -//purpose : -//======================================================================= - -Standard_Boolean GraphTools_TopologicalSortFromIterator::IsInCycle () const -{ - if (!More()) Standard_NoSuchObject::Raise(); - return myCurrent >= myCycles; -} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/GraphTools/GraphTools_TopologicalSortIterator.cdl b/src/GraphTools/GraphTools_TopologicalSortIterator.cdl deleted file mode 100644 index 790f314c76..0000000000 --- a/src/GraphTools/GraphTools_TopologicalSortIterator.cdl +++ /dev/null @@ -1,107 +0,0 @@ --- Created on: 1992-12-24 --- Created by: Denis PASCAL --- 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. - -generic class TopologicalSortIterator from GraphTools - (Graph as any; - Vertex as any; - GIterator as any; - TSIterator as any) - ---generic class TopologicalSorIterator from GraphTools --- (Graph as any; --- Vertex as any; --- GIterator as GraphIterator (Graph,Vertex)) --- TSIterator as TopologicalSortFromIterator - - ---Purpose: This generic class defines an iterator to visit - -- each vertex of the underlying graph, in such an - -- order that noone vertex is reach before any vertex - -- that point to it. In general the order produced by - -- topological sort is not unique. Usefull for DAG - -- Topological Sort. - -raises NoSuchObject from Standard, - NoMoreObject from Standard - - -is - - Create - ---Purpose: Create an empty algorithm. - returns TopologicalSortIterator from GraphTools; - - Create (G : Graph) - ---Purpose: Create the algorithm setting each vertex of - -- reached by GIterator tool, as initial conditions. - -- Use Perform method before visting the result of - -- the algorithm. - returns TopologicalSortIterator from GraphTools; - - FromGraph (me : in out; G : Graph); - ---Purpose: Add each vertex of reached by GIterator tool - -- as initial conditions. Use Perform method - -- before visiting the result of the algorithm. - ---Level: Public - - FromVertex (me : in out; V : Vertex); - ---Purpose: Add as initial condition. This method is - -- cumulative. Use Perform method before visting the - -- result of the algorithm. - ---Level: Public - - Reset (me : in out); - ---Purpose: Reset the algorithm. It may be reused with new - -- initial conditions. - ---Level: Public - - Perform (me : in out; G : Graph ; - ignoreSelfLoop : Boolean from Standard; - processCycle : Boolean from Standard); - ---Purpose: Peform the algorithm in from initial setted - -- conditions according to the two following flags. - -- * allows the user to ignore (or - -- not) any vertex wich contains a self loop. - -- * allows the user to visit (or not> - -- vertex which is in a cycle. - ---Level: Public - - More (me) - returns Boolean from Standard; - ---Level: Public - - Next (me : in out) - raises NoMoreObject from Standard; - ---Level: Public - - Value (me) returns any Vertex - ---Level: Public - ---C++: return const & - raises NoSuchObject from Standard; - - IsInCycle (me) returns Boolean from Standard - ---Purpose: Returns TRUE if the current vertex is in a cycle. - ---Level: Public - raises NoSuchObject from Standard; - -fields - - myIterator : TSIterator; - -end TopologicalSortIterator; - - - - diff --git a/src/GraphTools/GraphTools_TopologicalSortIterator.gxx b/src/GraphTools/GraphTools_TopologicalSortIterator.gxx deleted file mode 100644 index a2868eb6a0..0000000000 --- a/src/GraphTools/GraphTools_TopologicalSortIterator.gxx +++ /dev/null @@ -1,154 +0,0 @@ -// Created on: 1991-05-29 -// Created by: Denis PASCAL -// Copyright (c) 1991-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. - -// - - -//======================================================================= -//function : GraphTools_TopologicalSortIterator -//purpose : -//======================================================================= - -GraphTools_TopologicalSortIterator::GraphTools_TopologicalSortIterator () -{} - - -//======================================================================= -//function : GraphTools_TopologicalSortIterator -//purpose : -//======================================================================= - -GraphTools_TopologicalSortIterator::GraphTools_TopologicalSortIterator - (const Graph& G) -{ - FromGraph (G); -} - - -//======================================================================= -//function : FromVertex -//purpose : -//======================================================================= - -void GraphTools_TopologicalSortIterator::FromVertex - (const Vertex& V) -{ - myIterator.FromVertex(V); -} - - -//======================================================================= -//function : FromGraph -//purpose : -//======================================================================= - -void GraphTools_TopologicalSortIterator::FromGraph - (const Graph& G) -{ - for ( GIterator it (G); it.More(); it.Next() ) { - myIterator.FromVertex(it.Value()); - } -} - - -//======================================================================= -//function : Perform -//purpose : -//======================================================================= - -void GraphTools_TopologicalSortIterator::Perform - (const Graph& G, - const Standard_Boolean ignoreSelfLoops, - const Standard_Boolean processCycle) -{ - myIterator.Perform(G,ignoreSelfLoops,processCycle); -} - - -//======================================================================= -//function : Reset -//purpose : -//======================================================================= - -void GraphTools_TopologicalSortIterator::Reset () -{ - myIterator.Reset(); -} - - -//======================================================================= -//function : More -//purpose : -//======================================================================= - -Standard_Boolean GraphTools_TopologicalSortIterator::More () const -{ - return myIterator.More(); -} - - -//======================================================================= -//function : Next -//purpose : -//======================================================================= - -void GraphTools_TopologicalSortIterator::Next () -{ - myIterator.Next(); -} - - -//======================================================================= -//function : Value -//purpose : -//======================================================================= - -const Vertex& GraphTools_TopologicalSortIterator::Value () const -{ - return myIterator.Value(); -} - - -//======================================================================= -//function : IsInCycle -//purpose : -//======================================================================= - -Standard_Boolean GraphTools_TopologicalSortIterator::IsInCycle () const -{ - return myIterator.IsInCycle(); -} - - - - - - - - - - - - - - - - - - - - - diff --git a/src/GraphTools/GraphTools_VertexIterator.cdl b/src/GraphTools/GraphTools_VertexIterator.cdl deleted file mode 100644 index 0b23810520..0000000000 --- a/src/GraphTools/GraphTools_VertexIterator.cdl +++ /dev/null @@ -1,69 +0,0 @@ --- Created on: 1991-03-06 --- Created by: Denis Pascal --- Copyright (c) 1991-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. - -generic class VertexIterator from GraphTools (Graph as any; - Vertex as any) - ---template class VertexIterator from GraphTools (Graph as any, --- Vertex as any) - - ---Purpose: Template class which defines Signature of an iterator - -- to visit each adjacent vertex of a given one in the - -- underlying graph. - - -raises NoMoreObject from Standard, - NoSuchObject from Standard - -is - - Create (G : Graph; V : Vertex) returns VertexIterator; - - More (me) returns Boolean; - ---Purpose: Returns TRUE if there are other vertices. - ---Level: Public - - Next(me : in out) - --- Purpose : Set the iterator to the next Vertex. - ---Level: Public - raises NoMoreObject from Standard; - - Value(me) returns Vertex - --- Purpose: Returns the vertex value for the current position - -- of the iterator. - ---Level: Public - raises NoSuchObject from Standard; - -end VertexIterator; - - - - - - - - - - - - - - - - - - - diff --git a/src/GraphTools/GraphTools_VertexIterator.gxx b/src/GraphTools/GraphTools_VertexIterator.gxx deleted file mode 100644 index b628db6fa2..0000000000 --- a/src/GraphTools/GraphTools_VertexIterator.gxx +++ /dev/null @@ -1,15 +0,0 @@ -// Created on: 1993-09-27 -// Created by: Denis PASCAL -// 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. diff --git a/src/IFGraph/IFGraph.cdl b/src/IFGraph/IFGraph.cdl index f5d011e639..9426eae521 100644 --- a/src/IFGraph/IFGraph.cdl +++ b/src/IFGraph/IFGraph.cdl @@ -20,7 +20,7 @@ package IFGraph -- Entities as on a Graph. These Tools are based on classes -- Graph and GraphContent from Interface -uses Interface, GraphTools, TColStd, Standard +uses Interface, TColStd, Standard is @@ -39,15 +39,4 @@ is class Cycles; class SCRoots; --- class SortedStrongsFrom instantiates SortedStrgCmptsFromIterator from GraphTools --- (Graph from Interface,Transient, --- MapTransientHasher from TColStd,GraphContent from Interface); - --- class SortedStrongs instantiates SortedStrgCmptsIterator from GraphTools --- (Graph from Interface,Transient, --- GraphContent from Interface,SortedStrongsFrom from IFGraph); - --- class SortedStrongs instantiates SortedStrgCmptsIterator --- (Graph,Transient,GraphContent,GraphContent); - end IFGraph; diff --git a/src/Interface/Interface_EntityIterator.cdl b/src/Interface/Interface_EntityIterator.cdl index 6c778e7046..8fe5ef8c05 100644 --- a/src/Interface/Interface_EntityIterator.cdl +++ b/src/Interface/Interface_EntityIterator.cdl @@ -16,8 +16,8 @@ class EntityIterator from Interface - ---Purpose : Defines an Iterator on Entities, complying with GraphTools - -- needs. Allows considering of various criteria + ---Purpose : Defines an Iterator on Entities. + -- Allows considering of various criteria uses Transient, HSequenceOfTransient from TColStd, IntVal, InterfaceModel @@ -71,7 +71,7 @@ is Value (me) returns any Transient raises NoSuchObject; ---Purpose : Returns the current Entity iterated, to be used by Interface - -- tools or by GraphTools (where Entity is a Vertex) + -- tools ---C++ : return const & Content (me) returns HSequenceOfTransient; diff --git a/src/Materials/Materials.cdl b/src/Materials/Materials.cdl deleted file mode 100644 index de9bccf833..0000000000 --- a/src/Materials/Materials.cdl +++ /dev/null @@ -1,103 +0,0 @@ --- Created on: 1992-10-22 --- Created by: Gilles DEBARBOUILLE --- 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. - -package Materials - - ---Purpose: This package is useful for creating Material objects, - -- which contain a sequence of physical properties. All - -- applications which request physical properties on a - -- given material, should reference this package. - -- - -- A predefined sequence of materials is given by the - -- dictionary of materials, and the sequence of known - -- properties is given by the material definition. - -- - -- Only the package methods are public, except the - -- DictionaryOfMaterials class which is called by the - -- method Material. - -uses - - TCollection, - Quantity, - Dynamic - -is - - class Color; - class MaterialDefinition; - - class MaterialsDictionary; - - class FuzzyInstance instantiates FuzzyInstance from Dynamic(MaterialDefinition from Materials); - - class Material; - - class MtsSequence instantiates - Sequence from TCollection (Material from Materials); - class MaterialsSequence instantiates - HSequence from TCollection (Material from Materials, MtsSequence); - - MaterialFile(afile : CString from Standard); - ---Level: Public - ---Purpose: Sets the location and the name of the file defining - -- the definition of a material, in term of properties. - - MaterialsFile(afile : CString from Standard); - ---Level: Public - ---Purpose: Sets the location and the name of the file defining - -- the dictionary of materials. - - MaterialsFile returns CString from Standard; - ---Level: Internal - ---Purpose: Returns the location and the name of the dictionary - -- file of materials. - - DictionaryOfMaterials returns MaterialsDictionary from Materials; - ---Level: Internal - ---Purpose: Returns the dictionary of materials.The dictionary is - -- created at the first call to this method, or if the - -- dictionary is not up to date with respect to the file - -- date. - - ExistMaterial(aName : CString from Standard) returns Boolean from Standard; - ---Purpose: True if the materialofname aName exists ... - - Material(amaterial : CString from Standard) returns Material from Materials; - ---Level: Public - ---Purpose: Retrieves from the dictionary the object material with - -- as name. - - NumberOfMaterials returns Integer from Standard; - ---Level: Public - ---Purpose: Returns the number of materials previously stored in - -- the dictionary. - - Material(anindex : Integer from Standard) returns Material from Materials; - ---Level: Public - ---Purpose: This method used with the previous one, allows the - -- exploration of all the dictionary. It returns a - -- Material instance. - -end Materials; - - - - - - - - diff --git a/src/Materials/Materials.cxx b/src/Materials/Materials.cxx deleted file mode 100644 index e04d3ab97e..0000000000 --- a/src/Materials/Materials.cxx +++ /dev/null @@ -1,124 +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. - -// ---------------------------------------------------------------- -// Historique : -// ---------------------------------------------------------------- -// 12/04/98 : CRD : Suppression des cout. -// 22/10/92 : GDE : Creation -// ---------------------------------------------------------------- - - -#include -#include -#include -#include -#include - -static Handle(Materials_MaterialsDictionary) materialsdictionary; -static Handle(Materials_MaterialDefinition) materialdefinition; - -static Standard_PCharacter materialfile; -static Standard_PCharacter materialsfile; - -void DictionaryOfDefinitions(Handle(Materials_MaterialDefinition)&); - -//======================================================================= -//function : MaterialFile -//purpose : -//======================================================================= - -void Materials::MaterialFile(const Standard_CString afile) -{ - Standard_Size length = strlen(afile); - materialfile = new Standard_Character[length+1]; - strcpy(materialfile,afile); - materialfile[length] = 0; -} - -//======================================================================= -//function : MaterialsFile -//purpose : -//======================================================================= - -void Materials::MaterialsFile(const Standard_CString afile) -{ - Standard_Size length = strlen(afile); - materialsfile = new Standard_Character[length+1]; - strcpy(materialsfile,afile); - materialsfile[length] = 0; -} - -//======================================================================= -//function : MaterialsFile -//purpose : -//======================================================================= - -Standard_CString Materials::MaterialsFile() -{ - return materialsfile; -} - -//======================================================================= -//function : DictionaryOfMaterials -//purpose : -//======================================================================= - -Handle(Materials_MaterialsDictionary) Materials::DictionaryOfMaterials() -{ - if(materialsdictionary.IsNull()) - { - materialsdictionary = new Materials_MaterialsDictionary(); - } - else if(!materialsdictionary->UpToDate()) - { - materialsdictionary = new Materials_MaterialsDictionary(); - } - return materialsdictionary; -} - - -Handle(Materials_Material) Materials::Material(const Standard_CString amaterial) -{ - return (Materials::DictionaryOfMaterials())->Material(amaterial); -} - -Standard_Boolean Materials::ExistMaterial(const Standard_CString aName) -{ - return (Materials::DictionaryOfMaterials())->ExistMaterial(aName); -} - -void DictionaryOfDefinitions (Handle(Materials_MaterialDefinition)& adictionary) -{ - if(materialdefinition.IsNull()) - { - materialdefinition = new Materials_MaterialDefinition(); - materialdefinition->Creates(materialfile); - } - else if(!materialdefinition->UpToDate()) - { - materialdefinition->Creates(materialfile); - } - adictionary = materialdefinition; -} - -Standard_Integer Materials::NumberOfMaterials() -{ - return (Materials::DictionaryOfMaterials())->NumberOfMaterials(); -} - -Handle(Materials_Material) Materials::Material(const Standard_Integer anindex) -{ - return (Materials::DictionaryOfMaterials())->Material(anindex); -} - diff --git a/src/Materials/Materials_Color.cdl b/src/Materials/Materials_Color.cdl deleted file mode 100644 index f6f47f3e31..0000000000 --- a/src/Materials/Materials_Color.cdl +++ /dev/null @@ -1,71 +0,0 @@ --- Created on: 1993-04-15 --- Created by: Gilles DEBARBOUILLE --- 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. - -class Color from Materials - - ---Purpose: This class encapsulates a Quantity_Color in a - -- Transient object, to be used in an ObjectProperty - -- from the package Dynamic. - -inherits - - Transient - -uses - - Color from Quantity, TypeOfColor from Quantity, NameOfColor from Quantity - ---raises - -is - - Create returns mutable Color from Materials; - ---Level: Internal - ---Purpose: Creates an empty instance of Color. - - Create(acolor : Color from Quantity) - ---Level: Internal - ---Purpose: Creates an instance of Color, with as color. - - returns mutable Color from Materials; - - Color(me : mutable ; acolor : Color from Quantity) - ---Level: Internal - ---Purpose: Sets into . - is static; - - Color(me) returns Color from Quantity - ---Level: Internal - ---Purpose: Returns a Quantity_Color corresponding to . - is static; - - Color(me; aTypeOfColor : in TypeOfColor from Quantity; Reel1, Reel2, Reel3 : out Real from Standard); - ---Purpose: Get the values ( RGB or HLS ) between 0.0 and 1.0 - - Color255(me; aTypeOfColor : in TypeOfColor from Quantity; Reel1, Reel2, Reel3 : out Real from Standard); - ---Purpose: Get the values ( RGB or HLS ) between 0.0 and 255.0 - - SetColor(me : mutable; aTypeOfColor : in TypeOfColor from Quantity; Reel1, Reel2, Reel3 : in Real from Standard); - ---Purpose: Set the values ( RGB or HLS ) between 0.0 and 1.0 - - SetColor255(me : mutable; aTypeOfColor : in TypeOfColor from Quantity; Reel1, Reel2, Reel3 : in Real from Standard); - ---Purpose: Set the values ( RGB or HLS ) between 0.0 and 255.0 - -fields - - thecolor : Color from Quantity; - -end Color; diff --git a/src/Materials/Materials_Color.cxx b/src/Materials/Materials_Color.cxx deleted file mode 100644 index e1cacb3b9c..0000000000 --- a/src/Materials/Materials_Color.cxx +++ /dev/null @@ -1,74 +0,0 @@ -// Created on: 1993-04-15 -// Created by: Gilles DEBARBOUILLE -// 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. - -#include - -Materials_Color::Materials_Color() -{} - -Materials_Color::Materials_Color(const Quantity_Color& acolor) -{ - thecolor = acolor; -} - -void Materials_Color::Color(const Quantity_Color& acolor) -{ - thecolor = acolor; -} - -Quantity_Color Materials_Color::Color() const -{ - return thecolor; -} - -void Materials_Color::Color(const Quantity_TypeOfColor aTypeOfColor, - Standard_Real& Reel1, - Standard_Real& Reel2, - Standard_Real& Reel3) const -{ - Quantity_Color aQColor = Color(); - aQColor.Values(Reel1,Reel2, Reel3, aTypeOfColor); -} - -void Materials_Color::Color255(const Quantity_TypeOfColor aTypeOfColor, - Standard_Real& Reel1, - Standard_Real& Reel2, - Standard_Real& Reel3) const -{ - Quantity_Color aQColor = Color(); - aQColor.Values(Reel1,Reel2, Reel3, aTypeOfColor); - Reel1=Reel1*255.0; - Reel2=Reel2*255.0; - Reel3=Reel3*255.0; -} - -void Materials_Color::SetColor(const Quantity_TypeOfColor aTypeOfColor, - const Standard_Real Reel1, - const Standard_Real Reel2, - const Standard_Real Reel3) -{ - Quantity_Color aQColor(Reel1,Reel2, Reel3, aTypeOfColor); - Color(aQColor); -} - -void Materials_Color::SetColor255(const Quantity_TypeOfColor aTypeOfColor, - const Standard_Real Reel1, - const Standard_Real Reel2, - const Standard_Real Reel3) -{ - Quantity_Color aQColor(Reel1/255.0,Reel2/255.0, Reel3/255.0, aTypeOfColor); - Color(aQColor); -} diff --git a/src/Materials/Materials_Material.cdl b/src/Materials/Materials_Material.cdl deleted file mode 100644 index 764d7a10b7..0000000000 --- a/src/Materials/Materials_Material.cdl +++ /dev/null @@ -1,63 +0,0 @@ --- Created on: 1992-10-22 --- Created by: Gilles DEBARBOUILLE --- 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. - -class Material from Materials - - ---Purpose: This class describes the facilities available to - -- create and manipulate materials. - -inherits - - FuzzyInstance from Materials - -uses - - HAsciiString from TCollection, - AsciiString from TCollection - ---raises - -is - - Create(amaterial : CString from Standard) - - ---Level: Internal - - ---Purpose: Creates the material . - - returns mutable Material from Materials; - - Name(me) returns AsciiString from TCollection - - ---Level: Public - - ---Purpose: Returns the name of the material. - - is static; - - Dump(me ; astream : in out OStream) - - ---Level: Internal - - ---Purpose: Useful for debugging. - - is redefined; - -fields - - thematerial : HAsciiString from TCollection; - -end Material; diff --git a/src/Materials/Materials_Material.cxx b/src/Materials/Materials_Material.cxx deleted file mode 100644 index c89bb8227b..0000000000 --- a/src/Materials/Materials_Material.cxx +++ /dev/null @@ -1,52 +0,0 @@ -// Created on: 1992-10-22 -// Created by: Gilles DEBARBOUILLE -// 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. - -#include -#include -#include - -//======================================================================= -//function : Materials_Material -//purpose : -//======================================================================= - -Materials_Material::Materials_Material(const Standard_CString amaterial) - : Materials_FuzzyInstance("material definition") -{ - thematerial = new TCollection_HAsciiString(amaterial); -} - -//======================================================================= -//function : Name -//purpose : -//======================================================================= - -TCollection_AsciiString Materials_Material::Name() const -{ - return thematerial->String(); -} - -//======================================================================= -//function : Dump -//purpose : -//======================================================================= - -void Materials_Material::Dump(Standard_OStream& astream) const -{ - TCollection_AsciiString string = thematerial->String(); - astream<<"\nMaterial : "<, - -- the type of parameter and a string - -- which describes the values useful for this type of - -- parameters, creates and returns a Parameter object - -- from Dynamic. - - is redefined; - ---fields - -end MaterialDefinition; diff --git a/src/Materials/Materials_MaterialDefinition.cxx b/src/Materials/Materials_MaterialDefinition.cxx deleted file mode 100644 index 37cff3a23b..0000000000 --- a/src/Materials/Materials_MaterialDefinition.cxx +++ /dev/null @@ -1,86 +0,0 @@ -// Created on: 1994-01-14 -// Created by: Gilles DEBARBOUILLE -// 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. - -// Historique : -// CRD : 03/07/97 : Portage Windows NT. - - -#include -#include -#include -#include -#ifdef HAVE_CONFIG_H -# include -#endif -#ifdef HAVE_STRINGS_H -# include -#endif -//#ifdef WNT -//#define strcasecmp _stricoll -#include -//#endif - -//======================================================================= -//function : Materials_MaterialDefinition -//purpose : -//======================================================================= - -Materials_MaterialDefinition::Materials_MaterialDefinition() - : Dynamic_FuzzyDefinitionsDictionary() -{} - -//======================================================================= -//function : Switch -//purpose : -//======================================================================= - -Handle(Dynamic_Parameter) Materials_MaterialDefinition::Switch( - const Standard_CString aname, - const Standard_CString atype, - const Standard_CString avalue) const -{ - Standard_Integer fr; - char value1[81],value2[81],value3[81]; - Handle(Dynamic_Parameter) parameter; - Handle(Dynamic_ObjectParameter) objectparameter; - - if (!strcasecmp(atype,"Materials_Color")) - { - memset(value1,0,sizeof(value1)); - memset(value2,0,sizeof(value2)); - memset(value3,0,sizeof(value3)); - - fr = sscanf(avalue,"%80s%80s%80s",value1,value2,value3); - - Handle(Materials_Color) pcolor = - new Materials_Color(Quantity_Color(Atof(value1), - Atof(value2), - Atof(value3), - Quantity_TOC_RGB)); - objectparameter = new Dynamic_ObjectParameter(aname,pcolor); - parameter = *(Handle(Dynamic_Parameter)*)&objectparameter; - } - - else - { - parameter = Dynamic_FuzzyDefinitionsDictionary::Switch(aname,atype,avalue); - } - - return parameter; -} - - - diff --git a/src/Materials/Materials_MaterialsDictionary.cdl b/src/Materials/Materials_MaterialsDictionary.cdl deleted file mode 100644 index db07c884cf..0000000000 --- a/src/Materials/Materials_MaterialsDictionary.cdl +++ /dev/null @@ -1,85 +0,0 @@ --- Created on: 1993-01-18 --- Created by: Gilles DEBARBOUILLE --- 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. - -class MaterialsDictionary from Materials - - ---Purpose: This class creates a dictionary of materials. - -inherits - - Transient - -uses - OStream from Standard, - HAsciiString from TCollection, - MaterialsSequence from Materials, - Material from Materials - -raises - - NoSuchObject from Standard - -is - - Create returns mutable MaterialsDictionary from Materials; - ---Level: Internal - ---Purpose: Returns a MaterialsDictionary object which contains - -- the sequence of all the materials the user wants to - -- consider. - - Material(me ; amaterial : CString from Standard) returns Material from Materials - raises NoSuchObject from Standard - ---Level: Internal - ---Purpose: Retrieves from the dictionary the object material with - -- as name. If does not exist in - -- the dictionary an exeption is raised. - is static; - - ExistMaterial(me ; aName : CString from Standard) returns Boolean from Standard; - ---Purpose: True if the materialofname aName exists ... - - NumberOfMaterials(me) returns Integer from Standard - ---Level: Internal - ---Purpose: Returns the number of materials previously stored in - -- the dictionary. - is static; - - Material(me ; anindex : Integer from Standard) returns Material from Materials - ---Level: Internal - ---Purpose: This method used with the previous one, allow the - -- exploration of all the dictionary. It returns a - -- Material instance. - is static; - - UpToDate(me) returns Boolean from Standard - ---Level: Internal - ---Purpose: Returns true if there has been no modification of the - -- file Materials.dat since the creation of the dictionary - -- object, false otherwise. - is static; - - Dump(me ; astream : in out OStream from Standard ) - ---Level: Internal - ---Purpose: Useful for debugging. - is static; - -fields - - thefilename : HAsciiString from TCollection; - thetime : Time from Standard; - thematerialssequence : MaterialsSequence from Materials; - -end MaterialsDictionary; diff --git a/src/Materials/Materials_MaterialsDictionary.cxx b/src/Materials/Materials_MaterialsDictionary.cxx deleted file mode 100644 index 11c21a4684..0000000000 --- a/src/Materials/Materials_MaterialsDictionary.cxx +++ /dev/null @@ -1,245 +0,0 @@ -// Created on: 1993-01-18 -// Created by: Gilles DEBARBOUILLE -// 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. - -// Historique : -// CRD : 03/07/97 : Portage Windows NT. -#ifdef HAVE_CONFIG_H -# include -#endif - -#include - -#ifdef HAVE_SYS_TYPES_H -# include -#endif -#if defined (HAVE_SYS_STAT_H) || defined (WNT) -# include -#endif -#ifdef HAVE_STDLIB_H -# include -#endif -#ifdef HAVE_STRINGS_H -# include -#endif - -#include - -#include -#include -#include -#include -#include -#include - -#ifdef WNT -#define stat _stat -#endif -//#define strcasecmp _stricoll -#include -//#endif - -//======================================================================= -//function : Materials_MaterialsDictionary -//purpose : -//======================================================================= - -Materials_MaterialsDictionary::Materials_MaterialsDictionary() -{ - Standard_Integer i,fr,begin,end,lengthname; - //char* filename; - - char line[256]; - char name[81]; - char type[81]; - char value1[81],value2[81],value3[81]; - Handle(Materials_MaterialsSequence) materialssequence; - Handle(Materials_Material) material; - Handle(Materials_Color) pcolor; - - struct stat buf; - - Standard_CString filename = Materials::MaterialsFile(); - - ifstream file(filename); - if(!file) - { - cout<<"unable to open "<= 0 && ( line[i] == ' ' || !line[i]))line[i--] = 0; - fr = i+1; - if(fr <= 1)continue; - - if(line[0] != ' ') - { - material = new Materials_Material(line); - thematerialssequence->Append(material); - } - else - { - begin = end = 0; - for(i=0; iParameter(name,pcolor); - } - else if(!strcasecmp(type,"Standard_Real")) - { - material->Parameter(name,Atof(value1)); - } - else if(!strcasecmp(type,"Standard_CString")) - { - material->Parameter(name,value1); - } - } - } - file.close(); -} - -//======================================================================= -//function : Material -//purpose : -//======================================================================= - -Handle(Materials_Material) Materials_MaterialsDictionary::Material - (const Standard_CString amaterial) const -{ - Handle(Materials_Material) material; - - for(Standard_Integer index=1;index<=thematerialssequence->Length();index++) - { - material = thematerialssequence->Value(index); - if(material->Name() == amaterial) return material; - } - Standard_NoSuchObject::Raise("Material not in the dictionary"); -// Pour compil sur NT .... - return material; -} - -Standard_Boolean Materials_MaterialsDictionary::ExistMaterial(const Standard_CString amaterial) const -{ - Handle(Materials_Material) material; - - for(Standard_Integer index=1;index<=thematerialssequence->Length();index++) - { - material = thematerialssequence->Value(index); - if(material->Name() == amaterial) return Standard_True; - } - return Standard_False; -} - -//======================================================================= -//function : NumberOfMaterials -//purpose : -//======================================================================= - -Standard_Integer Materials_MaterialsDictionary::NumberOfMaterials() const -{ - return thematerialssequence->Length(); -} - -//======================================================================= -//function : Material -//purpose : -//======================================================================= - -Handle(Materials_Material) Materials_MaterialsDictionary::Material - (const Standard_Integer anindex) const -{ - return thematerialssequence->Value(anindex); -} - -//======================================================================= -//function : UpToDate -//purpose : -//======================================================================= - -Standard_Boolean Materials_MaterialsDictionary::UpToDate() const -{ - struct stat buf; - - TCollection_AsciiString string = thefilename->String(); - if(!stat(string.ToCString(),&buf)) - { - if(thetime == buf.st_ctime) return Standard_True; - } - - return Standard_False; -} - -//======================================================================= -//function : Dump -//purpose : -//======================================================================= - -void Materials_MaterialsDictionary::Dump(Standard_OStream& astream) const -{ - Standard_Integer index; - Handle(Materials_Material) material; - - for(index=1;index<=thematerialssequence->Length();index++) - { - material = thematerialssequence->Value(index); - material->Dump(astream); - } -} - diff --git a/src/OS/FoundationClasses.tcl b/src/OS/FoundationClasses.tcl index 17aa2577f2..a80d364c51 100644 --- a/src/OS/FoundationClasses.tcl +++ b/src/OS/FoundationClasses.tcl @@ -15,7 +15,7 @@ ;# Liste des toolkits WOK sous forme de full path ;# proc FoundationClasses:toolkits { } { - return [list TKernel TKMath TKAdvTools] + return [list TKernel TKMath] } ;# ;# Autres UDs a prendre. diff --git a/src/TKAdvTools/EXTERNLIB b/src/TKAdvTools/EXTERNLIB deleted file mode 100644 index 58c24f0d95..0000000000 --- a/src/TKAdvTools/EXTERNLIB +++ /dev/null @@ -1 +0,0 @@ -TKernel diff --git a/src/TKAdvTools/FILES b/src/TKAdvTools/FILES deleted file mode 100755 index c999897bf1..0000000000 --- a/src/TKAdvTools/FILES +++ /dev/null @@ -1,2 +0,0 @@ -PACKAGES -EXTERNLIB diff --git a/src/TKAdvTools/PACKAGES b/src/TKAdvTools/PACKAGES deleted file mode 100755 index d1c42c2fc1..0000000000 --- a/src/TKAdvTools/PACKAGES +++ /dev/null @@ -1,6 +0,0 @@ -Dynamic -Materials -Expr -ExprIntrp -GraphDS -GraphTools diff --git a/src/TKMath/PACKAGES b/src/TKMath/PACKAGES index b2ab173f7b..45bdceabb5 100755 --- a/src/TKMath/PACKAGES +++ b/src/TKMath/PACKAGES @@ -14,3 +14,5 @@ BVH gp TColgp TopLoc +Expr +ExprIntrp diff --git a/src/TKQADraw/EXTERNLIB b/src/TKQADraw/EXTERNLIB index bcc87e134f..064a33ea09 100755 --- a/src/TKQADraw/EXTERNLIB +++ b/src/TKQADraw/EXTERNLIB @@ -32,7 +32,6 @@ TKSTEP TKXDESTEP TKXSDRAW TKSTL -TKAdvTools TKVoxel TKShapeSchema TKPShape