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_UniversalLogSubprocessSource.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_UniversalLogStdStreamSource.h ( FS Library, C++)
7
*
8
* COMMENTS:
9
*
10
*/
11
12
#ifndef __UT_UniversalLogSubprocessSource__
13
#define __UT_UniversalLogSubprocessSource__
14
15
#include "
UT_API.h
"
16
#include "
UT_NonCopyable.h
"
17
#include "
UT_UniversalLogSource.h
"
18
#include "
UT_UniversalLogStreamHelper.h
"
19
#include <cstdio>
20
21
/// A class that holds information about a subprocess that directs its output
22
/// into the universal logging system through the subprocess source.
23
class
UT_API
UT_UniversalLogSubprocess
24
{
25
public
:
26
UT_UniversalLogSubprocess
(
27
const
UT_StringRef
&cmd,
28
FILE *subproc_stdout);
29
~
UT_UniversalLogSubprocess
();
30
31
UT_NON_COPYABLE
(
UT_UniversalLogSubprocess
)
32
33
FILE *getStdout()
const
34
{
return
myStdout; }
35
36
private
:
37
friend
class
UT_UniversalLogSubprocessSource
;
38
39
FILE *myStdout;
40
FILE *myOriginalStdout;
41
UT_UniversalLogStreamHelper
myHelper;
42
};
43
44
/// A log source for collecting data printed to stdout or stderr from another
45
/// process launched by Houdini.
46
class
UT_API
UT_UniversalLogSubprocessSource
:
public
UT_UniversalLogSource
47
{
48
public
:
49
UT_UniversalLogSubprocessSource
();
50
~
UT_UniversalLogSubprocessSource
()
override
;
51
52
UT_NON_COPYABLE
(
UT_UniversalLogSubprocessSource
)
53
54
static
const
UT_StringHolder
&staticName();
55
56
static
UT_UniversalLogSubprocess
*createSubprocess(
57
const
UT_StringHolder
&cmd,
58
FILE *subproc_stdout);
59
static
void
startLogging(
60
UT_UniversalLogSubprocess
&subprocess,
61
int
pid,
62
const
UT_StringHolder
&identifier);
63
};
64
65
#endif
66
UT_UniversalLogSource.h
UT_UniversalLogSubprocessSource
Definition:
UT_UniversalLogSubprocessSource.h:46
UT_API.h
UT_API
#define UT_API
Definition:
UT_API.h:14
UT_StringRef
Definition:
UT_StringHolder.h:188
UT_StringHolder
Definition:
UT_StringHolder.h:999
UT_NON_COPYABLE
#define UT_NON_COPYABLE(CLASS)
Define deleted copy constructor and assignment operator inside a class.
Definition:
UT_NonCopyable.h:31
UT_UniversalLogStreamHelper
Definition:
UT_UniversalLogStreamHelper.h:24
UT_NonCopyable.h
UT_UniversalLogSource
Definition:
UT_UniversalLogSource.h:61
UT_UniversalLogStreamHelper.h
UT_UniversalLogSubprocess
Definition:
UT_UniversalLogSubprocessSource.h:23
UT
UT_UniversalLogSubprocessSource.h
Generated on Thu Mar 28 2024 03:47:51 for HDK by
1.8.6