Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 1626 rename oddity

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
Uniwares Posted - Jan 28 2008 : 3:51:05 PM
Where does the "Filter (xx)" under the first .h and .cpp file come from and why is is there?

5   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Jan 29 2008 : 2:16:50 PM
Since I am not quite sure what your code looks like, I have run some more tests using this code. In the header file:

class testThingsGenerally
{
private:
	int m_nSize;

public:
	testThingsGenerally();
	~testThingsGenerally();
	void calculateSomething();
	void addChocolate();
};

namespace FELINE_TEST_GENERAL
{
	class testThingsGenerallySpace
	{
	public:
		testThingsGenerallySpace();
		~testThingsGenerallySpace();
	};
};

and in the matching cpp file:
testThingsGenerally::testThingsGenerally()	{ }
testThingsGenerally::~testThingsGenerally()	{ }

namespace FELINE_TEST_GENERAL
{
	testThingsGenerallySpace::testThingsGenerallySpace()	{ }
	testThingsGenerallySpace::~testThingsGenerallySpace()	{ }
}


When I run Find References on "testThingsGenerally" the references in the cpp file have no scope. That makes sense since they are at file scope.

When I run Find References on "testThingsGenerallySpace" the references in the cpp file have the namespace as the scope.

I suspect, but do not know for sure, that the namespace macro's are behind the mixed results you are seeing.
Uniwares Posted - Jan 29 2008 : 08:52:45 AM
I already got your point, but it does not explain why the "scope word" in one case on the screen shot shows the namespace and in the other it shows the class name.

Compare the ctor of LoadAllSQLFilterDataStream with the ctor of RegExSQLDataStream, different files, same namespace (Uniwares::Mail::Filter), same scope, yet VAX shows a different "scope word"
feline Posted - Jan 29 2008 : 07:30:32 AM
I have added the following, simple test case, to a header file:

class testThingsGenerally
{
private:
	int m_nSize;

public:
	void calculateSomething();
	void addChocolate();
};

void testThingsGenerally::calculateSomething()
{
	m_nSize = 2;
}

void testThingsGenerally::addChocolate()
{
	m_nSize = 3;
}

When I do a Find References on "m_nSize" I get the following:

c:\\src\\tests\\test_general.h
	testThingsGenerally (8):    int m_nSize;
	calculateSomething (17):    m_nSize = 2;
	addChocolate (22):    m_nSize = 3;

The numbers in round brackets are the line number in the current file, and the "word" in front of the number is the class or function that contains the reference. The "word" is a simple summary of the "scope" of the reference.

I see the same information in the Rename dialog when running a rename on "m_nSize".

Does what you are seeing make a bit more sense now?
Uniwares Posted - Jan 28 2008 : 6:04:12 PM
The closest it comes to is the namespace it is in (Uniwares::Mail::Filter). But then again, as you can see in the other .h and .cpp files, they are not shown to be in the same namespace as they are, rather it shows the classname.
feline Posted - Jan 28 2008 : 5:35:47 PM
It is an attempt to explain the scope / location of the reference. If you do a Find References instead and jump to one of those then hopefully it will make a bit more sense. Some of those look like they might be function names, so the function the reference is found in.

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000