• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ IoMessage_locals_symbolArgAt_函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中IoMessage_locals_symbolArgAt_函数的典型用法代码示例。如果您正苦于以下问题:C++ IoMessage_locals_symbolArgAt_函数的具体用法?C++ IoMessage_locals_symbolArgAt_怎么用?C++ IoMessage_locals_symbolArgAt_使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了IoMessage_locals_symbolArgAt_函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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);
	}
}
开发者ID:Habaut,项目名称:GameBindings,代码行数:26,代码来源:IoSystem.c


示例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);
}
开发者ID:Habaut,项目名称:GameBindings,代码行数:33,代码来源:IoDynLib.c


示例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);
}
开发者ID:Akiyah,项目名称:io,代码行数:25,代码来源:IoDirectory.c


示例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;
}
开发者ID:achoy,项目名称:io,代码行数:28,代码来源:IoFile.c


示例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);
}
开发者ID:ADTSH,项目名称:io,代码行数:28,代码来源:IoDuration.c


示例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));
}
开发者ID:ADTSH,项目名称:io,代码行数:8,代码来源:IoRegex.c


示例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));
}
开发者ID:Akiyah,项目名称:io,代码行数:8,代码来源:_IoCairoSVGSurface.c


示例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;
}
开发者ID:mikedouglas,项目名称:io,代码行数:9,代码来源:IoMessage.c


示例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;
}
开发者ID:anthem,项目名称:io,代码行数:9,代码来源:IoFnmatch.c


示例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;
}
开发者ID:JoeyButler,项目名称:io,代码行数:9,代码来源:IoSQLite3.c


示例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;
}
开发者ID:Habaut,项目名称:GameBindings,代码行数:10,代码来源:IoDynLib.c


示例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;
}
开发者ID:Habaut,项目名称:GameBindings,代码行数:10,代码来源:IoDynLib.c


示例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;
}
开发者ID:Habaut,项目名称:GameBindings,代码行数:10,代码来源:IoDynLib.c


示例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;
}
开发者ID:ADTSH,项目名称:io,代码行数:10,代码来源:IoRegexMatches.c


示例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);
}
开发者ID:JoeyButler,项目名称:io,代码行数:10,代码来源:IoSQLite3.c


示例16: IoMessage_locals_symbolArgAt_

IoObject *IoImage_setPath(IoImage *self, IoObject *locals, IoMessage *m)
{
	/*doc Image setPath(aString)
	Sets the image path. Returns self.
	*/

	IoSymbol *s = IoMessage_locals_symbolArgAt_(m, locals, 0);
	Image_path_(DATA(self)->image, CSTRING(s));
	return self;
}
开发者ID:Alessandroo,项目名称:io,代码行数:10,代码来源:IoImage.c


示例17: IO_METHOD

IO_METHOD(IoDate, asString)
{
	/*doc Date asString(optionalFormatString)
	Returns a string representation of the receiver using the
receivers format. If the optionalFormatString argument is present, the
receiver's format is set to it first. Formatting is according to ANSI C
date formatting rules.
<p>
<pre>	
%a abbreviated weekday name (Sun, Mon, etc.)
%A full weekday name (Sunday, Monday, etc.)
%b abbreviated month name (Jan, Feb, etc.)
%B full month name (January, February, etc.)
%c full date and time string
%d day of the month as two-digit decimal integer (01-31)
%H hour as two-digit 24-hour clock decimal integer (00-23)
%I hour as two-digit 12-hour clock decimal integer (01-12)
%m month as a two-digit decimal integer (01-12)
%M minute as a two-digit decimal integer (00-59)
%p either "AM" or "PM"
%S second as a two-digit decimal integer (00-59)
%U number of week in the year as two-digit decimal integer (00-52)
with Sunday considered as first day of the week
%w weekday as one-digit decimal integer (0-6) with Sunday as 0
%W number of week in the year as two-digit decimal integer (00-52)
with Monday considered as first day of the week
%x full date string (no time); in the C locale, this is equivalent
to "%m/%d/%y".
%y year without century as two-digit decimal number (00-99)
%Y year with century as four-digit decimal number
%Z time zone name (e.g. EST);
null string if no time zone can be obtained
%% stands for '%' character in output string.
</pre>	
*/

	char *format = "%Y-%m-%d %H:%M:%S %Z";

	if (IoMessage_argCount(m) == 1)
	{
		format = CSTRING(IoMessage_locals_symbolArgAt_(m, locals, 0));
	}
	else
	{
		IoObject *f = IoObject_getSlot_(self, IOSYMBOL("format"));
		if (ISSEQ(f)) { format = CSTRING(f); }
	}

	{
		UArray *ba = Date_asString(DATA(self), format);
		return IoState_symbolWithUArray_copy_(IOSTATE, ba, 0);
	}
}
开发者ID:bomma,项目名称:io,代码行数:53,代码来源:IoDate.c


示例18: DATA

IoObject *IoEditLine_readLine(IoEditLine *self, IoObject *locals, IoMessage *m)
{
	int count = 0;
	const char *line = NULL;

	DATA(self)->prompt = IoMessage_locals_symbolArgAt_(m, locals, 0);

	line = el_gets(DATA(self)->editline, &count);

	if (line && count >= 0)
		return IOSEQ(line, (size_t)count);
	else
		return IONIL(self);
}
开发者ID:cdcarter,项目名称:io,代码行数:14,代码来源:IoEditLine.c


示例19: IO_METHOD

IO_METHOD(IoObject, messageForString)
{
	/*doc Compiler messageForString(aString, optionalLabelString)
	Returns the compiled message object for aString.
	*/

	IoSymbol *string = IoMessage_locals_seqArgAt_(m, locals, 0);
	IoSymbol *label  = IoMessage_rawLabel(m);

	if (IoMessage_argCount(m) > 1)
	{
		label = IoMessage_locals_symbolArgAt_(m, locals, 1);
	}

	return IoMessage_newFromText_labelSymbol_(IOSTATE, CSTRING((IoSymbol *)string), (IoSymbol *)label);
}
开发者ID:doublec,项目名称:io,代码行数:16,代码来源:IoCompiler.c


示例20: IO_METHOD

IO_METHOD(IoObject, system)
{
	/*doc System system(aString)
	Makes a system call and returns a Number for the return value.
	*/

	IoSymbol *s = IoMessage_locals_symbolArgAt_(m, locals, 0);
	
	char *buf = NULL;
	buf = (char *)getcwd(buf, 1024);
	
	//printf("CURDIR: [%s]\n", buf);
	//printf("SYSTEM: [%s]\n", CSTRING(s));
	int result = system(CSTRING(s))/ 256;
	//printf("system result = %i\n", result);
	return IONUMBER(result);
}
开发者ID:jdp,项目名称:io,代码行数:17,代码来源:IoSystem.c



注:本文中的IoMessage_locals_symbolArgAt_函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ IoObject_addMethodTable_函数代码示例发布时间:2022-05-30
下一篇:
C++ IoMessage_locals_seqArgAt_函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap