Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 Creating method nodes
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Kelby
Junior Member

USA
10 Posts

Posted - Feb 02 2021 :  06:04:26 AM  Show Profile  Reply with Quote
My .cpp files sometimes have a collapsable heading n VA Outline that will have the class name followed by "methods." I think these may be called method nodes, although I could be confused about that. These would be handy if I could figure out how to use them. How do I create and name these things?

Kelby

feline
Whole Tomato Software

United Kingdom
18748 Posts

Posted - Feb 02 2021 :  07:21:41 AM  Show Profile  Reply with Quote
VA Outline groups items together with a parent node when there are several similar items in a row. For methods, if you have several class member methods in a row, then they will all be grouped together under the "CLASS_NAME methods" parent node. This is helpful if you have methods from more than one class in the same cpp file.

If you want more direct control, if you right click in VA Outline and make sure you have "Display Regions" turned On.

In C++ you can introduce a region like this:

#pragma region PRAGMA_REGION
static void functionInsidePragmaRegion()	{ }
static int secondFunctionInsidePragmaRegion()	{ return -1; }
#pragma endregion PRAGMA_REGION

both functions will be shown with the region parent node.

If you want to add regions into VA Outline easily, select one or more entries in VA Outline, then:

Right click -> Surround With -> #pragma region ... #pragma endregion

to surround them. You will then be prompted to name the region, since a region without a name is a lot less informative than a region with a name.

If you are using regions you can also collapse them in the editor, via the "Edit menu -> Outlining" commands.

zen is the art of being at one with the two'ness
Go to Top of Page

Kelby
Junior Member

USA
10 Posts

Posted - Feb 02 2021 :  07:23:46 AM  Show Profile  Reply with Quote
This is very helpful; thank you!

Kelby
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000