[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kdevelop
Subject:    Re: cpp_template and header_template
From:       August =?iso-8859-1?Q?H=F6randl?= <august.hoerandl () gmx ! at>
Date:       2001-05-30 20:22:17
[Download RAW message or body]

Dies ist eine mehrteilige Nachricht im MIME-Format.

August H=F6randl wrote:
 =

> forgot the copy constructor - should be easy, give me some days, its
> a little busy around here

okay - here we go:
- added copy constructor
- corrected operator << and >>

Could some please apply the attached patch - thanks
Gustl

-- =

August H=F6randl                         august.hoerandl@gmx.at
An NT server can be run by an idiot, and usually is.
["kdev-20010527.patch" (text/plain)]

--- kdevelop/kdevelop/cclonefunctiondlg.cpp.orig	Thu May 24 20:47:06 2001
+++ kdevelop/kdevelop/cclonefunctiondlg.cpp	Thu May 24 21:05:47 2001
@@ -29,6 +29,7 @@
 static const QString templates("Templates");
 
 enum templatetype {
+  c_copy,            /* copy constructor */
   c_unaer_member,    /* class operator@ () */
   c_member,          /* class operator@ (class) */
   c_bin_compare,   /* friend bool operator@ (class, class) */
@@ -42,6 +43,7 @@
   QString name;
   templatetype typ;
 } templatesdata[] = {
+ { "", c_copy },
 
  { "!",  c_unaer_member },
  { "~",  c_unaer_member },
@@ -198,6 +200,9 @@
     for(int i=0; i < templatescount; i++) {
       QString op = templatesdata[i].name;
       switch (templatesdata[i].typ) {
+        case c_copy:  /* copy constructor */
+          methods->insertItem(" "+classname + oparg1);
+          break;
         case c_unaer_member:    /* class operator@ () */
           methods->insertItem(classname + "& operator " + op + noarg);
           break;
@@ -220,11 +225,11 @@
           break;
 
         case inp:         /* oper >> */
- 	        methods->insertItem(QString("friend istream& operator << (istream& , "+ \
classname + "& )")); + 	        methods->insertItem(QString("friend istream& operator \
>> (istream& , "+ classname + "& )"));  break;
 
         case outp:         /* oper << */
-       	  methods->insertItem(QString("friend ostream& operator >> (ostream& , \
const"+ classname + "& )")); +       	  methods->insertItem(QString("friend ostream& \
operator << (ostream& , const"+ classname + "& )"));  break;
       }
     }


-
to unsubscribe from this list send an email to kdevelop-request@kdevelop.org with the following body:
unsubscribe »your-email-address«


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic