覆盖Ice类方法的问题

时间:2019-05-05 21:02:48

标签: c++ ice

问题如下。我正在编写一个ZeroC Ice应用程序,并尝试实现如下所示的Ice接口方法:

virtual RegistrationResult createAccount(UserInfo userInfo, const ::Ice::Current& current) = 0;

virtual ::std::shared_ptr<AccountPrx> obtainAccess(::std::string pesel, const ::Ice::Current& current) = 0;

在我的类定义中,它们看起来像这样:

virtual RegistrationResult createAccount(const Accounts::UserInfo&, const Ice::Current&) override ;

virtual AccountPrx obtainAccess(const std::string &pesel, const Ice::Current &current) override;

问题是代码无法编译。我收到以下错误:

error: ‘virtual Accounts::RegistrationResult AccountFactoryI::createAccount(const Accounts::UserInfo&, const Ice::Current&)’ marked ‘override’, but does not override
 virtual RegistrationResult createAccount(const Accounts::UserInfo&, const Ice::Current&) override ;

第二种方法也会发生相同的错误。

0 个答案:

没有答案