summaryrefslogtreecommitdiff
path: root/src/Draw/Draw_Printer.cxx
blob: 15082f42647489eb9c542b1cee4cabf408be6cb3 (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
// File:      Draw_Printer.cxx
// Created:   Tue Jul 31 19:26:55 2007
// Author:    OCC Team
// Copyright: Open CASCADE S.A. 2007

#include <Draw_Printer.ixx>

#include <TCollection_AsciiString.hxx>
#include <TCollection_ExtendedString.hxx>

//=======================================================================
//function : Draw_Printer
//purpose  : 
//=======================================================================

Draw_Printer::Draw_Printer (const Draw_Interpretor& theTcl)
: myTcl((Standard_Address)&theTcl)
{
}

//=======================================================================
//function : Send
//purpose  : 
//=======================================================================

void Draw_Printer::Send (const TCollection_ExtendedString& theString,
			 const Message_Gravity /*theGravity*/,
			 const Standard_Boolean putEndl) const
{
  if ( ! myTcl )
    return;
  (*(Draw_Interpretor*)myTcl) << theString;
  if ( putEndl )
    (*(Draw_Interpretor*)myTcl) << '\n';
}

//=======================================================================
//function : Send
//purpose  : 
//=======================================================================

void Draw_Printer::Send (const Standard_CString theString,
			 const Message_Gravity /*theGravity*/,
			 const Standard_Boolean putEndl) const
{
  if ( ! myTcl )
    return;
  (*(Draw_Interpretor*)myTcl) << theString;
  if ( putEndl )
    (*(Draw_Interpretor*)myTcl) << '\n';
}

//=======================================================================
//function : Send
//purpose  : 
//=======================================================================

void Draw_Printer::Send (const TCollection_AsciiString& theString,
			 const Message_Gravity /*theGravity*/,
			 const Standard_Boolean putEndl) const
{
  if ( ! myTcl )
    return;
  (*(Draw_Interpretor*)myTcl) << theString;
  if ( putEndl )
    (*(Draw_Interpretor*)myTcl) << '\n';
}