List Info

Thread: Prefixing inherited class's features




Prefixing inherited class's features
user name
2007-01-28 21:10:13
I have a deferred class BUFFER which I need two of in a
class such as:

class
  ONE
inherit
  BUFFER
  BUFFER
end

The problem is of course that every feature in each class
collides
with the other.

Is there an easy way to prefix or suffix every feature in a
class with
something such as "_bytes_" or
"_words_"?

I could just fully implement BUFFER in two separate classes
and then
use them as expanded instance variables but it would be nice
to be
able to use BUFFER without having to create two new classes
to make
the deferred class, BUFFER, effective.



 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http:/
/groups.yahoo.com/group/eiffel_software/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    ht
tp://groups.yahoo.com/group/eiffel_software/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:eiffel_software-digest@yahoogroups.com 
    mailto:eiffel_software-fullfeatured@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
    eiffel_software-unsubscribe@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.c
om/info/terms/
 

RE: Prefixing inherited class's features
user name
2007-01-29 15:48:31
  _____  

From: eiffel_software@yahoogroups.com
[mailto:eiffel_software@yahoogroups.com] On Behalf Of Bernd
Schoeller
Sent: Monday, January 29, 2007 4:02 AM
To: eiffel_software@yahoogroups.com
Subject: Re: [eiffel_software] Prefixing inherited class's
features

 

On Mon, 29 Jan 2007 07:54:23 +0100, Chris Saunders 
<evasmountaincable.
<mailto:evas%40mountaincable.net> net> wrote:

> Try something like this:
>
>
> class
>
> ONE
>
>
> inherit
>
> BUFFER
>
> rename
>
> feature1 as words_feature1
>
> feature2 as words_feature2
>
> end
>
>
> BUFFER
>
> rename
>
> feature1 as bytes_feature1
>
> feature2 as bytes_feature2
>
> end
>

>Do not forget that you will also need a massive 'select'
statement here.
>
>Bernd

Overlooked that.  "massive' only if "BUFFER"
is so - this may be quite easy.

 

Regards,

Chris Saunders



[Non-text portions of this message have been removed]



 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http:/
/groups.yahoo.com/group/eiffel_software/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    ht
tp://groups.yahoo.com/group/eiffel_software/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:eiffel_software-digest@yahoogroups.com 
    mailto:eiffel_software-fullfeatured@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
    eiffel_software-unsubscribe@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.c
om/info/terms/
 

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )