📄 handle.i
字号:
/***********************************************************************
IEEE 1516.1 High Level Architecture Interface Specification C++ API
File: RTI/Handle.i
***********************************************************************/
template<class HandleImplementationType,
class EncodedHandleImplementationType,
class HandleReturnType,
int i>
RTI::Handle<HandleImplementationType,
EncodedHandleImplementationType,
HandleReturnType,
i >::
Handle ()
{
}
template<class HandleImplementationType,
class EncodedHandleImplementationType,
class HandleReturnType,
int i>
RTI::Handle<HandleImplementationType,
EncodedHandleImplementationType,
HandleReturnType,
i >::
Handle (HandleImplementationType impl)
: _impl(impl)
{
}
template<class HandleImplementationType,
class EncodedHandleImplementationType,
class HandleReturnType,
int i>
RTI::Handle<HandleImplementationType,
EncodedHandleImplementationType,
HandleReturnType,
i >::
Handle(EncodedHandleImplementationType encodedHandle)
{
memcpy(&_impl,encodedHandle.data(), encodedHandle.size());
}
template<class HandleImplementationType,
class EncodedHandleImplementationType,
class HandleReturnType,
int i>
RTI::Handle<HandleImplementationType,
EncodedHandleImplementationType,
HandleReturnType,
i >::
Handle (Handle const & rhs)
: _impl(rhs._impl)
{
}
template<class HandleImplementationType,
class EncodedHandleImplementationType,
class HandleReturnType,
int i>
RTI::Handle<HandleImplementationType,
EncodedHandleImplementationType,
HandleReturnType,
i >::
~Handle ()
throw()
{
}
template<class HandleImplementationType,
class EncodedHandleImplementationType,
class HandleReturnType,
int i>
RTI::Handle<HandleImplementationType,
EncodedHandleImplementationType,
HandleReturnType,
i > &
RTI::Handle<HandleImplementationType,
EncodedHandleImplementationType,
HandleReturnType,
i >::
operator= (Handle const & rhs)
{
if (&rhs != this)
{
_impl = rhs._impl;
}
return *this;
}
template<class HandleImplementationType,
class EncodedHandleImplementationType,
class HandleReturnType,
int i>
bool
RTI::Handle<HandleImplementationType,
EncodedHandleImplementationType,
HandleReturnType,
i >::
operator== (Handle const & rhs) const
{
return _impl == rhs._impl;
}
template<class HandleImplementationType,
class EncodedHandleImplementationType,
class HandleReturnType,
int i>
bool
RTI::Handle<HandleImplementationType,
EncodedHandleImplementationType,
HandleReturnType,
i >::
operator!= (Handle const & rhs) const
{
return _impl != rhs._impl;
}
template<class HandleImplementationType,
class EncodedHandleImplementationType,
class HandleReturnType,
int i>
bool
RTI::Handle<HandleImplementationType,
EncodedHandleImplementationType,
HandleReturnType,
i >::
operator< (Handle const & rhs) const
{
return _impl < rhs._impl;
}
template<class HandleImplementationType,
class EncodedHandleImplementationType,
class HandleReturnType,
int i>
EncodedHandleImplementationType
RTI::Handle<HandleImplementationType,
EncodedHandleImplementationType,
HandleReturnType,
i >::
encode() const
{
return EncodedHandleImplementationType(&_impl,
sizeof(HandleImplementationType));
}
template<class HandleImplementationType,
class EncodedHandleImplementationType,
class HandleReturnType,
int i>
HandleReturnType
RTI::Handle<HandleImplementationType,
EncodedHandleImplementationType,
HandleReturnType,
i >::
getImplementation() const
{
return _impl;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -