XCode C++ Method/Function references

Is there a way to find where a given function or method is called in a XCode project? Suppose I have the following:

class MyClass
{
void theMethod();
};

I want to know where theMethod() is referenced in my project.

Mac OS X (10.4.11), XCode 2.4

Posted on Jun 6, 2008 8:22 AM

Reply
6 replies

Jun 6, 2008 10:24 AM in response to agiannetti

That is correct. Find in Project is just a simple text search. If you use a common word like "add", it will find lots of things. You can narrow it down with a regular expression or maybe by searching for "->add(" or ".add(".

Unfortunately, because of the polymorphic nature of an object-oriented language like C++, what you are asking for is extraordinarily difficult. I have seen tools that attempt to do it, but they are horribly expensive, slow, and hard to use.

Jun 7, 2008 10:37 AM in response to agiannetti

Visual Assist X costs some money. You could probably write a script to integrate gtags/ctags into Xcode if you really wanted to do this. Someone may have written such a script.

It is just something that is hard enough to do that few people want to do it and the Xcode market isn't big enough to attract those few people who do want to attempt it.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

XCode C++ Method/Function references

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.