help-global
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Searching for members of classes


From: Shigio YAMAGUCHI
Subject: Re: Searching for members of classes
Date: Mon, 16 Jun 2014 07:42:48 +0900

Hello,
> How to find all of A's x and only A's x:  lines 3, 6, 20?
>
> How to find all of A's fun() and only A's fun():  lines 4, 6, 21?
>

It is impossible, since GLOBAL cannot recognize type of names.
It is only a tag system, not a language analysis system.



2014-06-14 23:49 GMT+09:00 Suresh Govindachar <address@hidden>:

Hello,

Consider following partial code:

  /*  1 */   class A
  /*  2 */   {
  /*  3 */       int   x;
  /*  4 */      void  fun();
  /*  5 */   }
  /*  6 */   A::fun() { std::cout << x << "\n"; }
  /*  7 */
  /*  8 */   class B
  /*  9 */   {
  /* 10 */       int   x;
  /* 11 */      void  fun();
  /* 12 */   }
  /* 13 */   B::fun() { std::cout << x*x << "\n"; }
  /* 14 */
  /* 15 */   main()
  /* 16 */   {
  /* 17 */       A  u;
  /* 18 */       B  v;
  /* 19 */
  /* 20 */       u.x =  3;
  /* 21 */       u.fun();
  /* 22 */
  /* 23 */       v.x =  5;
  /* 24 */       v.fun();
  /* 25 */   }

How to find all of A's x and only A's x:  lines 3, 6, 20?

How to find all of A's fun() and only A's fun():  lines 4, 6, 21?

Thanks,

--Suresh


_______________________________________________
Help-global mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/help-global



--
Shigio YAMAGUCHI <address@hidden>
PGP fingerprint: D1CB 0B89 B346 4AB6 5663  C4B6 3CA5 BBB3 57BE DDA3

reply via email to

[Prev in Thread] Current Thread [Next in Thread]