• RSS Feed

Create Method Implementations

Create Method Implementations provides C/C++ users with an efficient mechanism for creating implementation stubs for all of the methods in a class declaration. (Create Method Implementations is similar to Create Implementation, which can be invoked from the declaration of a single method.)

With Create Method Implementations, parameters between declarations and implementations are certain to be consistent, and the format of the implementations will be consistent with user preferences.

The following example is of a class declaration in C++ whose methods can be implemented.

Move to a class declaration and select Create Method Implementations from a refactoring menu, e.g. the Quick Refactoring Menu (Shift+Alt+Q).

Select the methods to implement.

Implementations are created in the appropriate source file if it can be found, e.g. MyClass.cpp for MyClass.h. If not, implementations are created below the declaration, and can be moved manually.

Existing Implementations

If a method is already implemented, it is excluded from the selection dialog.

In the following example, Bar() is excluded.

Format of Implementations

Modify the format of newly created implementations, e.g. to remove spacing around parentheses, by editing the VA Snippet for Create Implementation. There are separate VA Snippets for separate languages.

The following is the default VA Snippet for Create Implementation in C++.

Location of Implementations

By default, Visual Assist places new implementations near those of neighboring declarations. Alternatively, Visual Assist can create implementations at the EOF of a source file. Specify your preference in the options dialog for Visual Assist.