Re: Split class declaration and definition

2014-07-31 Thread FreeSlave via Digitalmars-d-learn
On Thursday, 31 July 2014 at 11:34:38 UTC, Kozzi11 wrote: Is possible to somehow split class declaration and definition. I mean something like this: class C { void hello(); // just prototype } class C { void hello() { //actual code } } or something like this void

Re: Split class declaration and definition

2014-07-31 Thread Kozzi11 via Digitalmars-d-learn
On Thursday, 31 July 2014 at 11:41:07 UTC, FreeSlave wrote: On Thursday, 31 July 2014 at 11:34:38 UTC, Kozzi11 wrote: Is possible to somehow split class declaration and definition. I mean something like this: class C { void hello(); // just prototype } class C { void hello() {

Re: Split class declaration and definition

2014-07-31 Thread bearophile via Digitalmars-d-learn
Kozzi11: Is possible to somehow split class declaration and definition. I mean something like this: class C { void hello(); // just prototype } class C { void hello() { //actual code } } or something like this void C.hello() { //actual code } I think this is

Re: Split class declaration and definition

2014-07-31 Thread Kagamin via Digitalmars-d-learn
On Thursday, 31 July 2014 at 12:02:22 UTC, Kozzi11 wrote: module m; @someUda class C { void someFun(); } @someUda class D { void anotherFun(); } mixin(generateFunDefForClassesWithSomeUda!m); This is usually done by generating functions in the classes directly. class C { mixin

Re: Split class declaration and definition

2014-07-31 Thread Daniel Kozak via Digitalmars-d-learn
V Thu, 31 Jul 2014 13:26:38 + Kagamin via Digitalmars-d-learn digitalmars-d-learn@puremagic.com napsáno: On Thursday, 31 July 2014 at 12:02:22 UTC, Kozzi11 wrote: module m; @someUda class C { void someFun(); } @someUda class D { void anotherFun(); }