No, and that’s exactly the issue.
Modifying the base class means that is will be hard to maintain when merging cocos2d-iphone changes (well the class is not so big, but still).
The problem is:
CCParallaxNode.cpp defines a local internal class (not exported, not visible from the outside of the file).
This internal class is needed by the extension code, and inheriting the CCParallaxNode does not expose this class.
One solution would be to duplicate and rename the CCParallaxNode.cpp file in third_party extension folder, add the new code, and people who want to use it, use this new defined class. But any change to the base class (in cocos2d-iphone) would need to be merge in the new file too… which might not be easier than merging the changes directly.
The extension code I added is very simple, it’s just a new method to the class, easy to maintain, but it depends on how you merge code from cocos2d-iphone.
On a side note, I don’t fully master c++ language, so maybe there is a way to extend a class without inheritting it, I don’t know (I search and couldn’t find a way, but maybe).