Bug 61624 - class wizard: inheritance from template class creates wrong filename suggestion
Summary: class wizard: inheritance from template class creates wrong filename suggestion
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: Language Support: CPP (old) (show other bugs)
Version: 3.0.0a5
Platform: Compiled Sources Solaris
: NOR normal
Target Milestone: ---
Assignee: KDevelop Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-07-24 16:43 UTC by Daniel Franke
Modified: 2003-07-25 17:55 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Franke 2003-07-24 16:43:06 UTC
Version:           3.0.0a5 (using KDE 3.1.2)
Installed from:    compiled sources
Compiler:          gcc version 3.2.2
OS:          SunOS (sun4u) release 5.8

Project -> New Class
Base class 'Add' : template-class<foo, bar>

created include filename: 'template-class<foo,bar>.h'
(instead of 'template-class.h')
Comment 1 Alexander Dymo 2003-07-25 00:01:56 UTC
Ok, will be fixed, but by the way, can you suggest a good interface for creating 
template classes. Is it sufficient to allow template <class T> MyClass? Or may be  
simply MyClass <T>? 
Comment 2 Daniel Franke 2003-07-25 00:58:45 UTC
Subject: interface for creating template classes

> http://bugs.kde.org/show_bug.cgi?id=61624     

> ------- Additional Comments From cloudtemple@mksat.net  
> 2003-07-25 00:01 -------
> Ok, will be fixed, but by the way, can you suggest a good 
> interface for creating 
> template classes. Is it sufficient to allow  template <class T>
> MyClass? Or may be simply MyClass <T>?

I'm not sure if  understand your question correctly ?!
The current situation: 

Project->New Class
	Name:	template <class T> MyClass
	File Names: template <class T>myclass.h   (Header) 
			template <class T>myclass.cpp (Implementation)

created code:
-----------------------------------
class template<class T>MyClass {
public:
	template<class T>MyClass();
	[...]
};
-----------------------------------


As user I would expect, when "naming" my class as
	"template <class T> MyClass"
to get a well formed template class definition:
-----------------------------------
template<class T> class MyClass {
public:
	MyClass();
	[...]
};
-----------------------------------


Did this help you? 

	Daniel


Comment 3 Alexander Dymo 2003-07-25 17:55:03 UTC
Subject: kdevelop/parts/cppsupport

CVS commit by dymo: 

Suggest correct base class name includes even if template class was specified.
Also allow template <class T> MyClass form to be specified in the class name input field. So new class wizard should now correctly define template classes and derive from template classes (I hope).

CCMAIL: 61624-done@bugs.kde.org


  M +154 -28   cppnewclassdlg.cpp   1.42
  M +32 -18    cppnewclassdlg.h   1.14
  M +33 -35    cppnewclassdlgbase.ui   1.25
  M +1 -0      newclass_templates/cpp_header   1.2