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 {
23 #if 0
24  POPNET_OPTYPE_ID,
25  POP_OPTYPE_ID,
26 #endif
42 };
43 
44 OP_API extern const char *OPtypeIdToString(OP_OpTypeId type);
45 
46 // UTformat support.
47 static inline size_t
48 format(char *buffer, size_t buffer_size, const OP_OpTypeId &v)
49 {
50  UT_WorkBuffer eventtext;
51  eventtext.sprintf("%s (%d)", OPtypeIdToString(v), (int)(v));
52  if (!buffer)
53  return eventtext.length();
54  else
55  {
56  size_t len = std::min(size_t(eventtext.length()), buffer_size);
57  ::memcpy(buffer, eventtext.buffer(), len);
58  return len;
59  }
60 }
61 
62 #endif
SYS_FORCE_INLINE exint length() const
SYS_FORCE_INLINE const char * buffer() const
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
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: glew.h:1254
#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