HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UT_NTStreamUtil.h File Reference
#include "UT_API.h"
#include "UT_Assert.h"
#include "UT_StringHolder.h"
#include "UT_TmpDir.h"
#include <SYS/SYS_Deprecated.h>
#include <SYS/SYS_Types.h>
#include <SYS/SYS_Math.h>
#include <stdio.h>
#include <fstream>
#include <iosfwd>
+ Include dependency graph for UT_NTStreamUtil.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  UT_OStrStreamBuf
 
class  UT_OStrStream
 
class  UT_TempStream
 
class  UT_StreamBufferFilter
 

Macros

#define NTBinaryMode   ((std::ios::openmode)0)
 
#define UT_NoCreate   ((std::ios::openmode)0)
 
#define DECLARE_PORTABLE_RW(type)
 
#define DECLARE_CONVERTIBLE_RW(T)
 

Typedefs

typedef int UT_EnumType
 

Enumerations

enum  UT_STRING_BINARY_IO { UT_STRING_8BIT_IO = 8, UT_STRING_16BIT_IO = 16, UT_STRING_32BIT_IO = 32, UT_STRING_64BIT_IO = 64 }
 

Functions

UT_API void UTsaveDataBinary (UT_OStream &os, const char *data, int64 size, UT_STRING_BINARY_IO minbits=UT_STRING_16BIT_IO)
 
UT_API void UTsaveDataBinary (std::ostream &os, const char *data, int64 size, UT_STRING_BINARY_IO minbits=UT_STRING_16BIT_IO)
 
UT_API void UTsaveStringBinary (std::ostream &os, const char *str, UT_STRING_BINARY_IO minbits)
 
UT_API void UTsaveStringBinary (UT_OStream &os, const char *str, UT_STRING_BINARY_IO minbits)
 
UT_API uint64 UTgetNBytesToSaveStringBinary (uint64 stringlength, UT_STRING_BINARY_IO minbits)
 
UT_API void UTbuildDOSCommandLine (char *dest, const char *const *args)
 
UT_API void UTbuildDOSCommandLine (UT_WorkBuffer &buf, const char *const *args)
 
UT_API bool UTwriteFiltered (std::ostream &os, const char *data, int size, UT_StreamBufferFilter *filter)
 
UT_API bool UTcopyStreamToStream (std::istream &is, std::ostream &os, size_t maxlen=((size_t)-1), UT_StreamBufferFilter *filter=NULL)
 
UT_API bool UTcopyStreamToStream (UT_IStream &is, std::ostream &os, size_t maxlen=((size_t)-1), UT_StreamBufferFilter *filter=NULL)
 
UT_API void UTcreateTempFileName (UT_String &tempfile, const char *matchExt=0)
 
UT_API void UTcreateTempFileName (UT_WorkBuffer &tempfile, const char *matchExt=0)
 
UT_API void UTcreateTempFileName (UT_StringHolder &tempfile, const char *matchExt=0)
 
UT_API void UTcreateTempFileName (UT_String &tempfile, bool ensure_directory_exists, const char *matchExt=0)
 
UT_API void UTcreateTempFileName (UT_WorkBuffer &tempfile, bool ensure_directory_exists, const char *matchExt=0)
 
UT_API void UTcreateTempFileName (UT_StringHolder &tempfile, bool ensure_directory_exists, const char *matchExt=0)
 
UT_API bool UTcreateDirectoryForFile (const char *filename)
 
UT_API bool UTisDataAvailableOnFD (int fd)
 
UT_API bool UTisDataAvailableOnStdin ()
 
UT_API bool UTisStdinValid ()
 
UT_API void UTwaitForTimeoutOrDataOnFD (long clock_ticks, int fd)
 
UT_API void UTwaitForTimeoutOrDataOnStdin (long clock_ticks)
 

Macro Definition Documentation

#define DECLARE_CONVERTIBLE_RW (   T)
Value:
template <typename DEST_TYPE> UT_API \
UT_OStream & UTwrite(UT_OStream &os, const T *src, int64 cnt = 1); \
template <typename DEST_TYPE> UT_API \
std::ostream & UTwrite(std::ostream &os, const T *src, int64 cnt = 1); \
template <typename DEST_TYPE> UT_API \
int64 UTfread(FILE *f, T *dest, int64 cnt = 1); \
template <typename DEST_TYPE> UT_API \
int64 UTfwrite(FILE *f, const T *src, int64 cnt = 1); \
GLfloat f
Definition: glcorearb.h:1926
long long int64
Definition: SYS_Types.h:116
GLenum src
Definition: glcorearb.h:1793

Write a floating point value to given destination type, performing a conversion as necessary.

Definition at line 234 of file UT_NTStreamUtil.h.

#define DECLARE_PORTABLE_RW (   type)
Value:
UT_API UT_OStream &UTwrite( \
UT_OStream &os, const type *src, int64 numelem = 1); \
UT_API std::ostream &UTwrite( \
std::ostream &os, const type *src, int64 numelem = 1); \
UT_API int64 UTfread( FILE *f, type *dest, int64 numelem = 1 ); \
UT_API int64 UTfwrite( FILE *f, const type *src, int64 numelem = 1 ); \
#define UT_API
Definition: UT_API.h:14
GLfloat f
Definition: glcorearb.h:1926
long long int64
Definition: SYS_Types.h:116
type
Definition: core.h:1059
GLenum src
Definition: glcorearb.h:1793

Definition at line 212 of file UT_NTStreamUtil.h.

#define NTBinaryMode   ((std::ios::openmode)0)

Definition at line 26 of file UT_NTStreamUtil.h.

#define UT_NoCreate   ((std::ios::openmode)0)

Definition at line 29 of file UT_NTStreamUtil.h.

Typedef Documentation

typedef int UT_EnumType

Definition at line 39 of file UT_NTStreamUtil.h.

Enumeration Type Documentation

Enumerator
UT_STRING_8BIT_IO 
UT_STRING_16BIT_IO 
UT_STRING_32BIT_IO 
UT_STRING_64BIT_IO 

Definition at line 32 of file UT_NTStreamUtil.h.

Function Documentation

UT_API void UTbuildDOSCommandLine ( char *  dest,
const char *const *  args 
)
UT_API void UTbuildDOSCommandLine ( UT_WorkBuffer buf,
const char *const *  args 
)
UT_API bool UTcopyStreamToStream ( std::istream &  is,
std::ostream &  os,
size_t  maxlen = ((size_t)-1),
UT_StreamBufferFilter filter = NULL 
)
UT_API bool UTcopyStreamToStream ( UT_IStream is,
std::ostream &  os,
size_t  maxlen = ((size_t)-1),
UT_StreamBufferFilter filter = NULL 
)
UT_API bool UTcreateDirectoryForFile ( const char *  filename)
UT_API void UTcreateTempFileName ( UT_String tempfile,
const char *  matchExt = 0 
)
UT_API void UTcreateTempFileName ( UT_WorkBuffer tempfile,
const char *  matchExt = 0 
)
UT_API void UTcreateTempFileName ( UT_StringHolder tempfile,
const char *  matchExt = 0 
)
UT_API void UTcreateTempFileName ( UT_String tempfile,
bool  ensure_directory_exists,
const char *  matchExt = 0 
)
UT_API void UTcreateTempFileName ( UT_WorkBuffer tempfile,
bool  ensure_directory_exists,
const char *  matchExt = 0 
)
UT_API void UTcreateTempFileName ( UT_StringHolder tempfile,
bool  ensure_directory_exists,
const char *  matchExt = 0 
)
UT_API uint64 UTgetNBytesToSaveStringBinary ( uint64  stringlength,
UT_STRING_BINARY_IO  minbits 
)
UT_API bool UTisDataAvailableOnFD ( int  fd)
UT_API bool UTisDataAvailableOnStdin ( )
UT_API bool UTisStdinValid ( )
UT_API void UTsaveDataBinary ( UT_OStream os,
const char *  data,
int64  size,
UT_STRING_BINARY_IO  minbits = UT_STRING_16BIT_IO 
)
UT_API void UTsaveDataBinary ( std::ostream &  os,
const char *  data,
int64  size,
UT_STRING_BINARY_IO  minbits = UT_STRING_16BIT_IO 
)
UT_API void UTsaveStringBinary ( std::ostream &  os,
const char *  str,
UT_STRING_BINARY_IO  minbits 
)
UT_API void UTsaveStringBinary ( UT_OStream os,
const char *  str,
UT_STRING_BINARY_IO  minbits 
)
UT_API void UTwaitForTimeoutOrDataOnFD ( long  clock_ticks,
int  fd 
)
UT_API void UTwaitForTimeoutOrDataOnStdin ( long  clock_ticks)
UT_API bool UTwriteFiltered ( std::ostream &  os,
const char *  data,
int  size,
UT_StreamBufferFilter filter 
)