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
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: glew.h:1254
const GLdouble * v
Definition: glew.h:1391
GLuint buffer
Definition: glew.h:1680
OP_OpTypeId
Definition: OP_OpTypeId.h:18
OP_API const char * OPtypeIdToString(OP_OpTypeId type)
GLuint GLuint GLsizei GLenum type
Definition: glew.h:1253
int sprintf(const char *fmt,...) SYS_PRINTF_CHECK_ATTRIBUTE(2
#define OP_API
Definition: OP_API.h:10
vint4 min(const vint4 &a, const vint4 &b)
Definition: simd.h:4694
GLenum GLsizei len
Definition: glew.h:7752