[Gtk-sharp-list] Implementing interfaces in .metadata file

Charles Iliya Krempeaux charles@reptile.ca
21 Apr 2003 11:38:14 -0700


Hello,

On Mon, 2003-04-21 at 09:04, Charles Iliya Krempeaux wrote:
> Hello,
> 
> Just one thing.  For the generator.  In addition to making it so
> you can make a class "implement" an interface.  It would also be
> nice if you could make a method, property, etc, "override" one
> found in an interface.

Reading what I wrote again, it seems like what I meant my not be
completely clear, from what I wrote.

What I mean, is that, for the automatically generated methods
and properties.  It would be nice if we could add the "override"
keyword to their definition (through some kind of marker in the
.metadata file.).

That way, we could make that property or method be the (overriding)
implementation for a property or method from an interface.

So, if we have an interface...

    interface ISomething
    {
        void DoIt();
        void DoSomethingElse();
    }

And we have a class that would normally be automatically
generated as:

    class MyClass
    {
        void DoIt();
        void GoForAWalk();
        void Sing();
    }

Then I want to be able to modify this (through the .metadata file)
to first become this:

    class MyClass
        : ISomething
    {
        public void DoIt();
        public void GoForAWalk();
        public void Sing();
    }

(By specifying that I want this class to implement the
"ISomething" interface, in the .metadata file.)

And then become this:

    class MyClass
        : ISomething
    {
        public override void DoIt() {}
        public void GoForAWalk()    {}
        public void Sing()          {}
    }

(By specifying that I want the automatically generated
"DoIt" method to be an overriding method.)

And then, with a .custom file, I can add the definition
for the "DoSomethingElse" method.  And get:

    class MyClass
        : ISomething
    {
        public override void DoIt()   {}
        public void GoForAWalk()      {}
        public void Sing()            {}
        public void DoSomethingElse() {}
    }



See ya

-- 
     Charles Iliya Krempeaux, BSc
     charles@reptile.ca

________________________________________________________________________
 Reptile Consulting & Services    604-REPTILE    http://www.reptile.ca/