summaryrefslogtreecommitdiff
path: root/src/OSD/OSD_Printer.cxx
blob: a0f8041feb71c7c056a462bc19895b09f53ba8f0 (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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112

#ifndef WNT

#include <Standard_ConstructionError.hxx>
#include <OSD_Printer.ixx>
#include <OSD_WhoAmI.hxx>

//const OSD_WhoAmI Iam = OSD_WPrinter;

#include <errno.h>

// -------------------------------------------------------------
// -------------------------------------------------------------
OSD_Printer::OSD_Printer (const TCollection_AsciiString& Name){
 SetName(Name);
}


// -------------------------------------------------------------
// -------------------------------------------------------------
void OSD_Printer::SetName (const TCollection_AsciiString& Name){

 if (!Name.IsAscii())
  Standard_ConstructionError::Raise("OSD_Printer::SetName");

 myName = Name;
}


// -------------------------------------------------------------
// -------------------------------------------------------------
void OSD_Printer::Name (TCollection_AsciiString &Name)const{
 Name = myName;
}


// -------------------------------------------------------------
// -------------------------------------------------------------
void OSD_Printer::Reset(){
 myError.Reset();
}

// -------------------------------------------------------------
// -------------------------------------------------------------
Standard_Boolean OSD_Printer::Failed()const{
 return( myError.Failed());
}

// -------------------------------------------------------------
// -------------------------------------------------------------
void OSD_Printer::Perror() {
 myError.Perror();
}


// -------------------------------------------------------------
// -------------------------------------------------------------
Standard_Integer OSD_Printer::Error()const{
 return( myError.Error());
}
#else

//------------------------------------------------------------------------
//-------------------  Windows NT sources for OSD_Printer ----------------
//------------------------------------------------------------------------

#include <OSD_Printer.ixx>

OSD_Printer :: OSD_Printer ( const TCollection_AsciiString& Name ) {

 SetName ( Name );

}  // end constructor

void OSD_Printer :: SetName ( const TCollection_AsciiString& Name ) {

 myName = Name;

}  // end OSD_Printer :: SetName

void OSD_Printer :: Name ( TCollection_AsciiString& Name ) const {

 Name = myName;

}  // end OSD_Printer :: Name

Standard_Boolean OSD_Printer :: Failed () const {

 return myError.Failed ();

}  // end OSD_Printer :: Failed

void OSD_Printer :: Reset () {

 myError.Reset ();

}  // end OSD_Printer :: Reset

void OSD_Printer :: Perror () {

 myError.Perror ();

}  // end OSD_Printer :: Perror

Standard_Integer OSD_Printer :: Error () const {

 return myError.Error ();

}  // end OSD_Printer :: Error


#endif