0022627: Change OCCT memory management defaults
[occt.git] / src / HatchGen / HatchGen_Domain.cxx
CommitLineData
7fd59977 1// File: HatchGen_Domain.cxx
2// Created: Wed Nov 10 15:33:27 1993
3// Author: Jean Marc LACHAUME
4// <jml@sdsun1>
5
6#include <Standard_Stream.hxx>
7#include <HatchGen_Domain.ixx>
8
9//=======================================================================
10// Function : HatchGen_Domain
11// Purpose : Constructor.
12//=======================================================================
13
14HatchGen_Domain::HatchGen_Domain () :
15 myHasFirstPoint (Standard_False) ,
16 myHasSecondPoint (Standard_False)
17{
18}
19
20//=======================================================================
21// Function : HatchGen_Domain
22// Purpose : Constructor.
23//=======================================================================
24
25HatchGen_Domain::HatchGen_Domain (const HatchGen_PointOnHatching& P1,
26 const HatchGen_PointOnHatching& P2) :
27 myHasFirstPoint (Standard_True) ,
28 myFirstPoint (P1),
29 myHasSecondPoint (Standard_True) ,
30 mySecondPoint (P2)
31{
32}
33
34//=======================================================================
35// Function : HatchGen_Domain
36// Purpose : Constructor.
37//=======================================================================
38
39HatchGen_Domain::HatchGen_Domain (const HatchGen_PointOnHatching& P,
40 const Standard_Boolean First)
41{
42 if (First) {
43 myHasFirstPoint = Standard_True ;
44 myHasSecondPoint = Standard_False ;
45 myFirstPoint = P ;
46 } else {
47 myHasFirstPoint = Standard_False ;
48 myHasSecondPoint = Standard_True ;
49 mySecondPoint = P ;
50 }
51}
52
53
54//=======================================================================
55// Function : Dump
56// Purpose : Dump of the domain.
57//=======================================================================
58
59void HatchGen_Domain::Dump (const Standard_Integer Index) const
60{
61 cout << "=== Domain " ;
62 if (Index > 0) {
63 cout << "# " << setw(3) << Index << " " ;
64 } else {
65 cout << "======" ;
66 }
67 cout << "=============================" << endl ;
68
69 if (myHasFirstPoint) {
70 myFirstPoint.Dump (1) ;
71 } else {
72 cout << " Has not a first point" << endl ;
73 }
74
75 if (myHasSecondPoint) {
76 mySecondPoint.Dump (2) ;
77 } else {
78 cout << " Has not a second point" << endl ;
79 }
80
81 cout << "==============================================" << endl ;
82}