Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 Context dependent #include files
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

metalim
Starting Member

Estonia
1 Posts

Posted - Jan 31 2008 :  06:35:40 AM  Show Profile  Reply with Quote
Build 1626
Example: TightVNC http://www.tightvnc.com/
Try to find definition of tightEncode8 with VA.
However, Right-Click / "Go to definition" works fine.

-----------[File: tightvnc\\rfb\\TightEncoder.cxx]----------
...
#define BPP 8
#include <rfb/tightEncode.h>
#undef BPP
#define BPP 16
#include <rfb/tightEncode.h>
#undef BPP
#define BPP 32
#include <rfb/tightEncode.h>
#undef BPP
...
switch (writer->bpp()) {
case 8:
// POINT TO NEXT FUNCTION AND TRY TO FIND IT'S DEFINITION
tightEncode8(r, &mos, zos, imageBuf, cp, ig); break;
case 16:
tightEncode16(r, &mos, zos, imageBuf, cp, ig); break;
case 32:
tightEncode32(r, &mos, zos, imageBuf, cp, ig); break;
}

-----------[File: tightvnc\\rfb\\tightEncode.h]----------
...
#define TIGHT_ENCODE CONCAT2E(tightEncode,BPP)
...
void TIGHT_ENCODE (const Rect& r, rdr::OutStream *os,
rdr::ZlibOutStream zos[4], void* buf, ConnParams* cp
)
...

Have some fun: Win+M, Ctrl+A, Enter.

feline
Whole Tomato Software

United Kingdom
18943 Posts

Posted - Jan 31 2008 :  08:50:10 AM  Show Profile  Reply with Quote
VA is designed to be active inside all conditional blocks, to help you write code inside of them. Also VA often does not know which block is active.

I am puzzled by your example, the same header file is included regardless of the pre-processor declarations.

zen is the art of being at one with the two'ness
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000