HDK
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
UT_UniversalLogFileLikeSink.h
Go to the documentation of this file.
1
/*
2
* PROPRIETARY INFORMATION. This software is proprietary to
3
* Side Effects Software Inc., and is not to be reproduced,
4
* transmitted, or disclosed in any way without written permission.
5
*
6
* NAME: UT_UniversalLogFileLikeSink.h
7
*
8
* COMMENTS:
9
*
10
*/
11
12
#ifndef __UT_UNIVERSALLOGFILELIKESINK_H__
13
#define __UT_UNIVERSALLOGFILELIKESINK_H__
14
15
#include "
UT_API.h
"
16
#include "
UT_Error.h
"
17
#include "
UT_Function.h
"
18
#include "
UT_Lock.h
"
19
#include "
UT_StringHolder.h
"
20
#include "
UT_UniversalLogSink.h
"
21
22
class
UT_UniversalLogEntry
;
23
24
class
UT_API
UT_UniversalLogFileLikeSink
:
public
UT_UniversalLogSink
25
{
26
public
:
27
using
LogEntryFormatCallback
=
UT_Function
<
void
(
28
const
UT_UniversalLogEntry
&,
29
UT_StringHolder
&
message
)>;
30
31
UT_UniversalLogFileLikeSink
(
const
UT_UniversalLogFileLikeSink
&) =
delete
;
32
UT_UniversalLogFileLikeSink
()
33
: myMinSeverity(
UT_ERROR_NONE
)
34
{
35
}
36
37
void
setFormatEntryCallback
(
const
LogEntryFormatCallback
&callback)
38
{ myLogEntryFormatCallback = callback; }
39
40
void
setMinSeverity
(
UT_ErrorSeverity
severity
)
41
{ myMinSeverity =
severity
; }
42
int
minSeverity
()
const
43
{
return
myMinSeverity; }
44
static
UT_StringHolder
severityToString(
UT_ErrorSeverity
sev);
45
46
protected
:
47
void
doLog
(
const
UT_UniversalLogEntry
& entry)
override
;
48
49
virtual
void
formatLogEntry(
const
UT_UniversalLogEntry
&entry,
50
UT_StringHolder
&msg)
const
= 0;
51
virtual
void
writeString
(
UT_ErrorSeverity
severity
,
52
const
UT_StringHolder
&msg)
const
= 0;
53
54
private
:
55
UT_Lock
myOutputLock;
56
UT_ErrorSeverity
myMinSeverity;
57
LogEntryFormatCallback myLogEntryFormatCallback;
58
};
59
60
#endif // __UT_UNIVERSALLOGFILELIKESINK_H__
61
message
GLuint GLsizei const GLchar * message
Definition:
glcorearb.h:2543
UT_UniversalLogFileLikeSink::setMinSeverity
void setMinSeverity(UT_ErrorSeverity severity)
Definition:
UT_UniversalLogFileLikeSink.h:40
UT_UniversalLogFileLikeSink::setFormatEntryCallback
void setFormatEntryCallback(const LogEntryFormatCallback &callback)
Definition:
UT_UniversalLogFileLikeSink.h:37
void
void
Definition:
png.h:1083
UT_API.h
UT_ErrorSeverity
UT_ErrorSeverity
Definition:
UT_Error.h:25
UT_API
#define UT_API
Definition:
UT_API.h:14
UT_UniversalLogFileLikeSink::UT_UniversalLogFileLikeSink
UT_UniversalLogFileLikeSink()
Definition:
UT_UniversalLogFileLikeSink.h:32
UT_UniversalLogSink.h
UT_SpinLockT< true, false >
UT_UniversalLogSink
Definition:
UT_UniversalLogSink.h:30
UT_UniversalLogFileLikeSink::LogEntryFormatCallback
UT_Function< void(const UT_UniversalLogEntry &, UT_StringHolder &message)> LogEntryFormatCallback
Definition:
UT_UniversalLogFileLikeSink.h:29
UT_StringHolder
Definition:
UT_StringHolder.h:999
UT_ERROR_NONE
Definition:
UT_Error.h:27
openvdb::OPENVDB_VERSION_NAME::writeString
void writeString(std::ostream &os, const Name &name)
Definition:
Name.h:33
UT_Function.h
severity
GLenum GLenum severity
Definition:
glcorearb.h:2539
UT_Function
std::function< T > UT_Function
Definition:
UT_Function.h:37
UT_UniversalLogSink::doLog
virtual void doLog(const UT_UniversalLogEntry &entry)=0
UT_StringHolder.h
UT_UniversalLogFileLikeSink::minSeverity
int minSeverity() const
Definition:
UT_UniversalLogFileLikeSink.h:42
UT_Lock.h
UT_UniversalLogEntry
Simple object to hold the data associated with a single log entry event.
Definition:
UT_UniversalLogEntry.h:58
UT_Error.h
UT_UniversalLogFileLikeSink
Definition:
UT_UniversalLogFileLikeSink.h:24
UT
UT_UniversalLogFileLikeSink.h
Generated on Sat Dec 21 2024 02:49:22 for HDK by
1.8.6