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
 Documentation for AutoText: Create Implementation
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

d_p_robinson
Junior Member

United Kingdom
21 Posts

Posted - Oct 13 2006 :  04:33:18 AM  Show Profile  Reply with Quote
The documentation for Create Implementation autotext only lists the special symbols:

$SymbolContext$
$SymbolType$
$ParameterList$
$MethodQualifier$
$MethodBody$

I found that $SymbolName$ can also be used if needed (as we do for creating trace statements) for the method name on its own. Perhaps this should be added to the documentation.

feline
Whole Tomato Software

United Kingdom
18943 Posts

Posted - Oct 13 2006 :  08:15:25 AM  Show Profile  Reply with Quote
are you aware of __FUNCTION__ ? this certainly exists in VS2005, but I am not sure which other IDE's. Personally I use a mixture of __FILE__, __LINE__ and __FUNCTION__ when inserting logging into my code.

depending on the changes you have made to Create Implementation you may get unexpected side effects, since this autotext rule is also used by Move Implementation to Source File.

Are you automatically adding a trace to every function that is created? That sounds like quite a lot of trace statements, even to me, and I have been known to insert a staggering number into my code when debugging nasty problems

What about an autotext rule to insert a trace statement?

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

jpizzi
Tomato Guru

USA
642 Posts

Posted - Oct 13 2006 :  10:43:29 PM  Show Profile  Reply with Quote
I believe that the OP is simply suggesting to add the $SymbolName$ "special symbol" to the documentation on the web page for Create Implementation.

Joe Pizzi
Go to Top of Page

d_p_robinson
Junior Member

United Kingdom
21 Posts

Posted - Oct 16 2006 :  04:36:50 AM  Show Profile  Reply with Quote
I was indeed only suggesting adding the relevant sumbols to the documentation.
I was not aware of the __FUNCTION__ macro - it loks very useful but we're still on VC6 and Wind River (ex Diab) cross-compiler, so it's probably not much use.
The tracing/error reporting mechanism that we use goes like this:
<start of file>
#define CLASS_NAME "SomeClass"
<each function>
SomeClass::someFunction()
{
#undef OPERATION_NAME
#define OPERATION_NAME "someFunction"
}

Inside the function we can then use macros such as ERROR_LOG (printf-style args):
#define ERROR_LOG (...) Log (CLASS_NAME OPERATION_NAME text, va_args)
DEBUG_CATCH_BLOCK
catch (const std::exception &ex)
{
ERROR_LOG ("%s", ex.what ());
}

And so on.

The overhead is extra code that may not be used.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18943 Posts

Posted - Oct 16 2006 :  10:42:32 AM  Show Profile  Reply with Quote
this makes more sense now

plus, any "unexpected" overlap caused by one refactoring autotext rule being used for more than one refactoring operation will help, rather than hinder.

as for updating the documentation, I wonder how common this sort of thing is.

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

jpizzi
Tomato Guru

USA
642 Posts

Posted - Oct 16 2006 :  10:49:35 PM  Show Profile  Reply with Quote
I have put in a request to update the documentation. I don't believe that the frequency of this particular use of the variable is relevant.

case=3069

Joe Pizzi
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