New person here....

Lots of code examples for C++ classes (and preprocessor directives) in the library code. Look in the directory hardware/libraries

Preprocessor directives work as expected in external C++ files like those libraries, but are a little different in a sketch because the build process does some auto-prototypeing and include core arduino headers – this sometimes does some unexpected things to code that goes beyond the standard arduino constructs.

The build process is documented in a page linked in my earlier post. You can look at the resultant code by using a utility call avr-objdump (its in the hardware\tools\avr\bin directory) google should yield more info on how to use it.