Author Topic: bugs and suggestion about new class  (Read 10110 times)

Offline wudimei_com

  • Single posting newcomer
  • *
  • Posts: 4
bugs and suggestion about new class
« on: May 02, 2014, 06:38:18 am »
1.bug:

the IDE create tow files after click "Create":
include/WBox.h
src/WBox.cpp

#include "WBox.h"
should be :
#include "../include/WBox.h"

2.could you create a checkbox to add DLL_EXPORT to the class defination?
the dialog show the checkbox control:
[X] add "DLL_EXPORT"
after click "Create" button,the IDE generate the code:
 
class DLL_EXPORT WBox{ ... }

3.could you add namespace text box?
namespace:[UI::Forms] ,a textfield
and the IDE create the code:

/* filename: include/WBox.h */

namespace UI{
  namespace Forms{
     class DLL_EXPORT WBox{
      ...
     }
  }
}

/* filename:  src/WBox.cpp */

namespace UI{
  namespace Forms{
     WBox::WBox(){
            ...
     }

  }
}

4. could you create the namespace as directory-tree?
eg:
/src/UI/Forms/WBox.cpp
/include/UI/Forms/WBox.h

thankyou
best regards!

yang
« Last Edit: May 02, 2014, 06:50:34 am by wudimei_com »

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: bugs and suggestion about new class
« Reply #1 on: May 02, 2014, 07:30:45 am »
Please use code-tags if you post source-code (#-button in the forums editor) !!
It makes your post much more readable.

First question :
Which version of C::B do you use ?

Answers to your questions, suggestions:

1. is not a bug, it's by design, you can chose where the files are created and you can add the include-path to the build options automatically,

2. not implemeted as far as I know

3. already there, just use namespace1::namespace2::class in the name-field

4. already implemented

Offline wudimei_com

  • Single posting newcomer
  • *
  • Posts: 4
Re: bugs and suggestion about new class
« Reply #2 on: May 04, 2014, 10:27:01 am »
i use C::B 13.12 in windows

thank you

Offline wudimei_com

  • Single posting newcomer
  • *
  • Posts: 4
Re: bugs and suggestion about new class
« Reply #3 on: May 04, 2014, 10:32:59 am »
bugs:

i have created tow construct:
Code
WString::WString(TCHAR *str){
}

WString::WString(LPCTSTR *str){

}
when i type:
Code
new WString()
the editor' auto-complete show ONLY one construct:
WString::WString(LPCTSTR *str)
« Last Edit: May 04, 2014, 10:37:11 am by wudimei_com »

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5910
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: bugs and suggestion about new class
« Reply #4 on: May 04, 2014, 11:38:16 am »
bugs:

i have created tow construct:
Code
WString::WString(TCHAR *str){
}

WString::WString(LPCTSTR *str){

}
when i type:
Code
new WString()
the editor' auto-complete show ONLY one construct:
WString::WString(LPCTSTR *str)

I can see the two functions, see the two images below:


I'm using the latest SVN build by myself.
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.