HDK
 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"
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.
24 {
25 public:
27  const UT_StringRef &cmd,
28  FILE *subproc_stdout);
30 
32 
33  FILE *getStdout() const
34  { return myStdout; }
35 
36 private:
38 
39  FILE *myStdout;
40  FILE *myOriginalStdout;
42 };
43 
44 /// A log source for collecting data printed to stdout or stderr from another
45 /// process launched by Houdini.
47 {
48 public:
51 
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 
#define UT_API
Definition: UT_API.h:14
#define UT_NON_COPYABLE(CLASS)
Define deleted copy constructor and assignment operator inside a class.