示例#1
0
文件: IoVorbisBlock.c 项目: anthem/io
IoVorbisBlock *IoVorbisBlock_rawClone(IoVorbisBlock *proto)
{
    IoObject *self = IoObject_rawClonePrimitive(proto);
    vorbis_block* data = calloc(1, sizeof(vorbis_block));
    IoObject_setDataPointer_(self, data);
    return self;
}
示例#2
0
IoTokyoCabinetPrefixCursor *IoTokyoCabinetPrefixCursor_rawClone(IoTokyoCabinetPrefixCursor *proto)
{
	IoObject *self = IoObject_rawClonePrimitive(proto);
	IoObject_tag_(self, IoObject_tag(proto));
	IoObject_setDataPointer_(self, tcbdbnew());
	return self;
}
示例#3
0
文件: IoList.c 项目: doublec/io
IoList *IoList_rawClone(IoList *proto)
{
	IoObject *self = IoObject_rawClonePrimitive(proto);
	IoObject_tag_(self, IoObject_tag(proto));
	IoObject_setDataPointer_(self, List_clone(DATA(proto)));
	return self;
}
示例#4
0
文件: IoSkipDB.c 项目: anthem/io
IoSkipDB *IoSkipDB_rawClone(IoSkipDB *proto)
{
	IoObject *self = IoObject_rawClonePrimitive(proto);
	IoObject_tag_(self, IoObject_tag(proto));
	IoObject_setDataPointer_(self, NULL);
	return self;
}
示例#5
0
文件: IoOggPacket.c 项目: Akiyah/io
IoOggPacket *IoOggPacket_rawClone(IoOggPacket *proto)
{
	IoObject *self = IoObject_rawClonePrimitive(proto);
	ogg_packet* data = calloc(1, sizeof(ogg_packet));
	IoObject_setDataPointer_(self, data);
	return self;
}
示例#6
0
文件: IoSHA1.c 项目: ADTSH/io
IoSHA1 *IoSHA1_rawClone(IoSHA1 *proto)
{
	IoObject *self = IoObject_rawClonePrimitive(proto);
	IoObject_setDataPointer_(self, calloc(1, sizeof(IoSHA1Data)));
	SHA1Init(&(DATA(self)->context));
	return self;
}
示例#7
0
文件: IoDuration.c 项目: ADTSH/io
IoDuration *IoDuration_rawClone(IoDuration *proto)
{
	IoObject *self = IoObject_rawClonePrimitive(proto);
	IoObject_setDataPointer_(self, Duration_new());
	Duration_copy_(DATA(self), DATA(proto));
	return self;
}
示例#8
0
文件: IoClutterColor.c 项目: BMeph/io
IoClutterColor *IoClutterColor_rawClone(IoClutterColor *proto) {
  IoClutterColor *self = IoObject_rawClonePrimitive(proto);

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

  return self;
}
示例#9
0
文件: IoSkipDBM.c 项目: anthem/io
IoSkipDBM *IoSkipDBM_rawClone(IoSkipDBM *proto)
{
	IoObject *self = IoObject_rawClonePrimitive(proto);
	IoObject_tag_(self, IoObject_tag(proto));
	IoObject_setDataPointer_(self, SkipDBM_new());
	return self;
}
// _rawClone clones the existing proto passed as the only argument
IoObject *IoCInvokeStructureInstance_rawClone(IoCInvokeStructureInstance *proto)
{
        IoObject *self = IoObject_rawClonePrimitive(proto);
        IoObject_setDataPointer_(self, calloc(1, sizeof(IoCInvokeStructureInstanceData)));

        return self;
}
示例#11
0
IoTheoraDecodeContext *IoTheoraDecodeContext_rawClone(IoTheoraDecodeContext *proto)
{
	IoObject *self = IoObject_rawClonePrimitive(proto);
	IoTheoraDecodeContextData* data = calloc(1, sizeof(IoTheoraDecodeContextData));
	IoObject_setDataPointer_(self, data);
	return self;
}
示例#12
0
IoCairoFontOptions *IoCairoFontOptions_rawClone(IoCairoFontOptions *proto)
{
	IoCairoFontOptions *self = IoObject_rawClonePrimitive(proto);
	if (OPTIONS(proto))
		IoObject_setDataPointer_(self, cairo_font_options_copy(OPTIONS(proto)));
	return self;
}
示例#13
0
文件: IoCFunction.c 项目: doublec/io
IoCFunction *IoCFunction_rawClone(IoCFunction *proto)
{
	IoObject *self = IoObject_rawClonePrimitive(proto);
	IoObject_setDataPointer_(self, cpalloc(DATA(proto), sizeof(IoCFunctionData)));
	IoObject_isActivatable_(self, 1);
	return self;
}
示例#14
0
文件: IoAudioMixer.c 项目: ADTSH/io
IoAudioMixer *IoAudioMixer_rawClone(IoAudioMixer *proto) 
{ 
	IoObject *self = IoObject_rawClonePrimitive(proto);
	self->data = cpalloc(proto->data, sizeof(IoAudioMixerData));
	
	DATA(self)->ioBuffer = IoSeq_new(IOSTATE);
	DATA(self)->buffer = IoSeq_rawUArray(DATA(self)->ioBuffer);
	DATA(proto)->mixBuffer = UArray_new();
	DATA(self)->writeMessage = 
		IoMessage_newWithName_label_(IOSTATE, 
							    IOSYMBOL("write"), 
							    IOSYMBOL("AudioMixer"));
	IoMessage_setCachedArg_to_(DATA(self)->writeMessage, 0, DATA(self)->ioBuffer);
	
	DATA(self)->nonBlockingWriteMessage = 
		IoMessage_newWithName_label_(IOSTATE, 
							    IOSYMBOL("nonBlockingWrite"), 
							    IOSYMBOL("AudioMixer"));
	IoMessage_setCachedArg_to_(DATA(self)->nonBlockingWriteMessage, 0, DATA(self)->ioBuffer);
	
	DATA(self)->sounds = List_new();
	DATA(self)->soundsToRemove = List_new();
	DATA(self)->events = List_new();
	DATA(self)->activeEvents = List_new();
	DATA(self)->volume = DATA(self)->volume;
	
	DATA(self)->soundTouch = SoundTouch_init();
	SoundTouch_setSampleRate(DATA(self)->soundTouch, 44100);
	SoundTouch_setChannels(DATA(self)->soundTouch, 2);
	DATA(self)->tempo = 1.0;
	IoState_addValue_(IOSTATE, self);
	return self; 
}
示例#15
0
IoTheoraSetupInfo *IoTheoraSetupInfo_rawClone(IoTheoraSetupInfo *proto)
{
	IoObject *self = IoObject_rawClonePrimitive(proto);
	th_setup_info** data = calloc(1, sizeof(th_setup_info*));
	IoObject_setDataPointer_(self, data);
	return self;
}
IoCInvokeStructure *IoCInvokeStructure_rawClone(IoCInvokeStructure *proto)
{
	IoObject *self = IoObject_rawClonePrimitive(proto);
	IoObject_setDataPointer_(self, calloc(1, sizeof(IoCInvokeStructureData)));
    IoObject_setSlot_to_(self, IOSYMBOL("memberTypes"), IoMap_new(IOSTATE));
	return self;
}
示例#17
0
文件: IoCertificate.c 项目: anthem/io
IoCertificate *IoCertificate_rawClone(IoCertificate *proto) 
{ 
	IoObject *self = IoObject_rawClonePrimitive(proto);
	IoObject_setDataPointer_(self, CERTIFICATE(proto));
	//need to do more work for the copy to be correct
	return self; 
}
示例#18
0
文件: IoDate.c 项目: bomma/io
IoDate *IoDate_rawClone(IoDate *proto)
{
	IoObject *self = IoObject_rawClonePrimitive(proto);
	IoObject_setDataPointer_(self, Date_new());
	Date_copy_(DATA(self), DATA(proto));
	return self;
}
示例#19
0
文件: IoDBI.c 项目: BMeph/io
IoDBI *IoDBI_rawClone(IoDBI *proto)
{
	IoDBI *self = IoObject_rawClonePrimitive(proto);
	IoObject_setDataPointer_(self, calloc(1, sizeof(IoDBIData)));
	DATA(self)->driverCount = 0;
	return self;
}
示例#20
0
IoCairoSurfacePattern *IoCairoSurfacePattern_rawClone(IoCairoSurfacePattern *proto)
{
	IoObject *self = IoObject_rawClonePrimitive(proto);
	if (PATTERN(proto))
		IoObject_setDataPointer_(self, cairo_pattern_reference(PATTERN(proto)));
	return self;
}
示例#21
0
文件: IoRegex.c 项目: ADTSH/io
IoRegex *IoRegex_rawClone(IoRegex *proto)
{
	IoObject *self = IoObject_rawClonePrimitive(proto);
	IoObject_setDataPointer_(self, calloc(1, sizeof(IoRegexData)));
	DATA(self)->pattern = IOREF(DATA(proto)->pattern);
	return self;
}
示例#22
0
文件: IoZlibEncoder.c 项目: ADTSH/io
IoZlibEncoder *IoZlibEncoder_rawClone(IoZlibEncoder *proto)
{
	IoObject *self = IoObject_rawClonePrimitive(proto);
	IoObject_setDataPointer_(self, calloc(1, sizeof(IoZlibEncoderData)));
	DATA(self)->strm = calloc(1, sizeof(z_stream));
	return self;
}
示例#23
0
IoCairoLinearGradient *IoCairoLinearGradient_rawClone(IoCairoLinearGradient *proto)
{
    IoObject *self = IoObject_rawClonePrimitive(proto);
    if (PATTERN(proto))
        IoObject_setDataPointer_(self, cairo_pattern_reference(PATTERN(proto)));
    return self;
}
示例#24
0
文件: IoYajlGen.c 项目: Akiyah/io
IoYajlGen *IoYajlGen_rawClone(IoYajlGen *proto)
{
	IoObject *self = IoObject_rawClonePrimitive(proto);
	yajl_gen_config config = { 0, "" };
	IoObject_setDataPointer_(self, yajl_gen_alloc(&config, NULL));
	return self;
}
示例#25
0
IoCairoFontFace *IoCairoFontFace_rawClone(IoCairoFontFace *proto)
{
	IoObject *self = IoObject_rawClonePrimitive(proto);
	if (FACE(proto))
		IoObject_setDataPointer_(self, cairo_font_face_reference(FACE(proto)));
	return self;
}
示例#26
0
IoCairoSVGSurface *IoCairoSVGSurface_rawClone(IoCairoSVGSurface *proto)
{
	IoObject *self = IoObject_rawClonePrimitive(proto);
	if (SURFACE(proto))
		IoObject_setDataPointer_(self, cairo_surface_reference(SURFACE(proto)));
	return self;
}
示例#27
0
文件: IoRandom.c 项目: Akiyah/io
IoNumber *IoRandom_rawClone(IoRandom *proto)
{
	IoObject *self = IoObject_rawClonePrimitive(proto);
	IoObject_setDataPointer_(self, RandomGen_new());
	RandomGen_chooseRandomSeed(DATA(self));
	return self;
}
示例#28
0
文件: IoODEMass.c 项目: AlexGensek/io
IoODEMass *IoODEMass_rawClone(IoODEMass *proto)
{
	IoObject *self = IoObject_rawClonePrimitive(proto);
	IoObject_setDataPointer_(self, calloc(1, sizeof(IoODEMassData)));
	memcpy(DATA(self), DATA(proto), sizeof(IoODEMassData));
	return self;
}
示例#29
0
文件: IoCall.c 项目: Akiyah/io
IoCall *IoCall_rawClone(IoCall *proto)
{
	IoObject *self = IoObject_rawClonePrimitive(proto);
	IoObject_setDataPointer_(self, cpalloc(IoObject_dataPointer(proto), sizeof(IoCallData)));
	//printf("IoCall_rawClone() %p|%p\n", (void *)self, IoObject_dataPointer(self));
	IoCall_initSlots(self);
	return self;
}
示例#30
0
文件: IoCFFIPointer.c 项目: akimd/io
IoCFFIPointer *IoCFFIPointer_rawClone(IoCFFIPointer *proto)
{
	IoObject *self = IoObject_rawClonePrimitive(proto);
	IoObject_setDataPointer_(self, calloc(1, sizeof(IoCFFIPointerData)));
	memset(DATA(self), 0, sizeof(IoCFFIPointerData));
	DATA(self)->valuePointer = &(DATA(self)->ptr);
	return self;
}