本文整理汇总了C++中OSCMessage::getString方法的典型用法代码示例。如果您正苦于以下问题:C++ OSCMessage::getString方法的具体用法?C++ OSCMessage::getString怎么用?C++ OSCMessage::getString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OSCMessage
的用法示例。
在下文中一共展示了OSCMessage::getString方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setScreenLine
/* helpers */
void setScreenLine(OledScreen &screen, int lineNum, OSCMessage &msg){
char str[256];
char screenLine[256];
int i = 0;
screenLine[0] = 0;
// since there are no strings in pd, the line message will be made of different types
// cat the line together, then throw it up on the patch screen
while (msg.isString(i) || msg.isFloat(i) || msg.isInt(i)){
if (msg.isString(i)){
msg.getString(i, str, 256);
strcat(screenLine, str);
strcat(screenLine, " ");
}
if (msg.isFloat(i)){
sprintf(str, "%g ", msg.getFloat(i));
strcat(screenLine, str);
}
if (msg.isInt(i)){
sprintf(str, "%d ", msg.getInt(i));
strcat(screenLine, str);
}
i++;
}
screen.setLine(lineNum, screenLine);
// printf("%s\n", screenLine);
}