[Uml-devel] Hi guys - I'm back!!

Gustavo Madrigal linux_news at nextphere.com
Tue May 14 11:40:04 UTC 2002


On Tuesday 14 May 2002 02:33, Peeter Russak wrote:
> Hi,
>
> Nice to hear you're back, Paul:) I really hardly considered forking
> the project this weekend but gave it couple more days:)
> Could you add me (user 'pezz74') to the project developers list, please?
>
> I played again with code last weekend and found some problems:
>
> a) KDevelop's texteditor's poor functionality still keeps me away
> from it so I used vim and it's a really horrible how it looks like
> when tabs and spaces are used at the same time. I happen to have
> human brain not robot's so goodlooking code is a mustbe to me to
> understand it. I hope that not very much people disagree that tabs
> are better than spaces for indentation so I suggest everyone to set
> KDevelop not to replace tabs with spaces and tab length 8. I will
> do some bigger indentization work when I get access to repository.
> Another bad is that different codingstyles are used mixed. Gustavo
> likes to use C at the beginning of classnames like CMyFineClass, but
> I think it's just another byte-wasting innovation of M$ and MyFineClass
> is not better or worse than CMyFineClass. There's another mess with
> variable names. Good style says that class members are prefixed with
> m_ or _ (like m_name or _name) to differ them from normal variables.
> m_name looks better to me so I propose to use this schema for member
> variables and _not_ for parameters and other variables. Sure I can
> write endlessly cleanup patches but using consistent good coding styles
> is good for everyone. I've seen too much ugly code already so please
> save me:))
I agree with you, we need an uniform coding style, I can get rid of the 
starting C for class names no problem. I also like to start member variables 
with m_ . I think it would be useful to differenciate parameter variables 
from function local variables, for this I propose to start parameter names in 
capital (i.e. Parameter instead of parameter) and start local variables in 
small caps. Another thing I don't like about the code is the use of regular 
C-style casts, I think is better to switch to C++-style casts (static_cast, 
dynamic_cast, etc).
About indentation, I agree in setting KDevelop not to replace tabs with 
spaces but I think 5 is a better tab length.
I think we should have something like coding_style.txt in CVS.

To modify the actual code is it possible to use a C++ code beautifier? If so 
which one?

Let me know what do you think so I can start renaming stuff.

>
> b) I met a strange error that I couldn't find reason but would be glad
> if someone could fix/explain. When I create makefiles with configure
> from CVS everything compiles fine but after creating new configure
> using make -f Makefile.cvs linking fails with messages that it doesn't
> find Association's virtual methods in association.moc.cpp.
I removed unused class's files today, and modified Makefile.am and 
uml.kdevprj to reflect that. When I use make -f Makefile.cvs everything works 
fine.

>
> c) What's the difference between ObjectWidget and ConceptWidget?
> UML classes are misnamed Concepts in umltool (why?) and I think this
> is the reason why there's two classes for the same thing. Merging those
> two and renaming Concept* to Class* should make code much understandable.
> If noone has good explanation for these two I'll merge them.

I agree,  it would be better to change Concept* to Class*. I think 
ObjectWidget is supposse to be use only in Object Diagrams (They are class 
instances with specific values for each class's attribute) and Concepts are 
suppose to be use in Class, Sequence and Collaboration Diagrams. But I think 
they should be linked some how, so if you change the class definition adding 
a new attribute the corresponding Object will reflect that.



Regards,

-- 
---------------------------------------------------------------------
P. Eng. Gustavo Madrigal
Technology Research Department Manager
Nextphere Corp.
	Are you ready for the Next Business Sphere?
http://www.nextphere.com
---------------------------------------------------------------------




More information about the umbrello-devel mailing list