0031501: Foundation Classes, Message_Printer - remove theToPutEndl argument
[occt.git] / samples / java / jniviewer / jni / OcctJni_MsgPrinter.hxx
CommitLineData
7f2debb2 1// Copyright (c) 2014 OPEN CASCADE SAS
2//
3// This file is part of Open CASCADE Technology software library.
4//
5// This library is free software; you can redistribute it and/or modify it under
6// the terms of the GNU Lesser General Public License version 2.1 as published
7// by the Free Software Foundation, with special exception defined in the file
8// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
9// distribution for complete text of the license and disclaimer of any warranty.
10//
11// Alternatively, this file may be used under the terms of Open CASCADE
12// commercial license or contractual agreement.
13
14#ifndef OcctJni_MsgPrinter_H
15#define OcctJni_MsgPrinter_H
16
17#include <Message_Printer.hxx>
18
19#include <jni.h>
20
21// Class providing connection between messenger interfaces in C++ and Java layers.
22class OcctJni_MsgPrinter : public Message_Printer
23{
24public:
25
26 //! Default constructor
27 OcctJni_MsgPrinter (JNIEnv* theJEnv,
28 jobject theJObj);
29
30 //! Destructor.
31 ~OcctJni_MsgPrinter();
32
fa8a4628 33protected:
7f2debb2 34
35 //! Main printing method
fa8a4628 36 virtual void send (const TCollection_AsciiString& theString,
37 const Message_Gravity theGravity) const;
7f2debb2 38
39private:
40
41 JNIEnv* myJEnv;
42 jobject myJObj;
43 jmethodID myJMet;
44
45public:
46
92efcf78 47 DEFINE_STANDARD_RTTIEXT(OcctJni_MsgPrinter,Message_Printer)
7f2debb2 48
49};
50
51DEFINE_STANDARD_HANDLE(OcctJni_MsgPrinter, Message_Printer)
52
53#endif // OcctJni_MsgPrinter_H