Developer forums (C::B DEVELOPMENT STRICTLY!) > CodeCompletion redesign
Solved parsing Opencv pre-function macros
(1/1)
ollydbg:
Once I have post this message CodeCompletion can't recognize OpenCV function prototype . Now, after reading the CodeCompletion source code and do a lot debugging, I have get an answer to solve this problem.
Here is the patch
--- Code: ---Index: src/plugins/codecompletion/parser/parserthread.cpp
===================================================================
--- src/plugins/codecompletion/parser/parserthread.cpp (revision 5469)
+++ src/plugins/codecompletion/parser/parserthread.cpp (working copy)
@@ -593,7 +593,8 @@
(!m_pLastParent || m_pLastParent->m_Name != token)) // if func has same name as current scope (class)
{
m_Str.Clear();
- m_Tokenizer.GetToken(); // eat args ()
+ wxString arg = m_Tokenizer.GetToken(); // eat args ()
+ m_Str= arg.Mid(1,arg.Len()-2);
}
else if (peek.GetChar(0) == '(' && m_Options.handleFunctions)
{
--- End code ---
For example. These is the code
--- Code: ---CVAPI(IplImage*) cvLoadImage( const char* filename, int iscolor CV_DEFAULT(CV_LOAD_IMAGE_COLOR));
--- End code ---
m_Str = _T("IplImage*") in this situation, so, this became the function type.
By the way, at first, I want use m_Str = "CVAPI(IplImage*)" as the function type. But unluckily, this string can't be correctly recorded, I'm not sure why? :(
Also, you can see the screen shot
[attachment deleted by admin]
killerbot:
please also create a patch for this in our patch tracker at berlios. In the forum things can get out of sight too soon ;-)
ollydbg:
Done! :D This is my first open source activity. Thanks!
Navigation
[0] Message Index
Go to full version