Home Help Center

Dynamic type knowledge

kovacmkovacm Member Michal KovacOrganization: Charles University in PragueProject: Ferda Data Mining ✭✭
I would like this:

My C# application will connect many ice objects together and invoke some methods of these objects. The problem is, that it will not know before, how objects will exactly look like.These objects will make other programmers. I would like to make it for them simplest it can be.

If I would like to make it for them easy, I think slice for those objects can be something like:
module something {
  interface Aaa extends MyBasicObject {
    //methods for connecting to other object (every this method will start with setInterface)
    void setInterfaceSimpleBbb(*Bbb bbbName);

    //methods for invoking (every this method will start with invoke)
    void invokeShow();
  }

  interface Bbb extends MyBasicObject {
  //something
  }
}

My application dont know this slice definition at compilation, only MyBasicObject I will know. And now it have to know that there exist object Aaa which needs one interface Bbb, which I can set by setInterfaceSimpleBbb. So if I understand I can over IcePack::Query get all object of type MyBasicObject. But after that, how can I read all object information and how can a know that setInterfaceSimpleBbb has one parametr of type *Bbb?

Thank you

Comments

  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Ice doesn't support any reflection API to inspect the Slice definitions at runtime. You could use the C# reflection API and inspect the generated code. However, if we change the format of the generated code, you'll have to change your code, so that's not ideal.

    We could put such a reflection API on our TODO list. If you have a commercial need for such a feature, please contact us at [email protected].

    Benoit.
  • kovacmkovacm Member Michal KovacOrganization: Charles University in PragueProject: Ferda Data Mining ✭✭
    It's bad

    Thank you.
    benoit wrote:
    Ice doesn't support any reflection API to inspect the Slice definitions at runtime.
    It is bad, I think that if you have dynamic invokation it is good also to have this for "really dynamic work with objects".
    benoit wrote:
    We could put such a reflection API on our TODO list.
    Yes, I think it is good thing to do.

    This application will not be commercial and now I can do it ugly :-( .
Sign In or Register to comment.