当前位置: 首页>>代码示例>>C++>>正文


C++ IoObject_tag_函数代码示例

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


在下文中一共展示了IoObject_tag_函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: IoObject_new

// _proto creates the first-ever instance of the prototype 
IoObject *IoCInvokeStructureInstance_proto(void *state)
{
        // First we allocate a new IoObject
        IoCInvokeStructureInstance *self = IoObject_new(state);

        // Then tag it
        IoObject_tag_(self, IoCInvokeStructureInstance_newTag(state));
	    IoObject_setDataPointer_(self, calloc(1, sizeof(IoCInvokeStructureInstanceData)));
        
	    // then register this proto generator
        IoState_registerProtoWithFunc_(state, self, IoCInvokeStructureInstance_proto);

        // and finally, define the table of methods this proto supports
        // we just have one method here, returnSelf, then terminate the array
        // with NULLs
        {
                IoMethodTable methodTable[] = {
			        {"setValue", IoCInvokeStructureInstance_setValue},
			        {"setLibrary", IoCInvokeStructureInstance_setLibrary},
                    {"getValue", IoCInvokeStructureInstance_getValue},
                	{NULL, NULL},
                };
                IoObject_addMethodTable_(self, methodTable);
        }

        return self;
}
开发者ID:fredreichbier,项目名称:io-cinvoke,代码行数:28,代码来源:IoCInvokeStructureInstance.c

示例2: IoObject_new

IoMap *IoMap_proto(void *state)
{
    IoMethodTable methodTable[] = {
        {"empty",    IoMap_empty},
        {"at",       IoMap_at},
        {"atPut",    IoMap_atPut},
        {"atIfAbsentPut", IoMap_atIfAbsentPut},
        {"size",     IoMap_size},
        {"keys",     IoMap_keys},
        {"values",   IoMap_values},
        {"foreach",  IoMap_foreach},
        {"hasKey",   IoMap_hasKey},
        {"hasValue", IoMap_hasValue},
        {"removeAt", IoMap_removeAt},
        {NULL, NULL},
    };

    IoObject *self = IoObject_new(state);

    IoObject_tag_(self, IoMap_newTag(state));
    IoObject_setDataPointer_(self, PHash_new());

    IoState_registerProtoWithFunc_((IoState *)state, self, IoMap_proto);

    IoObject_addMethodTable_(self, methodTable);
    return self;
}
开发者ID:pgregory,项目名称:io,代码行数:27,代码来源:IoMap.c

示例3: IoObject_new

IoYajlGen *IoYajlGen_proto(void *state)
{
	IoYajlGen *self = IoObject_new(state);
	IoObject_tag_(self, IoYajlGen_newTag(state));

	yajl_gen_config config = { 0, "" };
	IoObject_setDataPointer_(self, yajl_gen_alloc(&config, NULL));

	IoState_registerProtoWithFunc_(state, self, IoYajlGen_proto);

	{
		IoMethodTable methodTable[] = 
		{
			{"pushNull", IoYajlGen_pushNull},
			{"pushString", IoYajlGen_pushString},
			{"pushInteger", IoYajlGen_pushInteger},
			{"pushDouble", IoYajlGen_pushDouble},
			{"pushNumberString", IoYajlGen_pushNumberString},
			{"pushBool", IoYajlGen_pushBool},
			{"openMap", IoYajlGen_openMap},
			{"closeMap", IoYajlGen_closeMap},
			{"openArray", IoYajlGen_openArray},
			{"closeArray", IoYajlGen_closeArray},
			{"generate", IoYajlGen_generate},
			{NULL, NULL},
		};
		IoObject_addMethodTable_(self, methodTable);
	}
		
	return self;
}
开发者ID:Akiyah,项目名称:io,代码行数:31,代码来源:IoYajlGen.c

示例4: IoObject_new

IoODEJointGroup *IoODEJointGroup_proto(void *state)
{
	IoObject *self = IoObject_new(state);
	IoObject_tag_(self, IoODEJointGroup_newTag(state));

	IoObject_setDataPointer_(self, calloc(1, sizeof(IoODEJointGroupData)));

	JOINTGROUPID = 0;
	WORLD = 0L;
	DATA(self)->joints = 0L;

	IoState_registerProtoWithFunc_(state, self, IoODEJointGroup_proto);

	{
		IoMethodTable methodTable[] = {
		{"jointGroupId", IoODEJointGroup_jointGroupId},
		{"world", IoODEJointGroup_world},
		{"empty", IoODEJointGroup_empty},
		{"joints", IoODEJointGroup_joints},
		{"createContact", IoODEJointGroup_createContact},
		{NULL, NULL},
		};
		IoObject_addMethodTable_(self, methodTable);
	}
	return self;
}
开发者ID:Akiyah,项目名称:io,代码行数:26,代码来源:IoODEJointGroup.c

示例5: IoCFFIDataType_new

IoCFFIPointer *IoCFFIPointer_proto(void *state)
{
	IoObject *self = IoCFFIDataType_new(state);
	IoObject_tag_(self, IoCFFIPointer_newTag(state));

	IoObject_setSlot_to_(self, IOSYMBOL("pointers"), IoMap_new(state));

	IoObject_setDataPointer_(self, calloc(1, sizeof(IoCFFIPointerData)));
	memset(DATA(self), 0, sizeof(IoCFFIPointerData));
	DATA(self)->valuePointer = &(DATA(self)->ptr);

	IoState_registerProtoWithFunc_(state, self, IoCFFIPointer_proto);

	{
		IoMethodTable methodTable[] = {
			{"address", IoCFFIPointer_address},
			{"asBuffer", IoCFFIPointer_asBuffer},
			{"at", IoCFFIPointer_at},
			{"atPut", IoCFFIPointer_atPut},
			{"castTo", IoCFFIPointer_castTo},
			{"value", IoCFFIPointer_value},
			{"setValue", IoCFFIPointer_setValue},
			{"toType", IoCFFIPointer_toType},
			{NULL, NULL},
		};
		IoObject_addMethodTable_(self, methodTable);
	}

	return self;
}
开发者ID:akimd,项目名称:io,代码行数:30,代码来源:IoCFFIPointer.c

示例6: IoObject_new

IoEvDNSRequest *IoEvDNSRequest_proto(void *state)
{
	IoObject *self = IoObject_new(state);

	IoObject_tag_(self, IoEvDNSRequest_newTag(state));
	IoObject_setDataPointer_(self, 0x0);

	IoState_registerProtoWithFunc_((IoState *)state, self, IoEvDNSRequest_proto);

	{
		IoMethodTable methodTable[] = {
		{"resolveIPv4", IoEvDNSRequest_resolveIPv4},
		/*
		{"resolveIPv6", IoEvDNSRequest_resolveIPv6},
		{"resolveReverseIPv4", IoEvDNSRequest_resolveReverseIPv4},
		{"resolveReverseIPv6", IoEvDNSRequest_resolveReverseIPv6},
		*/
		{NULL, NULL},
		};

		IoObject_addMethodTable_(self, methodTable);
	} 


	return self;
}
开发者ID:Akiyah,项目名称:io,代码行数:26,代码来源:IoEvDNSRequest.c

示例7: IoObject_new

IoCairoSurfacePattern *IoCairoSurfacePattern_proto(void *state)
{
	IoObject *self = IoObject_new(state);
	IoObject_tag_(self, IoCairoSurfacePattern_newTag(state));

	IoState_registerProtoWithFunc_(state, self, IoCairoSurfacePattern_proto);

	IoCairoPattern_addMethods(self);
	{
		IoMethodTable methodTable[] = {
			{"create", IoCairoSurfacePattern_create},

			{"getSurface", IoCairoSurfacePattern_getSurface},

			{"setExtend", IoCairoSurfacePattern_setExtend},
			{"getExtend", IoCairoSurfacePattern_getExtend},

			{"setFilter", IoCairoSurfacePattern_setFilter},
			{"getFilter", IoCairoSurfacePattern_getFilter},

			{NULL, NULL},
		};
		IoObject_addMethodTable_(self, methodTable);
	}
	return self;
}
开发者ID:cdcarter,项目名称:io,代码行数:26,代码来源:IoCairoSurfacePattern.c

示例8: IoObject_new

IoCertificate *IoCertificate_proto(void *state)
{
	IoObject *self = IoObject_new(state);
	
	IoObject_tag_(self, IoCertificate_newTag(state));

	IoState_registerProtoWithFunc_((IoState *)state, self, IoCertificate_proto);
	
	IoObject_setSlot_to_(self, IOSYMBOL("PEMType"), IONUMBER(X509_FILETYPE_PEM));
	IoObject_setSlot_to_(self, IOSYMBOL("ASN1Type"), IONUMBER(X509_FILETYPE_ASN1));
	
	{
		IoMethodTable methodTable[] = {
		{"version", IoCertificate_version},
		{"serialNumber", IoCertificate_serialNumber},
		{"notBefore", IoCertificate_notBefore},
		{"notAfter", IoCertificate_notAfter},
		{"extensions", IoCertificate_extensions},
		{"attributes", IoCertificate_attributes},
		{"issuerName", IoCertificate_issuerName},
		{"subjectName", IoCertificate_subjectName},
		{NULL, NULL}
		};
		IoObject_addMethodTable_(self, methodTable);
	}
	
	IoObject_setDataPointer_(self, calloc(1, sizeof(Certificate)));
	
	return self;
}
开发者ID:anthem,项目名称:io,代码行数:30,代码来源:IoCertificate.c

示例9: IoObject_new

IoAppleSensors *IoAppleSensors_proto(void *state)
{
	IoAppleSensors *self = IoObject_new(state);
	IoObject_tag_(self, IoAppleSensors_newTag(state));

	//IoObject_setDataPointer_(self, calloc(1, sizeof(IoAppleSensorsData)));

	IoState_registerProtoWithId_(state, self, protoId);

	{
		IoMethodTable methodTable[] = {
			{"getLeftLightSensor", IoAppleSensors_getLeftLightSensor},
			{"getRightLightSensor", IoAppleSensors_getRightLightSensor},
			{"getDisplayBrightness", IoAppleSensors_getDisplayBrightness},
			{"setDisplayBrightness", IoAppleSensors_setDisplayBrightness},
			{"getKeyboardBrightness", IoAppleSensors_getKeyboardBrightness},
			{"setKeyboardBrightness", IoAppleSensors_setKeyboardBrightness},
			{"getCPUTemperature", IoAppleSensors_getCPUTemperature},
			{"getGPUTemperature", IoAppleSensors_getGPUTemperature},
			{"getPalmTemperature", IoAppleSensors_getPalmTemperature},
			{"getBatteryTemperature", IoAppleSensors_getBatteryTemperature},
			{"getPowerTemperature", IoAppleSensors_getPowerTemperature},
			{"getPCHTemperature", IoAppleSensors_getPCHTemperature},
			{"getRAMTemperature", IoAppleSensors_getRAMTemperature},
			//{"smsDetect", IoAppleSensors_smsDetect},
			{"smsVector", IoAppleSensors_smsVector},
			{NULL, NULL},
		};
		IoObject_addMethodTable_(self, methodTable);
	}

	return self;
}
开发者ID:Alessandroo,项目名称:io,代码行数:33,代码来源:IoAppleSensors.c

示例10: IoCFFIDataType_new

IoCFFIArray *IoCFFIArray_proto(void *state)
{
	IoObject *self = IoCFFIDataType_new(state);
	IoObject_tag_(self, IoCFFIArray_newTag(state));

	IoObject_setDataPointer_(self, io_calloc(1, sizeof(IoCFFIArrayData)));
	memset(DATA(self), 0, sizeof(IoCFFIArrayData));
	DATA(self)->needToFreeBuffer = 0;

	IoState_registerProtoWithFunc_(state, self, IoCFFIArray_proto);
	{
		IoMethodTable methodTable[] = {
			{"address", IoCFFIArray_address},
			{"asBuffer", IoCFFIArray_asBuffer},
			{"at", IoCFFIArray_at},
			{"atPut", IoCFFIArray_atPut},
			{"setValue", IoCFFIArray_setValue},
			{"size", IoCFFIArray_size},
			{"with", IoCFFIArray_with},
			{NULL, NULL},
		};
		IoObject_addMethodTable_(self, methodTable);
	}

	return self;
}
开发者ID:bomma,项目名称:io,代码行数:26,代码来源:IoCFFIArray.c

示例11: IoObject_new

IoODEHinge *IoODEHinge_proto(void *state)
{
	IoObject *self = IoObject_new(state);
	IoObject_tag_(self, IoODEHinge_newTag(state));

	IoODEJoint_protoCommon(self);

	IoState_registerProtoWithId_(state, self, protoId);

	{
		IoMethodTable methodTable[] = {
				ODE_COMMON_JOINT_METHODS
#define PARAM(X, _N, _SETN) \
		{#_N, IoODEHinge_##_N}, \
		{#_SETN, IoODEHinge_##_SETN},
PARAMS
#undef PARAM

		{"anchor", IoODEHinge_anchor},
		{"setAnchor", IoODEHinge_setAnchor},
		{"anchor2", IoODEHinge_anchor2},
		{"axis", IoODEHinge_axis},
		{"setAxis", IoODEHinge_setAxis},
		{"angle", IoODEHinge_angle},
		{"angleRate", IoODEHinge_angleRate},
				{"addTorque", IoODEHinge_addTorque},

		{NULL, NULL},
		};
		IoObject_addMethodTable_(self, methodTable);
	}
	return self;
}
开发者ID:ADTSH,项目名称:io,代码行数:33,代码来源:IoODEHinge.c

示例12: IoObject_new

IoMP3Decoder *IoMP3Decoder_proto(void *state)
{
	IoObject *self = IoObject_new(state);
	IoObject_tag_(self, IoMP3Decoder_newTag(state));
	
	IoObject_setDataPointer_(self, calloc(1, sizeof(IoMP3DecoderData)));
	
	//DATA(self)->outSound = 0x0;
	DATA(self)->willProcessMessage = IoMessage_newWithName_label_(state, IOSYMBOL("willProcess"), IOSYMBOL("[MP3Decoder]"));
	DATA(self)->didProcessMessage = IoMessage_newWithName_label_(state, IOSYMBOL("didProcess"), IOSYMBOL("[MP3Decoder]"));
	DATA(self)->inputBuffer  = IoSeq_new(state);
	DATA(self)->outputBuffer = IoSeq_new(state);
	DATA(self)->tmpInputBa = UArray_new();
	
	IoState_registerProtoWithFunc_(state, self, IoMP3Decoder_proto);
	
	{
		IoMethodTable methodTable[] = {
		{"start", IoMP3Decoder_start},
		{"stop",  IoMP3Decoder_stop},
		{"inputBuffer",  IoMP3Decoder_inputBuffer},
		{"outputBuffer",  IoMP3Decoder_outputBuffer},
		
		{NULL, NULL},
		};
		IoObject_addMethodTable_(self, methodTable);
	}
	return self;
}
开发者ID:Akiyah,项目名称:io,代码行数:29,代码来源:IoMP3Decoder.c

示例13: IoObject_new

IoAsyncRequest *IoAsyncRequest_proto(void *state)
{
	IoAsyncRequest *self = IoObject_new(state);
	IoObject_tag_(self, IoAsyncRequest_newTag(state));

	IoObject_setDataPointer_(self, calloc(1, sizeof(struct aiocb)));

	IoState_registerProtoWithFunc_(state, self, IoAsyncRequest_proto);

	{
		IoMethodTable methodTable[] = {
		{"setDescriptor", IoAsyncRequest_setDescriptor},
		{"descriptor", IoAsyncRequest_descriptor},
		{"numberOfBytes", IoAsyncRequest_numberOfBytes},
		{"read", IoAsyncRequest_read},
		{"write", IoAsyncRequest_write},
		{"isDone", IoAsyncRequest_isDone},
		{"error", IoAsyncRequest_error},
		{"cancel", IoAsyncRequest_cancel},
		{"sync", IoAsyncRequest_sync},
		{"copyBufferTo", IoAsyncRequest_copyBufferTo},
		{NULL, NULL},
		};
		IoObject_addMethodTable_(self, methodTable);
	}

	return self;
}
开发者ID:Akiyah,项目名称:io,代码行数:28,代码来源:IoAsyncRequest.c

示例14: IoObject_new

IoODEBox *IoODEBox_proto(void *state)
{
	IoObject *self = IoObject_new(state);
	IoObject_tag_(self, IoODEBox_newTag(state));

	IoObject_setDataPointer_(self, calloc(1, sizeof(IoODEBoxData)));

	GEOMID = 0;

	IoState_registerProtoWithId_(state, self, protoId);

	{
		IoMethodTable methodTable[] = {
		{"geomId", IoODEBox_geomId},
		{"lengths", IoODEBox_lengths},
		{"setLengths", IoODEBox_setLengths},
		{"pointDepth", IoODEBox_pointDepth},
		{"body", IoODEBox_body},
		{"setBody", IoODEBox_setBody},
		{"collide", IoODEGeom_collide},

		{NULL, NULL},
		};
		IoObject_addMethodTable_(self, methodTable);
	}
	return self;
}
开发者ID:ADTSH,项目名称:io,代码行数:27,代码来源:IoODEBox.c

示例15: IoObject_new

IoMP3Encoder *IoMP3Encoder_proto(void *state)
{
    IoObject *self = IoObject_new(state);
    IoObject_tag_(self, IoMP3Encoder_newTag(state));
    
    self->data = calloc(1, sizeof(IoMP3EncoderData));
    DATA(self)->outBuffer = IoBuffer_new(state);
    DATA(self)->encoder = MP3Encoder_new();
    MP3Encoder_setExternalOutputUArray_(DATA(self)->encoder, 
					   IoBuffer_rawUArray(DATA(self)->outBuffer));
    
    
    IoState_registerProtoWithFunc_(state, self, IoMP3Encoder_proto);
    
    {
	IoMethodTable methodTable[] = {
	{"encode", IoMP3Encoder_encode},
	{"end",  IoMP3Encoder_end},
	{"outBuffer",  IoMP3Encoder_outBuffer},
	{"setBitRate",  IoMP3Encoder_setBitRate},
	{"setSampleRate",  IoMP3Encoder_setSampleRate},
	{"setQuality",  IoMP3Encoder_setQuality},
	{"setCompressionRatio",  IoMP3Encoder_setCompressionRatio},
	{NULL, NULL},
	};
	IoObject_addMethodTable_(self, methodTable);
    }
    
    return self;
}
开发者ID:Akiyah,项目名称:io,代码行数:30,代码来源:IoMP3Encoder.c


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