Function definition in multiple modules

Martin Drasar drasar at ics.muni.cz
Thu Mar 29 01:33:03 PDT 2012


Hi,

I have a class that implements a lot of interfaces and I would like to
separate the definition into different files, i.e. implementation of one
interface in one file. Something akin to this C++ code:

a.cpp:

class A
{
  void b();
  void c();
};

b.cpp:

void A::b() {}

c.cpp:

void A::c() {}

Is there a way to do it in D easily? Do I have to use UFCS?

Thanks,
Martin


More information about the Digitalmars-d-learn mailing list