本文整理汇总了C++中IoMessage_locals_symbolArgAt_函数的典型用法代码示例。如果您正苦于以下问题:C++ IoMessage_locals_symbolArgAt_函数的具体用法?C++ IoMessage_locals_symbolArgAt_怎么用?C++ IoMessage_locals_symbolArgAt_使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了IoMessage_locals_symbolArgAt_函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: IO_METHOD
IO_METHOD(IoObject, shellExecute)
{
LPCTSTR operation;
LPCTSTR file;
LPCTSTR parameters;
LPCTSTR directory;
int displayFlag;
int result;
operation = CSTRING(IoMessage_locals_symbolArgAt_(m, locals, 0));
file = CSTRING(IoMessage_locals_symbolArgAt_(m, locals, 1));
parameters = IoMessage_argCount(m) > 2 ? CSTRING(IoMessage_locals_symbolArgAt_(m, locals, 2)) : NULL;
directory = IoMessage_argCount(m) > 3 ? CSTRING(IoMessage_locals_symbolArgAt_(m, locals, 3)) : NULL;
displayFlag = IoMessage_argCount(m) > 4 ? IoMessage_locals_intArgAt_(m, locals, 4) : SW_SHOWNORMAL;
result = (int)ShellExecute(NULL, operation, file, parameters, directory, displayFlag);
if(result > 32)
{
return self;
}
else
{
return (IoObject *)IoError_newWithMessageFormat_(IOSTATE, "ShellExecute Error %i", result);
}
}
示例2: DynLib_pointerForSymbolName_
IoDynLib *IoDynLib_callPluginInitFunc(IoDynLib *self, IoObject *locals, IoMessage *m)
{
/*doc DynLib callPluginInit(functionName)
Call's the dll function of the specified name.
Returns the result as a Number or raises an exception on error.
*/
intptr_t rc = 0;
intptr_t *params = NULL;
void *f = DynLib_pointerForSymbolName_(DATA(self),
CSTRING(IoMessage_locals_symbolArgAt_(m, locals, 0)));
if (f == NULL)
{
IoState_error_(IOSTATE, m, "Error resolving call '%s'.",
CSTRING(IoMessage_locals_symbolArgAt_(m, locals, 0)));
return IONIL(self);
}
if (IoMessage_argCount(m) < 1)
{
IoState_error_(IOSTATE, m, "Error, you must give an init function name to check for.");
return IONIL(self);
}
params = io_calloc(1, sizeof(intptr_t) * 2);
params[0] = (intptr_t)IOSTATE;
params[1] = (intptr_t)IOSTATE->lobby;
rc = ((intptr_t (*)(intptr_t, intptr_t))f)(params[0], params[1]);
io_free(params);
return IONUMBER(rc);
}
示例3: IO_METHOD
IO_METHOD(IoDirectory, exists)
{
/*doc Directory exists(optionalPath)
Returns true if the Directory path exists, and false otherwise.
If optionalPath string is provided, it tests the existance of that path instead.
*/
IoSymbol *path = DATA(self)->path;
DIR *dirp;
if (IoMessage_argCount(m) > 0)
{
path = IoMessage_locals_symbolArgAt_(m, locals, 0);
}
dirp = opendir(CSTRING(path));
if (!dirp)
{
return IOFALSE(self);
}
(void)closedir(dirp);
return IOTRUE(self);
}
示例4: IO_METHOD
IO_METHOD(IoFile, moveTo_)
{
/*doc File moveTo(pathString)
Moves the file specified by the receiver's path to the
new path pathString. Raises a File doesNotExist exception if the
file does not exist or a File nameConflict exception if the file
nameString already exists.
*/
IoSymbol *newPath = IoMessage_locals_symbolArgAt_(m, locals, 0);
const char *fromPath = UTF8CSTRING(DATA(self)->path);
const char *toPath = UTF8CSTRING(newPath);
if(strcmp(fromPath, toPath) != 0)
{
int error;
remove(toPath); // to make sure we do not get an error
error = rename(fromPath, toPath);
if (error)
{
IoState_error_(IOSTATE, m, "error moving file '%s' to '%s'", fromPath, toPath);
}
}
return self;
}
示例5: IO_METHOD
IO_METHOD(IoDuration, asString)
{
/*doc Duration asString(formatString)
Returns a string representation of the receiver. The formatString argument is optional. If present, the returned string will be formatted according to ANSI C date formating rules.
<p>
<pre>
%y years without century as two-digit decimal number (00-99)
%Y year with century as four-digit decimal number
%d days
%H hour as two-digit 24-hour clock decimal integer (00-23)
%M minute as a two-digit decimal integer (00-59)
%S second as a two-digit decimal integer (00-59)
The default format is "%Y %d %H:%M:%S".
</pre>
*/
UArray *ba;
char *format = NULL;
if (IoMessage_argCount(m) == 1)
{
format = CSTRING(IoMessage_locals_symbolArgAt_(m, locals, 0));
}
ba = Duration_asUArrayWithFormat_(DATA(self), format);
return IoState_symbolWithUArray_copy_convertToFixedWidth(IOSTATE, ba, 0);
}
示例6: IoRegex_newWithPattern_
IoObject *IoRegex_with(IoRegex *self, IoObject *locals, IoMessage *m)
{
/*doc Regex with(pattern)
Returns a new Regex created from the given pattern string.
*/
return IoRegex_newWithPattern_(IOSTATE, IoMessage_locals_symbolArgAt_(m, locals, 0));
}
示例7: CSTRING
IoObject *IoCairoSVGSurface_create(IoCairoSVGSurface *self, IoObject *locals, IoMessage *m)
{
char *filename = CSTRING(IoMessage_locals_symbolArgAt_(m, locals, 0));
double w = IoMessage_locals_doubleArgAt_(m, locals, 1);
double h = IoMessage_locals_doubleArgAt_(m, locals, 2);
return IoCairoSurface_newWithRawSurface_(IOSTATE, m, cairo_svg_surface_create(filename, w, h));
}
示例8: IO_METHOD
IO_METHOD(IoMessage, protoSetName)
{
/*doc Message setName(aString)
Sets the name of the receiver. Returns self.
*/
IoMessage_rawSetName_(self, IoMessage_locals_symbolArgAt_(m, locals, 0));
//IoMessage_cacheIfPossible(self);
return self;
}
示例9: DATA
IoObject *IoFnmatch_setPattern(IoFnmatch *self, IoObject *locals, IoMessage *m)
{
/*doc Fnmatch setPattern(aString)
Sets the pattern string. Returns self.
*/
DATA(self)->pattern = IOREF(IoMessage_locals_symbolArgAt_(m, locals, 0));
return self;
}
示例10: DATA
IoObject *IoSQLite3_setPath(IoSQLite3 *self, IoObject *locals, IoMessage *m)
{
/*doc SQLite3 setPath
Sets the path to the database file. Returns self.
*/
DATA(self)->path = IOREF(IoMessage_locals_symbolArgAt_(m, locals, 0));
return self;
}
示例11: DynLib_setPath_
IoDynLib *IoDynLib_setPath(IoDynLib *self, IoObject *locals, IoMessage *m)
{
/*doc DynLib setPath(aString)
Sets the path to the dynamic library. Returns self.
*/
DynLib_setPath_(DATA(self),
CSTRING(IoMessage_locals_symbolArgAt_(m, locals, 0)));
return self;
}
示例12: DynLib_setInitFuncName_
IoDynLib *IoDynLib_setInitFuncName(IoDynLib *self, IoObject *locals, IoMessage *m)
{
/*doc DynLib setInitFuncName(aString)
Sets the initialization function name for the dynamic library. Returns self.
*/
DynLib_setInitFuncName_(DATA(self),
CSTRING(IoMessage_locals_symbolArgAt_(m, locals, 0)));
return self;
}
示例13: DynLib_setFreeFuncName_
IoDynLib *IoDynLib_setFreeFuncName(IoDynLib *self, IoObject *locals, IoMessage *m)
{
/*doc DynLib setFreeFuncName(aString)
Sets the io_free function name. Returns self.
*/
DynLib_setFreeFuncName_(DATA(self),
CSTRING(IoMessage_locals_symbolArgAt_(m, locals, 0)));
return self;
}
示例14: DATA
IoObject *IoRegexMatches_setString(IoRegexMatches *self, IoObject *locals, IoMessage *m)
{
/*doc RegexMatches setString(aString)
Sets the string to find matches in. Returns self.
*/
DATA(self)->string = IOREF(IoMessage_locals_symbolArgAt_(m, locals, 0));
DATA(self)->endPosition = IoSeq_rawSize(DATA(self)->string);
IoRegexMatches_rawsetPosition_(self, 0);
return self;
}
示例15: IoMessage_locals_symbolArgAt_
IoObject *IoSQLite3_columnNamesOfTable(IoSQLite3 *self, IoObject *locals, IoMessage *m)
{
/*doc SQLite3 columnNamesOfTable(tableName)
Returns a list containing the names of all columns in the specified table.
*/
IoSymbol *tableName = IoMessage_locals_symbolArgAt_(m, locals, 0);
IoSymbol *s = IoSeq_newSymbolWithFormat_(IOSTATE, "PRAGMA TABLE_INFO(%s)", CSTRING(tableName));
return IoSQLite3_execWithCallback(self, locals, m, s, IoSQLite3_columnNamesResultRow);
}