Author Topic: How do I auto complet a pointer point to a class?  (Read 3811 times)

linc422

  • Guest
How do I auto complet a pointer point to a class?
« on: August 03, 2009, 04:01:05 pm »
This is what I want:
#include <map>
using namespace std;

typedef map<int, string> map_t;

int main()
{
    map_t m;
    m.insert(1, "one");
    map_t::iterator imap;
    imap = m.find(1);
    imap->second  //which can not be auto completed


Anybody has good idea to solve this problem?
thanks!!

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: How do I auto complet a pointer point to a class?
« Reply #1 on: August 03, 2009, 04:21:14 pm »
The parser is not finished, so it cannot parse advanced templates as the ones in the STL.
There is an ongoing effort to improve the Code Completion (CC) in a separate svn branch,
but I don't think that that version is capable of parsing the std::map

There are two solutions:
1. you do checkout the cc_refactoring branch and start improving the parser;
2. wait until, someone does 1;

p.s. I'm not a CB developer, so I may be wrong about the things I say.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6077
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: How do I auto complet a pointer point to a class?
« Reply #2 on: August 03, 2009, 05:17:42 pm »
The parser is not finished, so it cannot parse advanced templates as the ones in the STL.
There is an ongoing effort to improve the Code Completion (CC) in a separate svn branch,
but I don't think that that version is capable of parsing the std::map

There are two solutions:
1. you do checkout the cc_refactoring branch and start improving the parser;
2. wait until, someone does 1;

p.s. I'm not a CB developer, so I may be wrong about the things I say.

As far as I know, at this time ,the parser can't solve the Op's problem. Parsing template is currently badly.

But I'm try to help a lot.

See the articles on:

http://wiki.codeblocks.org/index.php?title=Developer_documentation
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

linc422

  • Guest
Re: How do I auto complet a pointer point to a class?
« Reply #3 on: August 04, 2009, 03:21:25 am »
Thank you for the help!