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 {
39 };
40 
41 OP_API extern const char *OPtypeIdToString(OP_OpTypeId type);
42 
43 // UTformat support.
44 static inline size_t
45 format(char *buffer, size_t buffer_size, const OP_OpTypeId &v)
46 {
47  UT_WorkBuffer eventtext;
48  eventtext.sprintf("%s (%d)", OPtypeIdToString(v), (int)(v));
49  if (!buffer)
50  return eventtext.length();
51  else
52  {
53  size_t len = std::min(size_t(eventtext.length()), buffer_size);
54  ::memcpy(buffer, eventtext.buffer(), len);
55  return len;
56  }
57 }
58 
59 #endif
SYS_FORCE_INLINE exint length() const
const GLdouble * v
Definition: glcorearb.h:837
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
GLint GLint GLsizei GLint GLenum format
Definition: glcorearb.h:108
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
#define OP_API
Definition: OP_API.h:10
type
Definition: core.h:1059