Namespaces in C++
Mayuresh Kulkarni <[email protected]> Wed, 4 Nov 2015 21:37:30 +0000
| Newsgroups | gmane.emacs.cedet |
|---|---|
| Message-ID | <[email protected]> |
--===============5383896807286229870==
Content-Language: en-US
Content-Type: multipart/alternative; boundary="_000_144667305026597812kcgcom_"
--_000_144667305026597812kcgcom_
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Does current CEDET understand namespaces in C++? I tried with the emacs 24.=
5.1 bundled version and also from the git version but it seems not.
If I stick the following in a .cpp file
namespace Foo {
void externalFunction();
}
void myFunction()
{
Foo::externalFunction(); <----------
}
and hover over the indicated line, it shows the signature as void externalF=
unction() (and also nicely highlights the declaration etc) but leaves out t=
he namespace qualification.
Just asking if this is a problem with my setup or if this is not expected t=
o work.
Thanks,
Mayuresh
________________________________
From: Phan, Linh H (3443) <[email protected]>
Sent: Monday, November 2, 2015 2:41 PM
To: [email protected]
Subject: [EXT] [CEDET-devel] semantic-ia-fast-jump: Could not find suitable=
jump point
Hi,
I am having problem using "semantic-ia-fast-jump" using the example:
https://www.gnu.org/software/emacs/manual/html_node/ede/Quick-Start.html.
To that example, I added a telem_t:
include/myproj.hh:
typedef struct
{
double x;
} telem_t;
src/main.cpp:
int main() {
telem_t telem;
}
When I put my mouse on "telem_t" in main, I see the definition of telem_t i=
n the ECB symboldef buffer (and I see myproj.hh has been loaded into emacs)=
, but when I run M-x semantic-ia-fast-jump, emacs says:
Could not find suitable jump point for telem_t
If I put the below in my .emacs:
(defun my:add-semantic-system-include()
(semantic-add-system-include "/home/phan/pkgs/ede/example/include" 'c++-m=
ode)
)
(add-hook 'c-mode-common-hook 'my:add-semantic-system-include)
Then when I run M-x semantic-ia-fast-jump, emacs would successfully jump to=
telem_t definition in myproj.hh.
myproj.hh is not a system include file and so I was hoping for a better sol=
ution than this.
Thanks for any help,
Linh
This e-mail and its attachments are intended only for the individual or ent=
ity to whom it is addressed and may contain information that is confidentia=
l, privileged, inside information, or subject to other restrictions on use =
or disclosure. Any unauthorized use, dissemination or copying of this trans=
mission or the information in it is prohibited and may be unlawful. If you =
have received this transmission in error, please notify the sender immediat=
ely by return e-mail, and permanently delete or destroy this e-mail, any at=
tachments, and all copies (digital or paper). Unless expressly stated in th=
is e-mail, nothing in this message should be construed as a digital or elec=
tronic signature. For additional important disclaimers and disclosures rega=
rding KCG's products and services, please click on the following link:
http://www.kcg.com/legal/global-disclosures
--_000_144667305026597812kcgcom_
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<html>
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Diso-8859-=
1">
<style type=3D"text/css" style=3D"display:none"><!-- p { margin-top: 0px; m=
argin-bottom: 0px; } @font-face { font-family: 'Cambria Math'; } @font-face=
{ font-family: Calibri; } p.MsoNormal, li.MsoNormal, div.MsoNormal { margi=
n: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; } a=
:link, span.MsoHyperlink { color: rgb(5, 99, 193); text-decoration: underli=
ne; } a:visited, span.MsoHyperlinkFollowed { color: rgb(149, 79, 114); text=
-decoration: underline; } span.EmailStyle17 { font-family: Calibri, sans-se=
rif; color: windowtext; } .MsoChpDefault { font-family: Calibri, sans-serif=
; } @page WordSection1 { margin: 1in; }--></style>
</head>
<body dir=3D"ltr" style=3D"font-size:12pt;color:#000000;background-color:#F=
FFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>Does current CEDET understand namespaces in C++? I tried wi=
th the emacs 24.5.1 bundled version and also from the git version but it se=
ems not.<br>
</p>
<p><br>
</p>
<p>If I stick the following in a .cpp file<br>
</p>
<p><br>
</p>
<div>namespace Foo {<br>
</div>
<div> void externalFunction();</div>
<div>}</div>
<div><br>
</div>
<div>void myFunction()</div>
<div>{</div>
<div> Foo::externalFunction(); &nb=
sp; <----------<br>
</div>
<div>}<br>
</div>
<div><br>
and hover over the indicated line, it shows the signature as void externalF=
unction() (and also nicely highlights the declaration etc) but leaves out t=
he namespace qualification.<br>
</div>
<div><br>
</div>
<div>Just asking if this is a problem with my setup or if this is not expec=
ted to work.<br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>Thanks,<br>
</div>
<div>Mayuresh<br>
</div>
<p><br>
</p>
<p><br>
</p>
<div style=3D"color: rgb(33, 33, 33);">
<hr tabindex=3D"-1" style=3D"display:inline-block; width:98%">
<div id=3D"divRplyFwdMsg" dir=3D"ltr"><font face=3D"Calibri, sans-serif" co=
lor=3D"#000000" style=3D"font-size:11pt"><b>From:</b> Phan, Linh H (3443) &=
lt;[email protected]><br>
<b>Sent:</b> Monday, November 2, 2015 2:41 PM<br>
<b>To:</b> [email protected]<br>
<b>Subject:</b> [EXT] [CEDET-devel] semantic-ia-fast-jump: Could not find s=
uitable jump point</font>
<div> </div>
</div>
<div>
<div class=3D"WordSection1">
<p class=3D"MsoNormal">Hi,</p>
<p class=3D"MsoNormal"> </p>
<p class=3D"MsoNormal"> I am having problem using "semantic-ia-f=
ast-jump" using the example:</p>
<p class=3D"MsoNormal">https://www.gnu.org/software/emacs/manual/html_node/=
ede/Quick-Start.html.</p>
<p class=3D"MsoNormal"> </p>
<p class=3D"MsoNormal">To that example, I added a telem_t:</p>
<p class=3D"MsoNormal"> </p>
<p class=3D"MsoNormal">include/myproj.hh:</p>
<p class=3D"MsoNormal">typedef struct</p>
<p class=3D"MsoNormal">{</p>
<p class=3D"MsoNormal"> double x;</p>
<p class=3D"MsoNormal">} telem_t;</p>
<p class=3D"MsoNormal"> </p>
<p class=3D"MsoNormal">src/main.cpp:</p>
<p class=3D"MsoNormal">int main() {</p>
<p class=3D"MsoNormal"> telem_t telem;</p>
<p class=3D"MsoNormal">}</p>
<p class=3D"MsoNormal"> </p>
<p class=3D"MsoNormal">When I put my mouse on "telem_t" in main, =
I see the definition of telem_t in the ECB symboldef buffer (and I see mypr=
oj.hh has been loaded into emacs), but when I run M-x semantic-ia-fas=
t-jump, emacs says:</p>
<p class=3D"MsoNormal">Could not find suitable jump point for telem_t</p>
<p class=3D"MsoNormal"> </p>
<p class=3D"MsoNormal">If I put the below in my .emacs:</p>
<p class=3D"MsoNormal"> </p>
<p class=3D"MsoNormal">(defun my:add-semantic-system-include() </p>
<p class=3D"MsoNormal"> (semantic-add-system-include "/home=
/phan/pkgs/ede/example/include" 'c++-mode)</p>
<p class=3D"MsoNormal">)</p>
<p class=3D"MsoNormal">(add-hook 'c-mode-common-hook 'my:add-semantic-syste=
m-include)</p>
<p class=3D"MsoNormal"> </p>
<p class=3D"MsoNormal">Then when I run M-x semantic-ia-fast-jump, emacs wou=
ld successfully jump to telem_t definition in myproj.hh.</p>
<p class=3D"MsoNormal">myproj.hh is not a system include file and so I was =
hoping for a better solution than this.</p>
<p class=3D"MsoNormal"> </p>
<p class=3D"MsoNormal">Thanks for any help,</p>
<p class=3D"MsoNormal"> </p>
<p class=3D"MsoNormal">Linh</p>
</div>
</div>
</div>
This e-mail and its attachments are intended only for the individual or ent=
ity to whom it is addressed and may contain information that is confidentia=
l, privileged, inside information, or subject to other restrictions on use =
or disclosure. Any unauthorized
use, dissemination or copying of this transmission or the information in i=
t is prohibited and may be unlawful. If you have received this transmission=
in error, please notify the sender immediately by return e-mail, and perma=
nently delete or destroy this e-mail,
any attachments, and all copies (digital or paper). Unless expressly state=
d in this e-mail, nothing in this message should be construed as a digital =
or electronic signature. For additional important disclaimers and disclosur=
es regarding KCG’s products and
services, please click on the following link: <br>
<br>
http://www.kcg.com/legal/global-disclosures
</body>
</html>
--_000_144667305026597812kcgcom_--
--===============5383896807286229870==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
------------------------------------------------------------------------------
--===============5383896807286229870==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
Cedet-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cedet-devel
--===============5383896807286229870==--