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 *original_stdout);
30 
32 
33  FILE *getStdout() const
34  { return myStdout; }
35 
36 private:
38 
39  FILE *myStdout;
41 };
42 
43 /// A log source for collecting data printed to stdout or stderr from another
44 /// process launched by Houdini.
46 {
47 public:
50 
52 
53  static const UT_StringHolder &staticName();
54 
55  static UT_UniversalLogSubprocess *createSubprocess(
56  const UT_StringHolder &cmd,
57  FILE *subproc_stdout);
58  static void startLogging(
59  UT_UniversalLogSubprocess &subprocess,
60  int pid,
61  const UT_StringHolder &identifier);
62 };
63 
64 #endif
65 
#define UT_API
Definition: UT_API.h:14
#define UT_NON_COPYABLE(CLASS)
Define deleted copy constructor and assignment operator inside a class.