本文整理汇总了C++中CObjectTypeInfo::ResetGlobalReadHook方法的典型用法代码示例。如果您正苦于以下问题:C++ CObjectTypeInfo::ResetGlobalReadHook方法的具体用法?C++ CObjectTypeInfo::ResetGlobalReadHook怎么用?C++ CObjectTypeInfo::ResetGlobalReadHook使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CObjectTypeInfo
的用法示例。
在下文中一共展示了CObjectTypeInfo::ResetGlobalReadHook方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ResetHook
void CObjectHookGuardBase::ResetHook(const CObjectTypeInfo& info)
{
switch (m_HookType) {
case eHook_Object:
switch (m_HookMode) {
case eHook_Read:
if ( m_Stream.m_IStream ) {
info.ResetLocalReadHook(*m_Stream.m_IStream);
}
else {
info.ResetGlobalReadHook();
}
break;
case eHook_Write:
if ( m_Stream.m_OStream ) {
info.ResetLocalWriteHook(*m_Stream.m_OStream);
}
else {
info.ResetGlobalWriteHook();
}
break;
case eHook_Skip:
if ( m_Stream.m_IStream ) {
info.ResetLocalSkipHook(*m_Stream.m_IStream);
}
break;
case eHook_Copy:
if ( m_Stream.m_Copier ) {
info.ResetLocalCopyHook(*m_Stream.m_Copier);
}
else {
info.ResetGlobalCopyHook();
}
break;
default:
break;
}
break;
case eHook_Member:
{
CObjectTypeInfoMI member = info.FindMember(m_Id);
switch (m_HookMode) {
case eHook_Read:
if ( m_Stream.m_IStream ) {
member.ResetLocalReadHook(*m_Stream.m_IStream);
}
else {
member.ResetGlobalReadHook();
}
break;
case eHook_Write:
if ( m_Stream.m_OStream ) {
member.ResetLocalWriteHook(*m_Stream.m_OStream);
}
else {
member.ResetGlobalWriteHook();
}
break;
case eHook_Skip:
if ( m_Stream.m_IStream ) {
member.ResetLocalSkipHook(*m_Stream.m_IStream);
}
break;
case eHook_Copy:
if ( m_Stream.m_Copier ) {
member.ResetLocalCopyHook(*m_Stream.m_Copier);
}
else {
member.ResetGlobalCopyHook();
}
break;
default:
break;
}
break;
}
case eHook_Variant:
{
CObjectTypeInfoVI variant = info.FindVariant(m_Id);
switch (m_HookMode) {
case eHook_Read:
if ( m_Stream.m_IStream ) {
variant.ResetLocalReadHook(*m_Stream.m_IStream);
}
else {
variant.ResetGlobalReadHook();
}
break;
case eHook_Write:
if ( m_Stream.m_OStream ) {
variant.ResetLocalWriteHook(*m_Stream.m_OStream);
}
else {
variant.ResetGlobalWriteHook();
}
break;
case eHook_Skip:
if ( m_Stream.m_IStream ) {
variant.ResetLocalSkipHook(*m_Stream.m_IStream);
}
//.........这里部分代码省略.........