I hope I'm wording my question properly, but what I'm trying to do is actually rather trivial.
I have a bunch of code with static object instantiation that looks like this:
Foo *aFoo1 = [[[Foo alloc] init] autorelease];
[anArray addObject:aFoo1];
Foo *aFoo2 = [[[Foo alloc] init] autorelease];
[anArray addObject:aFoo2];
I simply want to move all of that instantiation + population of anArray into a separate header file, and just include the header file where it's needed without the overhead of creating a new class to manage these instantiations. I just want to include the header file and get access to anArray once it's done adding all of the above objects and stuff it somewhere else. Is there anyway I can turn the above into a macro? Ideally I'll have all of this in a database soon, query the db, and instantiate the result set. Either way, I'm curious what the answer to this is in the format it's currently written in.