#include <zeusbase/System/ZObject.h>
#include <zeusbase/Remote/Interfaces/IRemoteObject.hpp>
#include <zeusbase/Remote/AbstractSkel.h>
Go to the source code of this file.
Define Documentation
| #define REMOTE_OBJECT_DECL |
Value:virtual void MQUALIFIER getClassName(IString& rName) const; \
virtual void MQUALIFIER getCodeModuleName(IString& rName) const; \
virtual Retval connect(const IString& rAddress, Uint uiPort); \
virtual Retval connect();
This macro defines concrete methods of the abstract remote object. Use it inside the concrete remote object declaration instead of writing lots of code.
| #define REMOTE_OBJECT_IMPL |
( |
|
classid, |
|
|
|
__classname, |
|
|
|
__codemodule, |
|
|
|
skel_class |
|
) |
| |
Value:void MQUALIFIER classid::getClassName(IString& rName) const\
{ \
rName.assign(__classname); \
} \
void MQUALIFIER classid::getCodeModuleName(IString& rName) const\
{ \
rName.assign(__codemodule); \
} \
Retval classid::connect(const IString& rAddress, Uint uiPort)\
{ \
m_strAddress = rAddress; \
m_uiPort = uiPort; \
m_ptrSkeleton.attach(new skel_class(*this)); \
return m_ptrSkeleton->startSkeleton(m_strAddress, m_uiPort, false); \
} \
\
Retval classid::connect() \
{ \
m_strAddress = L"127.0.0.1"; \
m_uiPort = 0; \
m_ptrSkeleton.attach(new skel_class(*this)); \
return m_ptrSkeleton->startSkeleton(m_strAddress, m_uiPort, true); \
} \
This macro defines concrete methods of the abstract remote object. Use it inside the concrete remote object implementation instead of writing lots of code.
- Parameters:
-
| classid | : ID of the concrete class |
| __classname | : Name of the concrete class |
| __codemodule | : Name of the code module |
| skel_class | : ClassID of the skeleton class |