Information
We are currently investigating an issue with the editor of some pages. Please save your work and avoid to create new pages until this banner is gone.
Table of Contents |
---|
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
#ifndef _ASYNC_IDL_ #define _ASYNC_IDL_ #pragma prefix "acs" #include <acscommon.idl> #include <acscomponent.idl> module examples { interface MyCallback: ACS::OffShoot { void update(in string text); }; interface Async : ACS::ACSComponent { oneway void delayResult(in ACS::uLong delay, in MyCallback cb); }; }; #endif |
...
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
#ifndef _ASYNC_IMPL_H #define _ASYNC_IMPL_H #include <acscomponentImpl.h> #include <AsyncS.h> class AsyncImpl : public virtual acscomponent::ACSComponentImpl, public virtual POA_workshop::Async { public: AsyncImpl(const ACE_CString& name, maci::ContainerServices* containerServices); virtual ~AsyncImpl(); void delayResult(ACS::uLong delay, acs::examples::MyCallback_ptr cb); }; #endif |
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
#include <AsyncImpl.h> #include <ACSErrTypeOK.h> AsyncImpl::AsyncImpl(const ACE_CString& name, maci::ContainerServices* containerServices) : acscomponent::ACSComponentImpl(name, containerServices) { } AsyncImpl::~AsyncImpl() { } void AsyncImpl::delayResult(ACS::uLong delay, acs::examples::MyCallback_ptr cb) { cb->update("Working"); sleep(delay); cb->update("Done"); } /* --------------- [ MACI DLL support functions ] -----------------*/ #include <maciACSComponentDefines.h> MACI_DLL_SUPPORT_FUNCTIONS(AsyncImpl) /* ----------------------------------------------------------------*/ |
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
<e Name="ASYNC" Code="AsyncImpl" Type="IDL:alma/workshop/Async:1.0" Container="bilboContainer" ImplLang="cpp" KeepAliveTime="0" /> |
...