⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 variant.inl

📁 ncbi源码
💻 INL
字号:
/* * =========================================================================== * PRODUCTION $Log: variant.inl,v $ * PRODUCTION Revision 1000.1  2003/12/02 20:34:09  gouriano * PRODUCTION PRODUCTION: UPGRADED [ORIGINAL] Dev-tree R1.12 * PRODUCTION * =========================================================================== */#if defined(VARIANT__HPP)  &&  !defined(VARIANT__INL)#define VARIANT__INL/*  $Id: variant.inl,v 1000.1 2003/12/02 20:34:09 gouriano Exp $* ===========================================================================**                            PUBLIC DOMAIN NOTICE*               National Center for Biotechnology Information**  This software/database is a "United States Government Work" under the*  terms of the United States Copyright Act.  It was written as part of*  the author's official duties as a United States Government employee and*  thus cannot be copyrighted.  This software/database is freely available*  to the public for use. The National Library of Medicine and the U.S.*  Government have not placed any restriction on its use or reproduction.**  Although all reasonable efforts have been taken to ensure the accuracy*  and reliability of the software and data, the NLM and the U.S.*  Government do not and cannot warrant the performance or results that*  may be obtained by using this software or data. The NLM and the U.S.*  Government disclaim all warranties, express or implied, including*  warranties of performance, merchantability or fitness for any particular*  purpose.**  Please cite the author in any work or product based on this material.** ===========================================================================** Author: Eugene Vasilchenko** File Description:*   !!! PUT YOUR DESCRIPTION HERE !!!*/inlineconst CChoiceTypeInfo* CVariantInfo::GetChoiceType(void) const{    return m_ChoiceType;}inlineCVariantInfo::EVariantType CVariantInfo::GetVariantType(void) const{    return m_VariantType;}inlineCVariantInfo* CVariantInfo::SetNoPrefix(void){    GetId().SetNoPrefix();    return this;}inlineCVariantInfo* CVariantInfo::SetNotag(void){    GetId().SetNotag();    return this;}inlinebool CVariantInfo::IsInline(void) const{    return GetVariantType() == eInlineVariant;}inlinebool CVariantInfo::IsNonObjectPointer(void) const{    return GetVariantType() == eNonObjectPointerVariant;}inlinebool CVariantInfo::IsObjectPointer(void) const{    return GetVariantType() == eObjectPointerVariant;}inlinebool CVariantInfo::IsSubClass(void) const{    return GetVariantType() == eSubClassVariant;}inlinebool CVariantInfo::IsNotPointer(void) const{    return (GetVariantType() & ePointerFlag) == 0;}inlinebool CVariantInfo::IsPointer(void) const{    return (GetVariantType() & ePointerFlag) != 0;}inlinebool CVariantInfo::IsNotObject(void) const{    return (GetVariantType() & eObjectFlag) == 0;}inlinebool CVariantInfo::IsObject(void) const{    return (GetVariantType() & eObjectFlag) != 0;}inlinebool CVariantInfo::CanBeDelayed(void) const{    return m_DelayOffset != eNoOffset;}inlineCDelayBuffer& CVariantInfo::GetDelayBuffer(TObjectPtr object) const{    return CTypeConverter<CDelayBuffer>::Get(CRawPointer::Add(object, m_DelayOffset));}inlineconst CDelayBuffer& CVariantInfo::GetDelayBuffer(TConstObjectPtr object) const{    return CTypeConverter<const CDelayBuffer>::Get(CRawPointer::Add(object, m_DelayOffset));}inlineTConstObjectPtr CVariantInfo::GetVariantPtr(TConstObjectPtr choicePtr) const{    return m_GetConstFunction(this, choicePtr);}inlineTObjectPtr CVariantInfo::GetVariantPtr(TObjectPtr choicePtr) const{    return m_GetFunction(this, choicePtr);}inlinevoid CVariantInfo::ReadVariant(CObjectIStream& stream,                               TObjectPtr choicePtr) const{    m_ReadHookData.GetCurrentFunction()(stream, this, choicePtr);}inlinevoid CVariantInfo::WriteVariant(CObjectOStream& stream,                                TConstObjectPtr choicePtr) const{    m_WriteHookData.GetCurrentFunction()(stream, this, choicePtr);}inlinevoid CVariantInfo::SkipVariant(CObjectIStream& stream) const{    m_SkipHookData.GetCurrentFunction()(stream, this);}inlinevoid CVariantInfo::CopyVariant(CObjectStreamCopier& stream) const{    m_CopyHookData.GetCurrentFunction()(stream, this);}inlinevoid CVariantInfo::DefaultReadVariant(CObjectIStream& stream,                                      TObjectPtr choicePtr) const{    m_ReadHookData.GetDefaultFunction()(stream, this, choicePtr);}inlinevoid CVariantInfo::DefaultWriteVariant(CObjectOStream& stream,                                TConstObjectPtr choicePtr) const{    m_WriteHookData.GetDefaultFunction()(stream, this, choicePtr);}inlinevoid CVariantInfo::DefaultSkipVariant(CObjectIStream& stream) const{    m_SkipHookData.GetDefaultFunction()(stream, this);}inlinevoid CVariantInfo::DefaultCopyVariant(CObjectStreamCopier& stream) const{    m_CopyHookData.GetDefaultFunction()(stream, this);}#endif /* def VARIANT__HPP  &&  ndef VARIANT__INL *//* ---------------------------------------------------------------------------* $Log: variant.inl,v $* Revision 1000.1  2003/12/02 20:34:09  gouriano* PRODUCTION: UPGRADED [ORIGINAL] Dev-tree R1.12** Revision 1.12  2003/12/01 19:04:23  grichenk* Moved Add and Sub from serialutil to ncbimisc, made them methods* of CRawPointer class.** Revision 1.11  2003/07/29 18:47:47  vasilche* Fixed thread safeness of object stream hooks.** Revision 1.10  2002/12/23 18:38:52  dicuccio* Added WIn32 export specifier: NCBI_XSERIAL_EXPORT.* Moved all CVS logs to the end.** Revision 1.9  2002/11/20 21:18:21  gouriano* corrected SetNotag method** Revision 1.8  2002/11/19 19:45:55  gouriano* added SetNotag method** Revision 1.7  2002/10/15 13:39:06  gouriano* added "noprefix" flag** Revision 1.6  2002/09/09 18:14:00  grichenk* Added CObjectHookGuard class.* Added methods to be used by hooks for data* reading and skipping.** Revision 1.5  2000/10/13 20:22:47  vasilche* Fixed warnings on 64 bit compilers.* Fixed missing typename in templates.** Revision 1.4  2000/09/29 16:18:15  vasilche* Fixed binary format encoding/decoding on 64 bit compulers.* Implemented CWeakMap<> for automatic cleaning map entries.* Added cleaning local hooks via CWeakMap<>.* Renamed ReadTypeName -> ReadFileHeader, ENoTypeName -> ENoFileHeader.* Added some user interface methods to CObjectIStream, CObjectOStream and* CObjectStreamCopier.** Revision 1.3  2000/09/26 19:24:54  vasilche* Added user interface for setting read/write/copy hooks.** Revision 1.2  2000/09/26 17:38:08  vasilche* Fixed incomplete choiceptr implementation.* Removed temporary comments.** Revision 1.1  2000/09/18 20:00:12  vasilche* Separated CVariantInfo and CMemberInfo.* Implemented copy hooks.* All hooks now are stored in CTypeInfo/CMemberInfo/CVariantInfo.* Most type specific functions now are implemented via function pointers instead of virtual functions.** ===========================================================================*/

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -