b311480e |
1 | // Created on: 1993-03-03 |
2 | // Created by: Remi LEQUETTE |
3 | // Copyright (c) 1993-1999 Matra Datavision |
4 | // Copyright (c) 1999-2012 OPEN CASCADE SAS |
5 | // |
6 | // The content of this file is subject to the Open CASCADE Technology Public |
7 | // License Version 6.5 (the "License"). You may not use the content of this file |
8 | // except in compliance with the License. Please obtain a copy of the License |
9 | // at http://www.opencascade.org and read it completely before using this file. |
10 | // |
11 | // The Initial Developer of the Original Code is Open CASCADE S.A.S., having its |
12 | // main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France. |
13 | // |
14 | // The Original Code and all software distributed under the License is |
15 | // distributed on an "AS IS" basis, without warranty of any kind, and the |
16 | // Initial Developer hereby disclaims all such warranties, including without |
17 | // limitation, any warranties of merchantability, fitness for a particular |
18 | // purpose or non-infringement. Please see the License for the specific terms |
19 | // and conditions governing the rights and limitations under the License. |
20 | |
7fd59977 |
21 | |
22 | |
23 | #include <PTopLoc_Location.ixx> |
24 | #include <Standard_NoSuchObject.hxx> |
25 | |
26 | //======================================================================= |
27 | //function : PTopLoc_Location |
28 | //purpose : |
29 | //======================================================================= |
30 | |
31 | PTopLoc_Location::PTopLoc_Location() |
32 | { |
33 | } |
34 | |
35 | |
36 | //======================================================================= |
37 | //function : PTopLoc_Location |
38 | //purpose : |
39 | //======================================================================= |
40 | |
41 | PTopLoc_Location::PTopLoc_Location(const Handle(PTopLoc_Datum3D)& D, |
42 | const Standard_Integer P, |
43 | const PTopLoc_Location& N) |
44 | { |
45 | myData = new PTopLoc_ItemLocation(D,P,N); |
46 | } |
47 | |
48 | |
49 | //======================================================================= |
50 | //function : IsIdentity |
51 | //purpose : |
52 | //======================================================================= |
53 | |
54 | Standard_Boolean PTopLoc_Location::IsIdentity() const |
55 | { |
56 | return myData.IsNull(); |
57 | } |
58 | |
59 | //======================================================================= |
60 | //function : Datum3D |
61 | //purpose : |
62 | //======================================================================= |
63 | |
64 | Handle(PTopLoc_Datum3D) PTopLoc_Location::Datum3D()const |
65 | { |
66 | Standard_NoSuchObject_Raise_if(IsIdentity(),"PTopLoc_Location::Datum3D"); |
67 | return myData->Datum3D(); |
68 | } |
69 | |
70 | |
71 | //======================================================================= |
72 | //function : Power |
73 | //purpose : |
74 | //======================================================================= |
75 | |
76 | Standard_Integer PTopLoc_Location::Power()const |
77 | { |
78 | Standard_NoSuchObject_Raise_if(IsIdentity(),"PTopLoc_Location::Power"); |
79 | return myData->Power(); |
80 | } |
81 | |
82 | |
83 | //======================================================================= |
84 | //function : PTopLoc_Location |
85 | //purpose : |
86 | //======================================================================= |
87 | |
88 | PTopLoc_Location PTopLoc_Location::Next() const |
89 | { |
90 | Standard_NoSuchObject_Raise_if(IsIdentity(),"PTopLoc_Location::Next"); |
91 | return myData->Next(); |
92 | } |
93 | |
94 | |
95 | |