blob: 2bb8637e206659ec42bdc4c319d74e1c4702d041 (
plain)
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
|
// File: TopLoc_ItemLocation.cxx
// Created: Mon Jan 21 15:24:04 1991
// Author: Christophe MARION
// <cma@topsn3>
#include <TopLoc_ItemLocation.ixx>
//=======================================================================
//function : TopLoc_ItemLocation
//purpose : constructor
//=======================================================================
TopLoc_ItemLocation::TopLoc_ItemLocation
(const Handle(TopLoc_Datum3D)& D,
const Standard_Integer P,
// const Standard_Boolean fromtrsf) :
const Standard_Boolean ) :
myDatum(D),
myPower(P),
myTrsf(NULL)
{
}
TopLoc_ItemLocation::TopLoc_ItemLocation(const TopLoc_ItemLocation& anOther): myTrsf(NULL)
{
if (anOther.myTrsf != NULL) {
myTrsf = new gp_Trsf;
*myTrsf = *(anOther.myTrsf);
}
myDatum = anOther.myDatum;
myPower = anOther.myPower;
}
TopLoc_ItemLocation& TopLoc_ItemLocation::Assign(const TopLoc_ItemLocation& anOther)
{
if (anOther.myTrsf == NULL) {
if (myTrsf != NULL) delete myTrsf;
myTrsf = NULL;
}
else if (myTrsf != anOther.myTrsf) {
if (myTrsf == NULL) myTrsf = new gp_Trsf;
*myTrsf = *(anOther.myTrsf);
}
myDatum = anOther.myDatum;
myPower = anOther.myPower;
return *this;
}
void TopLoc_ItemLocation::Destroy()
{
if (myTrsf != NULL) delete myTrsf;
myTrsf = NULL;
}
|