HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
OP_OpTypeId.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: OP Library (C++)
7  *
8  * COMMENTS: Enums for OP_Node
9  *
10  */
11 
12 #ifndef __OP_OpTypeId_h__
13 #define __OP_OpTypeId_h__
14 
15 #include "OP_API.h"
16 #include <UT/UT_WorkBuffer.h>
17 
19 {
38 };
39 
40 OP_API extern const char *OPtypeIdToString(OP_OpTypeId type);
41 
42 // UTformat support.
43 static inline size_t
44 format(char *buffer, size_t buffer_size, const OP_OpTypeId &v)
45 {
46  UT_WorkBuffer eventtext;
47  eventtext.sprintf("%s (%d)", OPtypeIdToString(v), (int)(v));
48  if (!buffer)
49  return eventtext.length();
50  else
51  {
52  size_t len = std::min(size_t(eventtext.length()), buffer_size);
53  ::memcpy(buffer, eventtext.buffer(), len);
54  return len;
55  }
56 }
57 
58 #endif
SYS_FORCE_INLINE exint length() const
SYS_FORCE_INLINE const char * buffer() const
ImageBuf OIIO_API min(Image_or_Const A, Image_or_Const B, ROI roi={}, int nthreads=0)
Definition: core.h:760
GLenum GLsizei len
Definition: glew.h:7782
const GLdouble * v
Definition: glcorearb.h:837
OP_OpTypeId
Definition: OP_OpTypeId.h:18
OP_API const char * OPtypeIdToString(OP_OpTypeId type)
int sprintf(const char *fmt,...) SYS_PRINTF_CHECK_ATTRIBUTE(2
GLint GLint GLsizei GLint GLenum format
Definition: glcorearb.h:108
#define OP_API
Definition: OP_API.h:10
type
Definition: core.h:1059