defining a class across multiple mc files for device specific functions

Is there any way to break a class across multiple files without using inheritance. Some languages have a "partial class" concept. There are a couple functions in a class I want to have be device specific so want to have a separate .mc in the device specific sub-directory defining those functions for the class.

I can relatively easily do it using inheritance but it seems cleaner to me, for this task, to just define a partial class.
  • Related to this, I swore there was a way to do device or family specific source files, similar to resources. So under the sources folder, having a folder like source-rectangle-282x470, and any .mc files under that only being included for those devices. Am I just smoking something that I thought that was possible? I can't find the thread related to this I thought I once read.
  • In the past there were build file excludes (which was kind of the opposite, in that you'd say what NOT to include), but now you can do this with jungles. Specific source files based on device/family, and you can also have annotations in source files the same way.
  • Hi ekutter, I agree with Jim - Jungles are a great way to do some of the things you are suggesting :) ... you can include source files based off of device / family qualifiers and / or exclude source code based off of annotations (which can be specified based off of device / family qualifiers as well). I suggest taking a look at the Jungles section of the Programmer's Guide for more guidance here.

    In regards to your other question, no, we do not allow you to break up a class across multiple source files. However, there is no such limitation on modules in case that helps you accomplish what you are trying to do.