Max 5 API Reference
00001 /* 00002 * obstring.h 00003 * 00004 * Copyright 2006 Cycling '74. All rights reserved. 00005 * 00006 */ 00007 00008 #ifndef __OBSTRING_H__ 00009 #define __OBSTRING_H__ 00010 00011 #ifdef __cplusplus 00012 extern "C" { 00013 #endif // __cplusplus 00014 00015 #if C74_PRAGMA_STRUCT_PACKPUSH 00016 #pragma pack(push, 2) 00017 #elif C74_PRAGMA_STRUCT_PACK 00018 #pragma pack(2) 00019 #endif 00020 00021 00022 /** 00023 The string object. This struct is provided for debugging convenience, 00024 but should be considered opaque and is subject to change without notice. 00025 00026 @ingroup string 00027 */ 00028 typedef struct _string 00029 { 00030 t_object s_obj; 00031 char *s_text; 00032 } t_string; 00033 00034 #if C74_PRAGMA_STRUCT_PACKPUSH 00035 #pragma pack(pop) 00036 #elif C74_PRAGMA_STRUCT_PACK 00037 #pragma pack() 00038 #endif 00039 00040 00041 /** 00042 Create a new string object. 00043 @ingroup string 00044 @param psz Pointer to a C-string that will be copied to memory internal to this string object instance. 00045 @return The new string object instance pointer. 00046 */ 00047 t_string* string_new(const char *psz); 00048 00049 00050 /** 00051 Create a new string object. 00052 @ingroup string 00053 @param x The string object instance. 00054 @return A pointer to the internally maintained C-string. 00055 */ 00056 const char* string_getptr(t_string *x); 00057 00058 00059 // TODO: This object has a number of additional methods exposed via Max's messaging interface 00060 00061 00062 #ifdef __cplusplus 00063 } 00064 #endif // __cplusplus 00065 00066 #endif //__OBSTRING_H__
Copyright © 2008, Cycling '74