File: upgrade_sample_orig.dat

package info (click to toggle)
opencascade 7.8.1%2Bdfsg1-3
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 293,924 kB
  • sloc: cpp: 1,249,635; tcl: 15,974; cs: 5,173; java: 1,554; sh: 1,354; ansic: 821; xml: 737; makefile: 26; javascript: 22
file content (67 lines) | stat: -rw-r--r-- 1,848 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
// This is sample C++ file intended for testing and verifyig automatic upgrade 
// script. Copy it with extension .cxx and apply upgrade procedure to see
// the result, as follows:
// > upgrade.bat -src=./adm -inc=./src -recurse -all

// Include of Geom_Line.hxx and Geom_Plane.hxx should be added below
#include <gp.hxx>

//========================================================================
// OCCT 7.0
//========================================================================

//------------------------------------------------------------------------
// Option -rtti
//------------------------------------------------------------------------

// Should be replaced by <Standard_Type.hxx>
#include <Standard_DefineHandle.hxx>

class A_0
{
}

class B_1 : 
public A_0
{
  // second argument "A_0" should be added
  DEFINE_STANDARD_RTTI(B_1)
};

class C_2 : public Standard_Transient, B_1
{
  // second argument "Standard_Transient" should be added
  DEFINE_STANDARD_RTTI(C_2)
};

void for_rtti ()
{
  Handle(Geom_Curve) aCurve = new Geom_Line (gp::Origin(), gp::DZ());
  Handle(Geom_Line) aLine = Handle(Geom_Line)::DownCast (aCurve);
}

// should be removed
IMPLEMENT_DOWNCAST(A)
IMPLEMENT_STANDARD_RTTIEXT(A, B)

//------------------------------------------------------------------------
// Option -fwd
//------------------------------------------------------------------------

// force safe mode used for Qt objects
Q_OBJECT
slots:

// these includes should be recognized as corresponding to forward declarations 
#include <occt/TColStd_HArray1OfReal.hxx>

// these declarations should be just removed
class Handle(TColStd_HArray1OfReal);

// should be replaced by include of corresponding header
class TColStd_Array1OfReal;
class Handle(Geom_Curve);

// check that trailing spaces at the following line are preserved
void ff();