C++/CLI Properties

Tom · Thursday, Apr 10, 2008, 8:11 PM · Krehbiel Tech

Properties in C++/CLI are great and all, but, um, what if I want to put my class implementation in a different file from the class definition? You know, like, oh, every C++ program ever made in the entire history of the world. Microsoft even encourages the separation of definition from implementation by creating a .cpp and a .h file when you make the new managed class. I guess Microsoft figured we would just put the whole class implementation into the .h file while leaving the .cpp file empty. Yeah, that makes perfect sense... if you're on crack.

This rant came about because I was trying to implement a setter property (in the class.h file) that referenced some functions in another class. This resulted in all kinds of errors because at that point in the compilation, the setter did not understand anything about the implementation of the other class. You'd think that would be easy to fix by moving the property implementation into the class.cpp file where it belongs, but you'd be wrong because you can't do that. Blah.

Cross-posted to http://krehbieltech.blogspot.com/2008/04/ccli-properties.html

C++(2)

There have not been any comments on this post.

Comments are no longer being accepted on this post. To minimize the effort of dealing with comment spam, comments are automatically closed on older posts. The administrator may also close comments at his discretion.