1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-04 13:13:25 +03:00

0024002: Overall code and build procedure refactoring -- automatic

Automatic upgrade of OCCT code by command "occt_upgrade . -nocdl":
- WOK-generated header files from inc and sources from drv are moved to src
- CDL files removed
- All packages are converted to nocdlpack
This commit is contained in:
abv
2015-07-12 07:42:38 +03:00
parent 543a996496
commit 42cf5bc1ca
15354 changed files with 623957 additions and 509844 deletions

View File

@@ -1,79 +0,0 @@
-- Created on: 1997-03-27
-- Created by: Denis PASCAL
-- Copyright (c) 1997-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 DDataStd
---Purpose: commands for Standard Attributes.
-- =================================
uses Draw,
TDF,
TDataStd,
TDataXtd,
TopoDS,
MMgt,
Standard,
TNaming,
TCollection
is
class DrawPresentation;
class DrawDriver;
class TreeBrowser;
---Purpose: Used to browse tree nodes.
---Purpose: commands
-- ========
AllCommands (I : in out Interpretor from Draw);
---Purpose: command to set and get modeling attributes
NamedShapeCommands (I : in out Interpretor from Draw);
---Purpose: to set and get NamedShape
BasicCommands (I : in out Interpretor from Draw);
---Purpose: to set and get Integer, Real, Reference, Geometry
DatumCommands (I : in out Interpretor from Draw);
---Purpose: to set and get Datum attributes
ConstraintCommands (I : in out Interpretor from Draw);
---Purpose: to set and get Constraint and Constraint attributes
ObjectCommands (I : in out Interpretor from Draw);
---Purpose: to set and get Objects attributes
DrawDisplayCommands (I : in out Interpretor from Draw);
---Purpose: to display standard attributes
NameCommands (I: in out Interpretor from Draw);
---Purpose: to set and get Name attribute
TreeCommands (I: in out Interpretor from Draw);
---Purpose: to build, edit and browse an explicit tree of labels
---Purpose: package methods
-- ===============
DumpConstraint (C : Constraint from TDataXtd; S : in out OStream);
end DDataStd;

View File

@@ -14,21 +14,22 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <DDataStd.ixx>
#include <DDataStd.hxx>
#include <TCollection_AsciiString.hxx>
#include <TDataStd.hxx>
#include <TDataStd_Real.hxx>
#include <TDataStd_RealEnum.hxx>
#include <TDataXtd.hxx>
#include <TDataXtd_Constraint.hxx>
#include <TDF_Label.hxx>
#include <TDF_Tool.hxx>
#include <TDataStd.hxx>
#include <TDataXtd.hxx>
#include <TDataStd_RealEnum.hxx>
#include <TDataStd_Real.hxx>
#include <TNaming_NamedShape.hxx>
//=======================================================================
//function : AllCommands
//purpose :
//=======================================================================
void DDataStd::AllCommands (Draw_Interpretor& theCommands)
{
NamedShapeCommands (theCommands);

101
src/DDataStd/DDataStd.hxx Normal file
View File

@@ -0,0 +1,101 @@
// Created on: 1997-03-27
// Created by: Denis PASCAL
// Copyright (c) 1997-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _DDataStd_HeaderFile
#define _DDataStd_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Draw_Interpretor.hxx>
#include <Standard_OStream.hxx>
class TDataXtd_Constraint;
class DDataStd_DrawPresentation;
class DDataStd_DrawDriver;
class DDataStd_TreeBrowser;
//! commands for Standard Attributes.
//! =================================
class DDataStd
{
public:
DEFINE_STANDARD_ALLOC
//! Used to browse tree nodes.
//! commands
//! ========
//! command to set and get modeling attributes
Standard_EXPORT static void AllCommands (Draw_Interpretor& I);
//! to set and get NamedShape
Standard_EXPORT static void NamedShapeCommands (Draw_Interpretor& I);
//! to set and get Integer, Real, Reference, Geometry
Standard_EXPORT static void BasicCommands (Draw_Interpretor& I);
//! to set and get Datum attributes
Standard_EXPORT static void DatumCommands (Draw_Interpretor& I);
//! to set and get Constraint and Constraint attributes
Standard_EXPORT static void ConstraintCommands (Draw_Interpretor& I);
//! to set and get Objects attributes
Standard_EXPORT static void ObjectCommands (Draw_Interpretor& I);
//! to display standard attributes
Standard_EXPORT static void DrawDisplayCommands (Draw_Interpretor& I);
//! to set and get Name attribute
Standard_EXPORT static void NameCommands (Draw_Interpretor& I);
//! to build, edit and browse an explicit tree of labels
//! package methods
//! ===============
Standard_EXPORT static void TreeCommands (Draw_Interpretor& I);
Standard_EXPORT static void DumpConstraint (const Handle(TDataXtd_Constraint)& C, Standard_OStream& S);
protected:
private:
friend class DDataStd_DrawPresentation;
friend class DDataStd_DrawDriver;
friend class DDataStd_TreeBrowser;
};
#endif // _DDataStd_HeaderFile

View File

@@ -1,91 +0,0 @@
-- Created on: 1998-09-07
-- Created by: Denis PASCAL
-- Copyright (c) 1998-1999 Matra Datavision
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
class DrawDriver from DDataStd inherits TShared from MMgt
---Purpose: Root class of drivers to build draw variables from TDF_Label.
-- Priority rule to display standard attributes is :
-- * 1 Constraint
-- * 2 Object
-- * 3 Datum (Point,Axis,Plane)
-- * 4 Geometry
-- * 5 NamedShape
uses ColorKind from Draw,
Drawable3D from Draw,
Label from TDF,
Attribute from TDF,
Integer from TDataStd,
Real from TDataStd,
Point from TDataXtd,
Axis from TDataXtd,
Plane from TDataXtd,
Geometry from TDataXtd,
Constraint from TDataXtd,
NamedShape from TNaming,
Shape from TopoDS
is
---Purpose: access to the current DrawDriver
-- ================================
Set (myclass; DD : DrawDriver from DDataStd);
Get (myclass)
returns DrawDriver from DDataStd;
Create
returns DrawDriver from DDataStd;
---Purpose: next method is called by DrawPresentation (may be redefined)
-- ============================================================
Drawable (me; L : Label from TDF)
returns Drawable3D from Draw
is virtual;
---Purpose: reusable methods (may used when redefined <Drawable>)
-- =====================================================
DrawableConstraint (me; C : Constraint from TDataXtd)
returns Drawable3D from Draw;
DrawableShape (me; L : Label from TDF;
color : ColorKind from Draw;
current : Boolean from Standard = Standard_True)
returns Drawable3D from Draw;
DrawableShape (myclass; s : Shape from TopoDS;
color : ColorKind from Draw)
---Purpose: May be used for temporary display of a shape
returns Drawable3D from Draw;
end DrawDriver;

View File

@@ -14,56 +14,54 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <DDataStd_DrawDriver.ixx>
#include <Draw.hxx>
#include <Draw_Drawable3D.hxx>
#include <DDataStd.hxx>
#include <TDF_Label.hxx>
#include <TDF_Tool.hxx>
#include <TNaming_Tool.hxx>
#include <TopoDS.hxx>
#include <DBRep.hxx>
#include <Draw_Appli.hxx>
#include <TNaming_Tool.hxx>
#include <TDataStd_Integer.hxx>
#include <TDataStd_Real.hxx>
#include <BRep_Builder.hxx>
#include <BRep_Tool.hxx>
#include <DBRep.hxx>
#include <DBRep_DrawableShape.hxx>
#include <DDataStd.hxx>
#include <DDataStd_DrawDriver.hxx>
#include <Draw.hxx>
#include <Draw_Appli.hxx>
#include <Draw_Axis3D.hxx>
#include <Draw_Drawable3D.hxx>
#include <Draw_Marker3D.hxx>
#include <TCollection_AsciiString.hxx>
#include <Geom_CartesianPoint.hxx>
#include <BRep_Builder.hxx>
#include <TopoDS_Compound.hxx>
#include <TDF_Tool.hxx>
#include <TCollection_AsciiString.hxx>
#include <TDataStd.hxx>
#include <gp_Pln.hxx>
#include <gp_Ax3.hxx>
#include <Geom_Plane.hxx>
// attribut affichable
#include <TNaming_NamedShape.hxx>
#include <TDataStd.hxx>
#include <TDataXtd_GeometryEnum.hxx>
#include <TDataXtd_Point.hxx>
#include <TDataXtd_Axis.hxx>
#include <TDataXtd_Plane.hxx>
#include <TDataXtd_Geometry.hxx>
#include <TDF_ChildIterator.hxx>
#include <TDF_LabelList.hxx>
#include <TDF_ListIteratorOfLabelList.hxx>
// drawable object
#include <DrawTrSurf_Surface.hxx>
#include <Draw_Axis3D.hxx>
#include <DrawDim_Distance.hxx>
#include <DrawDim_Radius.hxx>
#include <DrawDim_Angle.hxx>
#include <DrawDim_PlanarDistance.hxx>
#include <DrawDim_PlanarRadius.hxx>
#include <DrawDim_Distance.hxx>
#include <DrawDim_PlanarAngle.hxx>
#include <DrawDim_PlanarDiameter.hxx>
#include <DBRep_DrawableShape.hxx>
#include <DrawDim_PlanarDistance.hxx>
#include <DrawDim_PlanarRadius.hxx>
#include <DrawDim_Radius.hxx>
#include <DrawTrSurf_Surface.hxx>
#include <Geom_CartesianPoint.hxx>
#include <Geom_Plane.hxx>
#include <gp_Ax3.hxx>
#include <gp_Pln.hxx>
#include <Standard_Type.hxx>
#include <TCollection_AsciiString.hxx>
#include <TDataStd.hxx>
#include <TDataStd_Integer.hxx>
#include <TDataStd_Real.hxx>
#include <TDataXtd_Axis.hxx>
#include <TDataXtd_Constraint.hxx>
#include <TDataXtd_Geometry.hxx>
#include <TDataXtd_GeometryEnum.hxx>
#include <TDataXtd_Plane.hxx>
#include <TDataXtd_Point.hxx>
#include <TDF_ChildIterator.hxx>
#include <TDF_Label.hxx>
#include <TDF_LabelList.hxx>
#include <TDF_ListIteratorOfLabelList.hxx>
#include <TDF_Tool.hxx>
#include <TNaming_NamedShape.hxx>
#include <TNaming_Tool.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Compound.hxx>
#include <TopoDS_Shape.hxx>
// attribut affichable
// drawable object
static Standard_Integer DISCRET = 100;
static Standard_Integer NBISOS = 10;
static Standard_Real THESIZE = 1000.;

View File

@@ -0,0 +1,92 @@
// Created on: 1998-09-07
// Created by: Denis PASCAL
// Copyright (c) 1998-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _DDataStd_DrawDriver_HeaderFile
#define _DDataStd_DrawDriver_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <MMgt_TShared.hxx>
#include <Draw_ColorKind.hxx>
#include <Standard_Boolean.hxx>
class Draw_Drawable3D;
class TDF_Label;
class TDataXtd_Constraint;
class TopoDS_Shape;
class DDataStd_DrawDriver;
DEFINE_STANDARD_HANDLE(DDataStd_DrawDriver, MMgt_TShared)
//! Root class of drivers to build draw variables from TDF_Label.
//! Priority rule to display standard attributes is :
//! * 1 Constraint
//! * 2 Object
//! * 3 Datum (Point,Axis,Plane)
//! * 4 Geometry
//! * 5 NamedShape
class DDataStd_DrawDriver : public MMgt_TShared
{
public:
//! access to the current DrawDriver
//! ================================
Standard_EXPORT static void Set (const Handle(DDataStd_DrawDriver)& DD);
Standard_EXPORT static Handle(DDataStd_DrawDriver) Get();
//! next method is called by DrawPresentation (may be redefined)
//! ============================================================
Standard_EXPORT DDataStd_DrawDriver();
//! reusable methods (may used when redefined <Drawable>)
//! =====================================================
Standard_EXPORT virtual Handle(Draw_Drawable3D) Drawable (const TDF_Label& L) const;
Standard_EXPORT Handle(Draw_Drawable3D) DrawableConstraint (const Handle(TDataXtd_Constraint)& C) const;
Standard_EXPORT Handle(Draw_Drawable3D) DrawableShape (const TDF_Label& L, const Draw_ColorKind color, const Standard_Boolean current = Standard_True) const;
//! May be used for temporary display of a shape
Standard_EXPORT static Handle(Draw_Drawable3D) DrawableShape (const TopoDS_Shape& s, const Draw_ColorKind color);
DEFINE_STANDARD_RTTI(DDataStd_DrawDriver,MMgt_TShared)
protected:
private:
};
#endif // _DDataStd_DrawDriver_HeaderFile

View File

@@ -1,126 +0,0 @@
-- Created on: 1998-09-23
-- Created by: Denis PASCAL
-- Copyright (c) 1998-1999 Matra Datavision
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
class DrawPresentation from DDataStd inherits Attribute from TDF
---Purpose: draw presentaion of a label of a document
uses GUID from Standard,
AttributeIndexedMap from TDF,
DataSet from TDF,
AttributeDelta from TDF,
Label from TDF,
RelocationTable from TDF,
Drawable3D from Draw
is
---Purpose: api methods on draw presentation
-- ================================
HasPresentation (myclass; L : Label from TDF)
returns Boolean from Standard;
IsDisplayed (myclass; L : Label from TDF)
returns Boolean from Standard;
Display (myclass; L : Label from TDF);
-- display <L> presentation in draw viewer.
Erase (myclass; L : Label from TDF);
-- erase <L> in draw viewer
Update (myclass; L : Label from TDF);
-- recompute and display L in draw viewer
---Purpose: attribute implementation
-- ========================
GetID(myclass) returns GUID from Standard;
---C++: return const &
Create returns DrawPresentation from DDataStd;
SetDisplayed (me : mutable; status : Boolean from Standard);
IsDisplayed (me)
returns Boolean from Standard;
SetDrawable (me : mutable; D : Drawable3D from Draw);
GetDrawable (me)
returns Drawable3D from Draw;
ID(me)returns GUID from Standard;
---C++: return const &
NewEmpty(me)
returns Attribute from TDF;
Restore(me: mutable; with : Attribute from TDF);
Paste (me; into : Attribute from TDF;
RT : RelocationTable from TDF);
---Purpose: call backs for viewer updating
-- ==============================
AfterAddition (me: mutable)
is redefined;
BeforeRemoval (me: mutable)
is redefined;
BeforeForget(me: mutable)
is redefined;
AfterResume(me: mutable)
is redefined;
BeforeUndo (me: mutable; anAttDelta : AttributeDelta from TDF;
forceIt : Boolean from Standard = Standard_False)
returns Boolean from Standard
is redefined;
AfterUndo (me: mutable; anAttDelta : AttributeDelta from TDF;
forceIt : Boolean from Standard = Standard_False)
---Purpose: update draw viewer according to delta
returns Boolean from Standard
is redefined;
---Purpose: private methods
-- ===============
DrawBuild (me : mutable)
is private;
DrawDisplay (myclass; L : Label from TDF; P : DrawPresentation from DDataStd)
is private;
DrawErase (myclass; L : Label from TDF; P : DrawPresentation from DDataStd)
is private;
fields
isDisplayed : Boolean from Standard;
myDrawable : Drawable3D from Draw;
end DrawPresentation;

View File

@@ -14,15 +14,22 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <DDataStd_DrawPresentation.ixx>
#include <Draw_Drawable3D.hxx>
#include <DDataStd_DrawDriver.hxx>
#include <DDataStd_DrawPresentation.hxx>
#include <Draw.hxx>
#include <Draw_Drawable3D.hxx>
#include <Draw_Viewer.hxx>
#include <Standard_GUID.hxx>
#include <Standard_Type.hxx>
#include <TDF_Attribute.hxx>
#include <TDF_AttributeDelta.hxx>
#include <TDF_DefaultDeltaOnModification.hxx>
#include <TDF_DefaultDeltaOnRemoval.hxx>
#include <TDF_DeltaOnAddition.hxx>
#include <TDF_Label.hxx>
#include <TDF_RelocationTable.hxx>
#include <TDF_Tool.hxx>
#include <DDataStd_DrawDriver.hxx>
#ifndef WNT
extern Draw_Viewer dout;

View File

@@ -0,0 +1,125 @@
// Created on: 1998-09-23
// Created by: Denis PASCAL
// Copyright (c) 1998-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _DDataStd_DrawPresentation_HeaderFile
#define _DDataStd_DrawPresentation_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <Standard_Boolean.hxx>
#include <TDF_Attribute.hxx>
class Draw_Drawable3D;
class TDF_Label;
class Standard_GUID;
class TDF_Attribute;
class TDF_RelocationTable;
class TDF_AttributeDelta;
class DDataStd_DrawPresentation;
DEFINE_STANDARD_HANDLE(DDataStd_DrawPresentation, TDF_Attribute)
//! draw presentaion of a label of a document
class DDataStd_DrawPresentation : public TDF_Attribute
{
public:
//! api methods on draw presentation
//! ================================
Standard_EXPORT static Standard_Boolean HasPresentation (const TDF_Label& L);
Standard_EXPORT static Standard_Boolean IsDisplayed (const TDF_Label& L);
Standard_EXPORT static void Display (const TDF_Label& L);
Standard_EXPORT static void Erase (const TDF_Label& L);
//! attribute implementation
//! ========================
Standard_EXPORT static void Update (const TDF_Label& L);
Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT DDataStd_DrawPresentation();
Standard_EXPORT void SetDisplayed (const Standard_Boolean status);
Standard_EXPORT Standard_Boolean IsDisplayed() const;
Standard_EXPORT void SetDrawable (const Handle(Draw_Drawable3D)& D);
Standard_EXPORT Handle(Draw_Drawable3D) GetDrawable() const;
Standard_EXPORT const Standard_GUID& ID() const;
Standard_EXPORT Handle(TDF_Attribute) NewEmpty() const;
Standard_EXPORT void Restore (const Handle(TDF_Attribute)& with);
//! call backs for viewer updating
//! ==============================
Standard_EXPORT void Paste (const Handle(TDF_Attribute)& into, const Handle(TDF_RelocationTable)& RT) const;
Standard_EXPORT virtual void AfterAddition() Standard_OVERRIDE;
Standard_EXPORT virtual void BeforeRemoval() Standard_OVERRIDE;
Standard_EXPORT virtual void BeforeForget() Standard_OVERRIDE;
Standard_EXPORT virtual void AfterResume() Standard_OVERRIDE;
Standard_EXPORT virtual Standard_Boolean BeforeUndo (const Handle(TDF_AttributeDelta)& anAttDelta, const Standard_Boolean forceIt = Standard_False) Standard_OVERRIDE;
//! update draw viewer according to delta
//! private methods
//! ===============
Standard_EXPORT virtual Standard_Boolean AfterUndo (const Handle(TDF_AttributeDelta)& anAttDelta, const Standard_Boolean forceIt = Standard_False) Standard_OVERRIDE;
DEFINE_STANDARD_RTTI(DDataStd_DrawPresentation,TDF_Attribute)
protected:
private:
Standard_EXPORT void DrawBuild();
Standard_EXPORT static void DrawDisplay (const TDF_Label& L, const Handle(DDataStd_DrawPresentation)& P);
Standard_EXPORT static void DrawErase (const TDF_Label& L, const Handle(DDataStd_DrawPresentation)& P);
Standard_Boolean isDisplayed;
Handle(Draw_Drawable3D) myDrawable;
};
#endif // _DDataStd_DrawPresentation_HeaderFile

View File

@@ -1,80 +0,0 @@
-- Created by: DAUTRY Philippe
-- Copyright (c) 1997-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.
-- --------------------
---Version: 0.0
--Version Date Purpose
-- 0.0 Nov 27 1997 Creation
class TreeBrowser from DDataStd inherits Drawable3D from Draw
---Purpose: Browses a TreeNode from TDataStd.
-- =================================
uses
Label from TDF,
TreeNode from TDataStd,
Interpretor from Draw,
Display from Draw,
AsciiString from TCollection
is
Create (root : Label from TDF)
returns TreeBrowser from DDataStd;
DrawOn (me; dis : in out Display);
Copy (me)
returns Drawable3D from Draw
is redefined;
Dump (me; S : in out OStream)
is redefined;
Whatis (me; I : in out Interpretor from Draw)
is redefined;
---Purpose: Specific methods
-- ================
Label (me : mutable; root : Label from TDF);
Label (me)
returns Label from TDF;
OpenRoot (me)
---Purpose: Returns a string composed with the TreeNode of
-- <myLabel>.
returns AsciiString from TCollection;
OpenNode (me; L : Label from TDF)
---Purpose: Returns a string composed with the sub-TreeNodes of
-- <L>
returns AsciiString from TCollection;
OpenNode (me; aTreeNode : TreeNode from TDataStd;
aList : in out AsciiString from TCollection)
---Purpose: Returns a string composed with the sub-TreeNodes
-- of <aTreeNode>. Used to implement other methods.
is private;
fields
myRoot : Label from TDF;
end TreeBrowser;

View File

@@ -14,29 +14,28 @@
// commercial license or contractual agreement.
// --------------------
// Version: 0.0
//Version Date Purpose
// 0.0 Nov 27 1997 Creation
#include <DDataStd_TreeBrowser.ixx>
#include <DDataStd.hxx>
#include <TDF_Tool.hxx>
#include <TDataStd_Name.hxx>
#include <TDataStd_TreeNode.hxx>
#include <DDataStd_TreeBrowser.hxx>
#include <Draw_Display.hxx>
#include <Draw_Drawable3D.hxx>
#include <Standard_Type.hxx>
#include <TCollection_AsciiString.hxx>
#include <TCollection_ExtendedString.hxx>
#include <TCollection_ExtendedString.hxx>
#include <TDataStd_Name.hxx>
#include <TDataStd_TreeNode.hxx>
#include <TDF.hxx>
#include <TDF_Label.hxx>
#include <TDF_Tool.hxx>
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// Communication convention with tcl:
// tcl waits for a string of characters, being an information list.
// In this list, each item is separated from another by a separator: '\'.
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#define TDF_BrowserSeparator1 '\\'
#define TDF_BrowserSeparator2 ' '
#define TDF_BrowserSeparator3 '#'

View File

@@ -0,0 +1,96 @@
// Created by: DAUTRY Philippe
// Copyright (c) 1997-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _DDataStd_TreeBrowser_HeaderFile
#define _DDataStd_TreeBrowser_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <TDF_Label.hxx>
#include <Draw_Drawable3D.hxx>
#include <Standard_OStream.hxx>
#include <Draw_Interpretor.hxx>
class TDF_Label;
class Draw_Display;
class Draw_Drawable3D;
class TCollection_AsciiString;
class TDataStd_TreeNode;
class DDataStd_TreeBrowser;
DEFINE_STANDARD_HANDLE(DDataStd_TreeBrowser, Draw_Drawable3D)
//! Browses a TreeNode from TDataStd.
//! =================================
class DDataStd_TreeBrowser : public Draw_Drawable3D
{
public:
Standard_EXPORT DDataStd_TreeBrowser(const TDF_Label& root);
Standard_EXPORT void DrawOn (Draw_Display& dis) const;
Standard_EXPORT virtual Handle(Draw_Drawable3D) Copy() const Standard_OVERRIDE;
Standard_EXPORT virtual void Dump (Standard_OStream& S) const Standard_OVERRIDE;
//! Specific methods
//! ================
Standard_EXPORT virtual void Whatis (Draw_Interpretor& I) const Standard_OVERRIDE;
Standard_EXPORT void Label (const TDF_Label& root);
Standard_EXPORT TDF_Label Label() const;
//! Returns a string composed with the TreeNode of
//! <myLabel>.
Standard_EXPORT TCollection_AsciiString OpenRoot() const;
//! Returns a string composed with the sub-TreeNodes of
//! <L>
Standard_EXPORT TCollection_AsciiString OpenNode (const TDF_Label& L) const;
DEFINE_STANDARD_RTTI(DDataStd_TreeBrowser,Draw_Drawable3D)
protected:
private:
//! Returns a string composed with the sub-TreeNodes
//! of <aTreeNode>. Used to implement other methods.
Standard_EXPORT void OpenNode (const Handle(TDataStd_TreeNode)& aTreeNode, TCollection_AsciiString& aList) const;
TDF_Label myRoot;
};
#endif // _DDataStd_TreeBrowser_HeaderFile

View File

@@ -14,35 +14,30 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <DDataStd.ixx>
#include <DDF.hxx>
#include <DDataStd.hxx>
#include <DDataStd_TreeBrowser.hxx>
#include <DDF.hxx>
#include <Draw.hxx>
#include <Draw_Appli.hxx>
#include <Draw_Drawable3D.hxx>
#include <Draw_Interpretor.hxx>
#include <TDF_Data.hxx>
#include <TDF.hxx>
#include <TDF_Tool.hxx>
#include <TDF_Label.hxx>
#include <DDataStd_TreeBrowser.hxx>
#include <TDataStd_TreeNode.hxx>
#include <TDataStd_ChildNodeIterator.hxx>
#include <Standard_GUID.hxx>
#include <TCollection_AsciiString.hxx>
#include <TCollection_ExtendedString.hxx>
#include <TDataStd_ChildNodeIterator.hxx>
#include <TDataStd_TreeNode.hxx>
#include <TDataXtd_Constraint.hxx>
#include <TDF.hxx>
#include <TDF_Data.hxx>
#include <TDF_Label.hxx>
#include <TDF_Tool.hxx>
#include <stdio.h>
//=======================================================================
//TreeNode : SetNode
//purpose : SetNode (DOC Entry [ID])
//=======================================================================
static Standard_Integer DDataStd_SetNode (Draw_Interpretor& di,
Standard_Integer n,
const char** a)

View File

@@ -1,11 +1,18 @@
EXTERNLIB
DDataStd.cxx
DDataStd.hxx
DDataStd_BasicCommands.cxx
DDataStd_ConstraintCommands.cxx
DDataStd_DatumCommands.cxx
DDataStd_DrawDisplayCommands.cxx
DDataStd_DrawDriver.cxx
DDataStd_DrawDriver.hxx
DDataStd_DrawPresentation.cxx
DDataStd_DrawPresentation.hxx
DDataStd_NameCommands.cxx
DDataStd_NamedShapeCommands.cxx
DDataStd_ObjectCommands.cxx
DDataStd_TreeBrowser.cxx
DDataStd_TreeBrowser.hxx
DDataStd_TreeBrowser.tcl
DDataStd_TreeCommands.cxx
DDataStd_NamedShapeCommands.cxx
DDataStd_BasicCommands.cxx
DDataStd_DatumCommands.cxx
DDataStd_ConstraintCommands.cxx
DDataStd_DrawDisplayCommands.cxx
DDataStd_ObjectCommands.cxx
DDataStd_NameCommands.cxx
EXTERNLIB