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
 Feature Requests
 $PROJECT$ VA Snippet Macro
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Dunemaster
New Member

Russia
8 Posts

Posted - Jul 22 2014 :  04:47:01 AM  Show Profile  Reply with Quote
Hi!

We have a guidline that requires to put the contents of header files inside include guard of the following pattern:

#pragma once

#ifndef __{PROJECT}_$FILE_BASE_UPPER$_H__
#define __{PROJECT}_$FILE_BASE_UPPER$_H__

$selected$
#endif // __{PROJECT}_$FILE_BASE_UPPER$_H__

unfortunately, I could not find a project macro in VA snippet editor.

This small addition will be much appreciated.
Thanks.

feline
Whole Tomato Software

United Kingdom
18721 Posts

Posted - Jul 23 2014 :  11:27:24 PM  Show Profile  Reply with Quote
Unfortunately no, you cannot currently do this directly, but we are considering adding this ability:

case=969

For now, have you considered prompting for the Project name, so use the Snippet:


#pragma once

#ifndef __{$PROJECT$}_$FILE_BASE_UPPER$_H__
#define __{$PROJECT$}_$FILE_BASE_UPPER$_H__

$selected$
#endif // __{$PROJECT$}_$FILE_BASE_UPPER$_H__


By using "$PROJECT$" instead of "PROJECT" VA will prompt you for the project name, which will then be inserted into the Snippet code. You do have to type in the project name manually, but only the once.

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

Dunemaster
New Member

Russia
8 Posts

Posted - Jul 24 2014 :  01:05:36 AM  Show Profile  Reply with Quote
quote:
Originally posted by feline

For now, have you considered prompting for the Project name, so use the Snippet:


#pragma once

#ifndef __{$PROJECT$}_$FILE_BASE_UPPER$_H__
#define __{$PROJECT$}_$FILE_BASE_UPPER$_H__

$selected$
#endif // __{$PROJECT$}_$FILE_BASE_UPPER$_H__


By using "$PROJECT$" instead of "PROJECT" VA will prompt you for the project name, which will then be inserted into the Snippet code. You do have to type in the project name manually, but only the once.



Thanks for the tip, Feline!
Go to Top of Page

sean
Whole Tomato Software

USA
2817 Posts

Posted - Sep 19 2014 :  12:34:48 AM  Show Profile  Reply with Quote
case=969 is implemented in build 2047
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