discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: splitting a class in pieces, compile-time dependent


From: MicheleBert .
Subject: Re: splitting a class in pieces, compile-time dependent
Date: Fri, 26 Jul 2013 09:59:06 +0200

2013/7/23 Riccardo Mottola <riccardo.mottola@libero.it>:
> I want to find  a good way to split this in MyClass-A, MyClass-B, etc by
> adding the least possible logic and especially keeping everything static ad
> build time (not runtime).

I am not sure I understood well, but I can guess a suggestion?
Could be done something like following? (I write in C++, but I think
there is an objc equivalent)

class MyClassSpecific
{
#if defined(_A_)
 <A stuff>
#elif defined(_B_)
  <B stuff>
#endif
};

class MyClass : public MyClassSpecific
{
  <common stuff>
};


-- 
Michele



reply via email to

[Prev in Thread] Current Thread [Next in Thread]