Visual Sidekick 3 Help
Contents Page

Code Generation

Overview

Visual Sidekick extends Visual Studio's code-generation features by allowing C++ function bodies to be easily generated directly from header-file member declarations. This provides a fast alternative means to write code without using any code generation dialogs.

Code Generation from the Visual Studio editor

To generate function body stubs from inside the Visual Studio editor, write the C++ function specification in the class specification (header file). Switch to the implementation file, and position the cursor at the function body insertion point. Hit Ctrl-Shift-G to generate the code.

Visual Sidekick determines the methods to generate code for, by examining all function specifications in all associated files of the current Visual Studio editor. Function body stubs are generated for all function specifications that do not have function bodies.

Code Generation from the Browse Tree

Function body stubs can also be generated from the Visual Sidekick Browse Tree.

Position the Visual Studio editor at the code generation insertion point. Select the class in the Browse Tree that has unimplemented method bodies, and from the context menu (right click) choose Paste Function Body Stubs . Function body stubs will be generated for all methods that have not yet been implemented.

Paste Function Body Stub may also be selected on any method specification or body. This will generate a body stub for the method at the current insertion point (independent of whether one exists in the solution or not).

Code Generation Style

The style of the generated code can be controlled via the  VSK/ Configure/ Global Options... menu option. See the Configuration page for more information.