0029589: Configuration - allow MFC samples to be built when OCCT is linked statically
[occt.git] / adm / upgrade_sample_orig.dat
CommitLineData
f5f4ebd0 1// This is sample C++ file intended for testing and verifyig automatic upgrade
2// script. Copy it with extension .cxx and apply upgrade procedure to see
3// the result, as follows:
4// > upgrade.bat -src=./adm -inc=./src -recurse -all
5
6// Include of Geom_Line.hxx and Geom_Plane.hxx should be added below
7#include <gp.hxx>
8
9//========================================================================
10// OCCT 7.0
11//========================================================================
12
13//------------------------------------------------------------------------
14// Option -rtti
15//------------------------------------------------------------------------
16
17// Should be replaced by <Standard_Type.hxx>
18#include <Standard_DefineHandle.hxx>
19
20class A_0
21{
22}
23
24class B_1 :
25public A_0
26{
27 // second argument "A_0" should be added
28 DEFINE_STANDARD_RTTI(B_1)
29};
30
31class C_2 : public Standard_Transient, B_1
32{
33 // second argument "Standard_Transient" should be added
34 DEFINE_STANDARD_RTTI(C_2)
35};
36
37void for_rtti ()
38{
39 Handle(Geom_Curve) aCurve = new Geom_Line (gp::Origin(), gp::DZ());
40 Handle(Geom_Line) aLine = Handle(Geom_Line)::DownCast (aCurve);
41}
42
43// should be removed
44IMPLEMENT_DOWNCAST(A)
45IMPLEMENT_STANDARD_RTTIEXT(A, B)
46
47//------------------------------------------------------------------------
48// Option -fwd
49//------------------------------------------------------------------------
50
51// force safe mode used for Qt objects
52Q_OBJECT
53slots:
54
55// these includes should be recognized as corresponding to forward declarations
56#include <occt/TColStd_HArray1OfReal.hxx>
57
58// these declarations should be just removed
59class Handle(TColStd_HArray1OfReal);
60
61// should be replaced by include of corresponding header
62class TColStd_Array1OfReal;
63class Handle(Geom_Curve);
64
65// check that trailing spaces at the following line are preserved
66void ff();
67