Archived:Getting the name of the current function in Symbian C++
Archived: This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. If you think this article is still relevant, let us know by adding the template {{ReviewForRemovalFromArchive|user=~~~~|write your reason here}}.
Article Metadata
Tested with
Devices(s): All (S60)
Compatibility
Platform(s): S60 3rd Edition
Article
Keywords: RDebug, __func__
Created: User:Technical writer 2
(June 25, 2007, updated December 17, 2008)
Last edited: hamishwillee
(29 Jun 2012)
The name of the current function can be retrieved for logging purposes in debug builds with the __func__ predefined identifier:
void LogFunctionName(const char* name)
{
RDebug::Printf("current function: %s\n", name);
}
Now the function name can be printed as follows:
LogFunctionName(__func__);
See also
Simple-to-use Symbian C++ macros for writing debug log files


(no comments yet)