Create Declaration and Create Implementation (C++)

From RAD Studio
Jump to: navigation, search

Go Up to Refactor Menu

Create Declaration

Refactor > Create Declaration

The Create Declaration feature creates a missing method declaration.

To use this feature, follow the steps below:

  1. Place the cursor in the name of the method for which you want to create its declaration.
  2. Go to the Refactor option of the main menu.
  3. Select Create Declaration.
Note: You can also access this feature in the Editor context menu by right-clicking the method for which you want to create its declaration selecting Refactor > Create Declaration.

For example, in a .cpp file, you could write a new method implementation:

String std::vector(int index) {
}

In the code editor, place your cursor in vector (the text) and invoke Create Declaration. The class std gets a new method vector.

Create Implementation

Refactor > Create Implementation

The Create Implementation feature creates a missing method implementation.

To use this feature, follow the steps below:

  1. Place your cursor inside the method name in the class to create its implementation.
  2. Go to the Refactor option of the main menu.
  3. Select Create Implementation.
Note: You can also access this feature in the Editor context menu by right-clicking the method for which you want to create its implementation and selecting Refactor > Create Implementation.

For example, in a class declaration, you can write a new method and create its implementation by placing your cursor inside the class and invoking Create Implementation.

Create Implementation I.gif

In the animated GIF case, if you place your cursor in the Bar method, you create an empty Foo::Bar method, in the corresponding .cpp file.

See Also