I don't like it, maybe...

Scott Seely scott.seely at eng.nciaccess.com
Fri Jan 21 20:16:52 GMT 2000


This sounds like a good idea with a few caveats.
1. The Get/Set pair gets constructed as an option.  Some member variables
are truly private and for our eyes only.
2. This looks sticky for situations where the user has multiple constructors
for the class.


Also some questions:
1. Any idea how you would handle situations where the new member variable
gets initialized by a constructor arugment? ex.
class foo{
public:
	foo( int arg1 ) : m_myInt( arg1 ){}
private:
	int m_myInt;
};

2. How do you intend to handle naming of the values?  I myself hate the
words Get/Set for values.  A lot of times I prefer the following

class foo{
public:
	foo(){}
	int myInt() { return m_myInt; }
	void myInt( const int value ) { m_myInt = value; }
private:
	int m_myInt;
};

Not to get into a semantics war, but how do you propose to handle this
situation when dealing with the likes of me?

Again, good idea.  I'm just curious to see what direction you see this
feature going in.

-----Original Message-----
From: Mailing list agent [mailto:mdom at barney.cs.uni-potsdam.de]On Behalf
Of Massimo Morin
Sent: Friday, January 21, 2000 9:59 AM
To: kdevelop
Subject: I don't like it, maybe...


Hi,
	time ago we were talking about coding standards and accessors of
member-variable, and how it could be a good idea to customize the code
generated by kdevelop.

Sincerelly, I do not like the code it generates because it doesn't fit
my conventions, so I have to reedit all the code and adjust it.
Most of the time when I add a member to a class I write the Get/Set
function and I initialize it into the constructor too.... and this is a
very boring and automatic operation :(

Well, I was thinking: why don't we set some user defined rule to apply
everytime we create a member variable or a member method for a class?

Is there anyone working on something like that??? (Jonas are you
there??)

I played a little with this idea and I like it so I wrote a couple of
classes.... during the week-end I hope to debug them and excercice it a
little.

If there is some interest and no one has alredy implemented it, I'll try
to integrate it into kdevelop.... otherwise ... it was a good exercice
for myself.... :)

Let me know.

Max
--
                                               _...__..-'
Massimo Morin                                .'
mmorin at schedsys.com                        .'
+1 (617) 484 2999                        .'
                                       .'
            .------._                 ;
      .-"""`-.<')    `-._           .'
     (.--. _   `._       `'---.__.-'
      `   `;'-.-'         '-    ._     Scheduling Systems Inc.
        .--'``  '._      - '   .       Three University Office Park
         `""'-.    `---'    ,          95 Sawyer Road
 ''--..__      `\                      Waltham, 02453 Massachusetts USA
         ``''---'`\      .'            +1 (781) 893-0390 x 126
                   `'. '               http://www.schedsys.com
                     `'.






More information about the KDevelop mailing list