[Saga-devel] Adding a new (overloaded) method to an adaptor

Livesey, P (Paul) paul.livesey at stfc.ac.uk
Fri Jan 16 05:54:22 CST 2009


Hi all,

I've recently started working on the C++ implementation of the Service Discovery adaptor and have run into a slight problem.

There is currently one method implemented for service discovery which is list_services(std::string, std::string, std::string)
I wish to add another, also called list_services that takes only two strings, i.e. list_services(std::string, std::string)

Having gone through all the code making the changes I'm left with a slight problem when building my adaptor,
 there are errors due to "no matching function for call to `register_member_sync...."

Have I missed something or is there a bigger problem here?

In saga/impl/packages/sd/discoverer_cpi.hpp we have the following

/////////////////////////////////////////////////////////////////////////////////////////////
// register discoverer CPI functions
    template <typename Derived>
    inline bool
    register_discoverer_functions(
        std::vector<saga::impl::v1_0::cpi_info>& infos,
        saga::impl::v1_0::cpi::maker_type maker,
        saga::impl::v1_0::preference_type const& prefs,
        saga::uuid const& cpi_uuid, saga::uuid const& adaptor_uuid,
        std::string const& cpi_name)
    {
       bool retval = false;
       saga::impl::v1_0::cpi_info info(saga::adaptors::discoverer_cpi, 
           cpi_name, maker, prefs, cpi_uuid, adaptor_uuid);

       typedef saga::impl::v1_0::discoverer_cpi base_cpi;

       SAGA_REGISTER_MEMBER(retval, info, base_cpi, Derived, list_services, prefs)

       infos.push_back(info);
       return retval;  // is true if at least one function got registered
     }

How do I go about registering my new, overloaded list_services method?

Am I barking up the wrong tree or do all methods need to be uniquely named?

Any help is appreciated.

Paul.
-- 
Scanned by iCritical.


More information about the saga-devel mailing list