Developer forums (C::B DEVELOPMENT STRICTLY!) > CodeCompletion redesign

class parse problem

(1/2) > >>

blueshake:
hello:
    In this thread http://forums.codeblocks.org/index.php/topic,10641.0.html

--- Code: ---class ATL_NO_VTABLE CHyperLinkImpl : public ATL::CWindowImpl< T, TBase, TWinTraits >
{
public:
LPTSTR m_lpstrLabel;
LPTSTR m_lpstrHyperLink;

HCURSOR m_hCursor;
HFONT m_hFont;
HFONT m_hFontNormal;
};
--- End code ---

codes above can be parsed correctly now.
here is the patch

--- Code: ---Index: parserthread.cpp
===================================================================
--- parserthread.cpp (revision 5696)
+++ parserthread.cpp (working copy)
@@ -1345,6 +1357,8 @@
                     }
                 }
             }
+            else
+                m_Tokenizer.GetToken();
         }
         else
             break;

--- End code ---

[attachment deleted by admin]

blueshake:
forget to mention .It's brach version .

ollydbg:
I applied to my local trunk copy.
It seems  "CHyperLinkImpl " has no Ancestors.


--- Code: ---m_Tokenizer.GetToken();

--- End code ---
will eat the next Token. :D

By the way, the BraceCompletion related code was add in cbEditor, not CodeCompletion. in the current trunk :D

blueshake:

--- Quote ---It seems  "CHyperLinkImpl " has no Ancestors.

--- End quote ---
I found that too .because CWindowImpl didnt exist in this case.

--- Code: ---class MyClass
{
     int x;
     int y;
};

class ATL_NO_VTABLE CHyperLinkImpl : public MyClass
{
LPTSTR m_lpstrLabel;
LPTSTR m_lpstrHyperLink;

HCURSOR m_hCursor;
HFONT m_hFont;
HFONT m_hFontNormal;
};
--- End code ---


in this case ,it will  have one . :D

ollydbg:
aha, it really works if its ancestor is a template.

--- Code: ---template<typename T1, typename T2>
class MyClass
{
     T1 x;
     T2 y;
};

class ATL_NO_VTABLE CHyperLinkImpl1 : public MyClass<float,int>
{
LPTSTR m_lpstrLabel;
LPTSTR m_lpstrHyperLink;

HCURSOR m_hCursor;
HFONT m_hFont;
HFONT m_hFontNormal;
};

--- End code ---

This still works fine!!

Navigation

[0] Message Index

[#] Next page

Go to full version