Up to: Mika Raento's Symbian Programming pages
Splitting the interface and implementation of a C++ class is a good idea for two reasons:
Stroustrup describes the basic method and rationale for the split. The idea is that you provide an abstract base class in your header file with only those methods defined you want to be public, a factory method, and only the headers included needed. Then in your cpp file you define an implementation class that inherits from the abstract one, create an object of this class in the factory method and include all the headers needed for the implementation. The ideas work really well for Symbian as well, with a couple of restrictions and notes.
See mms.h and mms.cpp for an example of a class that really benefits from this split. It has a lot of members, functions and includes that the implementation needs while the interface is really simple (note that it doesn't compile out-of-the box since it needs some additional headers from our project).
The symbian specific things to note are:
It's a really good idea to do this from the beginning and for all classes in a larger project. We didn't realize that and do suffer from overlong compile times as a result. I find it pretty weird that the Symbian headers are not structured this way, as it would both help compile times and serve as a good example for others.
Of course this doesnt' work when you are meant to derive from the class provided. So consider this to be Symbian-speak for Java's final.
By the way: I don't think that forward declarations a reasonable alternative. If you do the split as shown here, you only need to include headers in .h file for those classes that are used in your method parameters - which shouldn't be that many, and as the class which uses your header most probably has to include their real definitions the speedup isn't that great (the include-guard will keep the file from being processed and it's probably in the cache). And since all your other classes are split the same way, the header dependencies should be much more shallow, and the reading of a few system headers won't kill the single unit being compiled. You can use forward declarations in the cases where you need to squeeze out the last bit of overhead.
Mika Raento, mikie(at)iki.fi