Author Topic: Be afraid, be very afraid  (Read 1717 times)

son-of-sargasso

  • EA User
  • **
  • Posts: 122
  • Karma: +0/-0
    • View Profile
Be afraid, be very afraid
« on: September 23, 2009, 10:35:02 pm »
I'm back.  ;D

Well, its been a fairly long break.  So long in fact that I seem to have forgotten more than I ever knew.  

But sad as it seems, I'm back in the ol' modelling saddle yet again.  

So,...
Question the first.  How do you make a class static?  

(OMG, you don't know how much this hurts.)

bruce

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 10437
  • Karma: +343/-30
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Be afraid, be very afraid
« Reply #1 on: September 23, 2009, 10:45:23 pm »
Hi Bruce,

Welcome back.
I'ts not as bad as you think, I remember that to be in the custom properties, but I've just tried that and for some reason I only see "IsActive" and not the "IsStatic" as I expected.
On the other hand, in UML there is no such thing as static classes. I guess you could say that a class is static if it only has static features.

Geert

son-of-sargasso

  • EA User
  • **
  • Posts: 122
  • Karma: +0/-0
    • View Profile
Re: Be afraid, be very afraid
« Reply #2 on: September 23, 2009, 11:09:16 pm »
That's fairly well what I thought.  But it does raise the question, the class in question is to be entirely static,  but instantiable, sort of.  Think "Me" or "Application" but this is related to threads.  I feel I may be thinking implementation rather than concept, but the little gray cells are churning a bit slower these days.

What I want is to specify that the spawned thread has an environment class accessible by the spawner, which may have spawned n threads, "th1", "th2", etc.  Each being an instance of ::thread and each having a static environment.  No, your probably right, the more I think about it, its a matter of specifying that each class feature is static.  

b

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 7418
  • Karma: +176/-120
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Be afraid, be very afraid
« Reply #3 on: September 24, 2009, 12:04:07 am »
Hi Bruce!

Welcome back also!

There's also an interrelationship between the abstract nature of a classes features and it's ability to be classified as abstract isn't there?

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Makulik

  • EA User
  • **
  • Posts: 400
  • Karma: +0/-0
    • View Profile
Re: Be afraid, be very afraid
« Reply #4 on: September 24, 2009, 12:49:18 am »
Hi Paolo,

AFAIK that kinda relationship is also not really supported by EA. I don't know what UML says about this, but at least EAs C++ code reverse engineering doesn't support it.
If there is such intrinsic relationship between abstractness of a class element and it's contained features, I would expect that the class would be made automatically abstract as soon at least one of the contained operations is marked as 'Pure'.

Just my 0.02 EUR
Günther

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 10437
  • Karma: +343/-30
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Be afraid, be very afraid
« Reply #5 on: September 24, 2009, 03:37:16 am »
Well, actually I think there is a difference between the abstract nature of a class and the static nature.
As I argued before the static nature is a derived attribute. If and only if all the features are static then the class is static.
For abstract that is a different case.
It is true that a class is abstract as soon as one of its features is abstract, but it is not a "if and only if" relation. It is perfectly possible that a class is abstract but still only has concrete (non abstract) features (or no features at all for that matter)

Geert

eberline

  • EA User
  • **
  • Posts: 41
  • Karma: +1/-0
    • View Profile
Re: Be afraid, be very afraid
« Reply #6 on: September 26, 2009, 04:18:05 am »
I usually denote static classes with a «utility» stereotype.

Scott

son-of-sargasso

  • EA User
  • **
  • Posts: 122
  • Karma: +0/-0
    • View Profile
Re: Be afraid, be very afraid
« Reply #7 on: September 27, 2009, 08:32:29 pm »
Quote
I usually denote static classes with a «utility» stereotype.

Yep, that's what I did in the end.  (Well I was less imaginative and just made it a <<static>> stereotype.  

That takes care of about 6 classifiers that just provide constants.  

..

Now, where was I. Oh yes, about this aggregation end thing ..... ;)