[Better Comment Initiative]: MooseElement

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

[Better Comment Initiative]: MooseElement

Stéphane Ducasse
We have

        MooseElement defines the minimal interface of an entity


Proposition:

        MooseElement defines the minimal interface of an entity: any moose entity should answer its mooseID, its mooseName and its mooseModel.

        A mooseID is an Integer that uniquely identifies this entity within the entire Moose environment.
        It should not change nor be nil.
       
        The mooseModel of an entity is must be an instance of MooseModel. It may be nil if the entity is not part of a model.
        Each entity belongs to one and only one model, if an entity has not yet been added to a model or if an entity has been removed from a model
        the mooseModel is undefined, that is it may be nil.
       
        An entity mooseName result a string version of the mooseID.



Please comment.

Stef
_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: [Better Comment Initiative]: MooseElement

jannik laval

On Sep 18, 2011, at 18:28 , Stéphane Ducasse wrote:

> We have
>
> MooseElement defines the minimal interface of an entity
>
>
> Proposition:
>
> MooseElement defines the minimal interface of an entity: any moose entity should answer its mooseID, its mooseName and its mooseModel.
>
> A mooseID is an Integer that uniquely identifies this entity within the entire Moose environment.
> It should not change nor be nil.

It is generated automatically during the creation of the MooseEntity.

>
> The mooseModel of an entity is must be an instance of MooseModel. It may be nil if the entity is not part of a model.
> Each entity belongs to one and only one model, if an entity has not yet been added to a model or if an entity has been removed from a model
> the mooseModel is undefined, that is it may be nil.
>
> An entity mooseName result a string version of the mooseID.

No, it returns the name of the entity, or the symbol #noname.

Jannik

>
>
>
> Please comment.
>
> Stef
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: [Better Comment Initiative]: MooseElement

Stéphane Ducasse

We have

        MooseElement defines the minimal interface of an entity


Proposition: v2
----------

        MooseElement defines the minimal interface of an entity: any moose entity should answer its mooseID, its mooseName and its mooseModel.

        A mooseID is an Integer that uniquely identifies this entity within the entire Moose environment.
        It should not change nor be nil. It is generated automatically during the creation of the MooseEntity.

       
        The mooseModel of an entity is must be an instance of MooseModel. It may be nil if the entity is not part of a model.
        Each entity belongs to one and only one model, if an entity has not yet been added to a model or if an entity has been removed from a model
        the mooseModel is undefined, that is it may be nil.
       
        An entity mooseName result a string version of the mooseID.
>
> No, it returns the name of the entity, or the symbol #noname.

so what do we write


MooseElement>>mooseName
        "Returns an unique identifier of this entity.  This method is mandatory, and must
        return a Symbol or Integer that unqiuely identifies this entity within its model (but
        not within the entire Moose enivronment, see MooseElement>>mooseID). The return
        value must not be nil, and must never change. The implementation should be fast,
        as this key may be used extensivley by the MooseModel or similar facilities."
         
        ^self mooseID asString



Stef
_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: [Better Comment Initiative]: MooseElement

Tudor Girba-2
Sounds Ok. Actually, we now have an issue opened that says that we should merge MooseElement and MooseEntity because there is no point in having them separated anymore.

It would probably be better to have MooseElement as a Trait.

Doru


On 18 Sep 2011, at 19:18, Stéphane Ducasse wrote:

>
> We have
>
> MooseElement defines the minimal interface of an entity
>
>
> Proposition: v2
> ----------
>
> MooseElement defines the minimal interface of an entity: any moose entity should answer its mooseID, its mooseName and its mooseModel.
>
> A mooseID is an Integer that uniquely identifies this entity within the entire Moose environment.
> It should not change nor be nil. It is generated automatically during the creation of the MooseEntity.
>
>
> The mooseModel of an entity is must be an instance of MooseModel. It may be nil if the entity is not part of a model.
> Each entity belongs to one and only one model, if an entity has not yet been added to a model or if an entity has been removed from a model
> the mooseModel is undefined, that is it may be nil.
>
> An entity mooseName result a string version of the mooseID.
>>
>> No, it returns the name of the entity, or the symbol #noname.
>
> so what do we write
>
>
> MooseElement>>mooseName
> "Returns an unique identifier of this entity.  This method is mandatory, and must
> return a Symbol or Integer that unqiuely identifies this entity within its model (but
> not within the entire Moose enivronment, see MooseElement>>mooseID). The return
> value must not be nil, and must never change. The implementation should be fast,
> as this key may be used extensivley by the MooseModel or similar facilities."
>
> ^self mooseID asString
>
>
>
> Stef
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
www.tudorgirba.com

"No matter how many recipes we know, we still value a chef."







_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: [Better Comment Initiative]: MooseElement

jannik laval
In reply to this post by Stéphane Ducasse

On Sep 18, 2011, at 19:18 , Stéphane Ducasse wrote:

>
> We have
>
> MooseElement defines the minimal interface of an entity
>
>
> Proposition: v2
> ----------
>
> MooseElement defines the minimal interface of an entity: any moose entity should answer its mooseID, its mooseName and its mooseModel.
>
> A mooseID is an Integer that uniquely identifies this entity within the entire Moose environment.
> It should not change nor be nil. It is generated automatically during the creation of the MooseEntity.
>
>
> The mooseModel of an entity is must be an instance of MooseModel. It may be nil if the entity is not part of a model.
> Each entity belongs to one and only one model, if an entity has not yet been added to a model or if an entity has been removed from a model
> the mooseModel is undefined, that is it may be nil.
>
> An entity mooseName result a string version of the mooseID.
>>
>> No, it returns the name of the entity, or the symbol #noname.
>
> so what do we write

Argh, you are right, I selected MooseEntity instead of MooseElement.
Sorry for the noise.

Jannik

>
>
> MooseElement>>mooseName
> "Returns an unique identifier of this entity.  This method is mandatory, and must
> return a Symbol or Integer that unqiuely identifies this entity within its model (but
> not within the entire Moose enivronment, see MooseElement>>mooseID). The return
> value must not be nil, and must never change. The implementation should be fast,
> as this key may be used extensivley by the MooseModel or similar facilities."
>
> ^self mooseID asString
>
>
>
> Stef
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

---
Jannik Laval


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: [Better Comment Initiative]: MooseElement

Stéphane Ducasse
In reply to this post by Tudor Girba-2
Ok I will change the comment and the trait I will not do it for now.
I want to focus on comments for now.

Stef


On Sep 18, 2011, at 9:12 PM, Tudor Girba wrote:

> Sounds Ok. Actually, we now have an issue opened that says that we should merge MooseElement and MooseEntity because there is no point in having them separated anymore.
>
> It would probably be better to have MooseElement as a Trait.
>
> Doru
>
>
> On 18 Sep 2011, at 19:18, Stéphane Ducasse wrote:
>
>>
>> We have
>>
>> MooseElement defines the minimal interface of an entity
>>
>>
>> Proposition: v2
>> ----------
>>
>> MooseElement defines the minimal interface of an entity: any moose entity should answer its mooseID, its mooseName and its mooseModel.
>>
>> A mooseID is an Integer that uniquely identifies this entity within the entire Moose environment.
>> It should not change nor be nil. It is generated automatically during the creation of the MooseEntity.
>>
>>
>> The mooseModel of an entity is must be an instance of MooseModel. It may be nil if the entity is not part of a model.
>> Each entity belongs to one and only one model, if an entity has not yet been added to a model or if an entity has been removed from a model
>> the mooseModel is undefined, that is it may be nil.
>>
>> An entity mooseName result a string version of the mooseID.
>>>
>>> No, it returns the name of the entity, or the symbol #noname.
>>
>> so what do we write
>>
>>
>> MooseElement>>mooseName
>> "Returns an unique identifier of this entity.  This method is mandatory, and must
>> return a Symbol or Integer that unqiuely identifies this entity within its model (but
>> not within the entire Moose enivronment, see MooseElement>>mooseID). The return
>> value must not be nil, and must never change. The implementation should be fast,
>> as this key may be used extensivley by the MooseModel or similar facilities."
>>
>> ^self mooseID asString
>>
>>
>>
>> Stef
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
> --
> www.tudorgirba.com
>
> "No matter how many recipes we know, we still value a chef."
>
>
>
>
>
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: [Better Comment Initiative]: MooseElement

Tudor Girba-2

On 18 Sep 2011, at 22:14, Stéphane Ducasse wrote:

> Ok I will change the comment and the trait I will not do it for now.
> I want to focus on comments for now.

Sure. I was just thinking out loud :)

Doru


> Stef
>
>
> On Sep 18, 2011, at 9:12 PM, Tudor Girba wrote:
>
>> Sounds Ok. Actually, we now have an issue opened that says that we should merge MooseElement and MooseEntity because there is no point in having them separated anymore.
>>
>> It would probably be better to have MooseElement as a Trait.
>>
>> Doru
>>
>>
>> On 18 Sep 2011, at 19:18, Stéphane Ducasse wrote:
>>
>>>
>>> We have
>>>
>>> MooseElement defines the minimal interface of an entity
>>>
>>>
>>> Proposition: v2
>>> ----------
>>>
>>> MooseElement defines the minimal interface of an entity: any moose entity should answer its mooseID, its mooseName and its mooseModel.
>>>
>>> A mooseID is an Integer that uniquely identifies this entity within the entire Moose environment.
>>> It should not change nor be nil. It is generated automatically during the creation of the MooseEntity.
>>>
>>>
>>> The mooseModel of an entity is must be an instance of MooseModel. It may be nil if the entity is not part of a model.
>>> Each entity belongs to one and only one model, if an entity has not yet been added to a model or if an entity has been removed from a model
>>> the mooseModel is undefined, that is it may be nil.
>>>
>>> An entity mooseName result a string version of the mooseID.
>>>>
>>>> No, it returns the name of the entity, or the symbol #noname.
>>>
>>> so what do we write
>>>
>>>
>>> MooseElement>>mooseName
>>> "Returns an unique identifier of this entity.  This method is mandatory, and must
>>> return a Symbol or Integer that unqiuely identifies this entity within its model (but
>>> not within the entire Moose enivronment, see MooseElement>>mooseID). The return
>>> value must not be nil, and must never change. The implementation should be fast,
>>> as this key may be used extensivley by the MooseModel or similar facilities."
>>>
>>> ^self mooseID asString
>>>
>>>
>>>
>>> Stef
>>> _______________________________________________
>>> Moose-dev mailing list
>>> [hidden email]
>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>
>> --
>> www.tudorgirba.com
>>
>> "No matter how many recipes we know, we still value a chef."
>>
>>
>>
>>
>>
>>
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
www.tudorgirba.com

"Live like you mean it."


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev