findAllObjectsByType doubt

ferrazrafaelferrazrafael Member Rafael FerrazOrganization: Federal University of Ouro PretoProject: MMOG
If the server call for findAllObjectsByType to its same type, it will get a proxy to himself?

If it gets, how can I see that this server is the same as on of the proxys received?

thanks

Comments

  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Hi,

    You can filter it out based on the identity of the Ice object, for example:
    // C++
    void
    HelloI::perform(const Ice::Current& current)
    {
         IceGrid::QueryPrx query = ...;
         Ice::ObjectPrxSeq seq = query->findAllObjectsByType("::Demo::Hello");
         for(Ice::ObjectPrxSeq::iterator p = seq.begin(); p != seq.end(); ++p)
         {
               if((*p)->ice_getIdentity() == current.id)
               {
                     seq.erase(p);
                     break;
               }
         }
         ...
    }
    

    Cheers,
    Benoit.
  • ferrazrafaelferrazrafael Member Rafael FerrazOrganization: Federal University of Ouro PretoProject: MMOG
    Thank you, there is any section of the documentation that I can see a detailed description of every Ice class?

    Like which methods are in every class and their details, like a doxygen document?
  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Hi,

    You can check out the Slice API Reference.

    For Ice generated types, such as proxies and servants, you should take a look at the relevant language mapping chapter in the Ice manual.

    Cheers,
    Benoit.
  • ferrazrafaelferrazrafael Member Rafael FerrazOrganization: Federal University of Ouro PretoProject: MMOG
    OK, but as a suggestion I think that a doxygen like documentation would help too. I find a little difficult to look in some class definition on Ice documentation. Sometimes I need to look on include ( .h) files to find what I'm looking for.

    Maybe if the documentation search show on the results a link to the object definition when you search for it, would help.

    Thank you Benoit
Sign In or Register to comment.