C++ parser does not recognize following definition as
multiple variables, but instead takes name of a preceding
variable as type for the next one:
double AccumulatedSystem,
AccumulatedThread, AccumulatedKernel,
AccumulatedUser;
Out of these four variables it recognized only the last
one, AccumulatedUser, but of the type
AccumulatedKernel (despite coma in front of it).
Apart from that, it did not recognize any functions in the
class despite all of them preceding "bad" variables.
Here is the whole class:
class CTTElapsed
{
public:
CTTElapsed(bool bThreadTime = false);
~CTTElapsed();
static bool Initialize();
static bool MeasureOverhead(void);
void Start(void);
void Stop(void);
void Report(std::ostream& s) const;
void Report(char*) const;
__int64 GetHiResDifference(__int64
HRStart, __int64 HRStop);
double GetHiResElapsed(__int64
AccHiRes) const;
double GetElapsedFromSystemTime
(SYSTEMTIME SysStart, SYSTEMTIME SysStop);
double GetElapsedFromFileTime
(FILETIME FileStart, FILETIME FileStop);
DWORD dwThreadId,
dwThreadHandle;
HANDLE hThread;
static __int64 frequency;
static double HiResOverhead,
SystemOverhead;
int counter;
__int64 HiResStart, HiResStop;
SYSTEMTIME SystemStart, SystemStop;
FILETIME ThreadStart1, ThreadStop1,
ThreadKernel1, ThreadUser1;
FILETIME ThreadStart2, ThreadStop2,
ThreadKernel2, ThreadUser2;
__int64 AccumulatedHiRes;
double AccumulatedSystem,
AccumulatedThread, AccumulatedKernel,
AccumulatedUser;
};
Logged In: YES
user_id=126567
Sorry, the functions just did not show up after the parsing
process was finished. When the class was closed and open
again, they did show up. Still one of them is missing:
void Report(char*) const;
as well as const-ness of this one:
void Report(std::ostream& s) const;
Logged In: YES
user_id=126567
To force functions to show up, I had to drag the newly
created class (that was still showing up without them)
into "Data Model" area, and drop it there. After it "jumped"
back, it had the function (but still not all of them as per
previous comment). If I am allowed a question here, what is
this area for?
Thanks.
Logged In: YES
user_id=109050
To get the member functions to show, I just click on
the "Only Classes without Constructor" button on the toolbar
and then click it a second time and the functions appear.
I'm also aware that the parser doesn't do well with multiple
member declarations in a single statement. I don't like the
current parser it is just to difficult to modify, I'm hoping to
change the parser but I currently lack the time.
Gunner