Zoom C++ Class WizardThis wizard is a very comfortable way to create classes in C++ projects. It is supporting features most of the built-in wizards do not have:
version 1.2 update: I added a field to specify a superclass, and create Qt specific classes. UsageYou find the wizard in the "Tools" menu, "Create New Class...".Before you start the wizard, there has to be at least one open C++ project. 1. First make sure the correct project is selected (green), and choose the destination directory of your class: The directory structure is automatically mapped to the namespace. Your project need at least the "src" subdirectory which is the root of all your source files. The "src" directory is automatically the root namespace, unless you change the settings in the "Advanced" tab. 2. Enter your class name. A red error indicator will show you any naming conflict for the choosen directory. 3. Verify in the preview fields if the result is what you expect. 4. Press "Create Class" to create button to create the class and and the files to your project. Settings (Advanced Tab)A: Choose if the wizard shall create default constructors and destructors for you. B: Choose if an include for precompiled headers shall be added to the generated files. C: Select the root of the namespace. You can either choose to use the name of your project as root namespace which represents your "src" directory or enter a custom name. For libraries it is in many cases better to create a subdirectory with the library base namespace in the "src" directory. That way it is much easier to map the include files to the right directory structure. D: Here you can change the way how the source shall get formated. Just watch the preview to see the different possibilities. E: If you need some extra uniqueness of your guard name. You can choose to prefix the guard name with the project name. Feedback and QuestionsFor feedback, questions or suggestions please use the "discussion" feature on this website. BackgroundI developed this wizard for myself as quick hack years ago for visual studio 6, because there was no usable wizard to create the whole structure for new C++ classes. Years later, there is still no usable wizard to create new C++ classes. By preparing the files with all necessary comments, I can save a lot of time, and really quickly create new classes. Sometimes I wonder, how other C++ developers which are using VS are creating new classes. The wizard is still a quick hack, it has no beauty - neither in the code nor in the UI. |