Re: Keyword @defs
Re: Keyword @defs
- Subject: Re: Keyword @defs
- From: Oftenwrong Soong <email@hidden>
- Date: Sun, 29 Nov 2009 16:21:06 -0800 (PST)
James,
What exactly is this @defs keyword supposed to do?
-Soong
----- Original Message ----
From: James Pengra <email@hidden>
To: email@hidden
Sent: Sun, November 29, 2009 4:07:11 PM
Subject: Keyword @defs
Consider the following situation I found in a Cocoa program to simulate a sine wave generator:
The class Foo has a number of variables defined in its header. In the code file Foo.m, and.preceding the @implementation block, the following structure is defined:
typedef struct
{
@defs(Foo);
} getFoo;
Also preceding the @implementation is a C procedure called IOProc which is the call-back procedure used in audio processing. IOProc contains a pointer def defined as
getFoo *def;
which is used to get at Foo's variables with statements like def->varname.
The latest version of Xcode (v.3.2) does not permit use of the @defs keyword.
Does anyone know of a work around I might use so that IOProc can get access to Foo's variables? IOProc fills the input buffer with data which defines the audio signal. The bulk of the code in Foo (in the @implementation block) initializes Core Audio and handles the start and stop of the sound.
Thanks for any ideas.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden