On Thu, 13 Mar 2003, Stanislav Kaushanskiy wrote:
> when calling Member::Name() on a member function object
> I get a ptree with the name of the method, but when I try to
> call Environment::GetLineNumber on this ptree, I get a:
> file: unknown
>
> // code:
> // m is a Member object representing a method
> env -> GetLineNumber(m.Name())->Display();
>
> Output:
> unknown
>
>
> If I call Environment::GetLineNumber on a member.FunctionBody()
> I get a valid file and line number.
>
> any ideas?
I think this was addressed on this forum several weeks ago. Try searching
the archive at SF. In a few words: you have descend through the leftmost
path in Ptree to the first Leaf node and call GetLineNumber() on it.
Best regards
Grzegorz
> thanks
>
> I am using:
> OpenC++ 2.5.12
> gcc 2.96
>
>
>
##################################################################
# Grzegorz Jakacki Huada Electronic Design #
# Senior Engineer, CAD Dept. 1 Gaojiayuan, Chaoyang #
# tel. +86-10-64365577 x2074 Beijing 100015, China #
# Copyright (C) 2002 Grzegorz Jakacki, HED. All Rights Reserved. #
##################################################################
|