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

📄 stltypes.hpp

📁 ncbi源码
💻 HPP
📖 第 1 页 / 共 3 页
字号:
        {            TElementType* dummy = 0;            CStlTwoArgsTemplate* info =                new CStlTwoArgsTemplate                (sizeof(TObjectType),                 keyType,                 reinterpret_cast<TPointerOffsetType>(&dummy->first),                 valueType,                 reinterpret_cast<TPointerOffsetType>(&dummy->second),                 true);                        CStlClassInfoFunctions<TObjectType>::SetMemFunctions(info);            CStlClassInfoFunctions_set<TObjectType>::SetAddElementFunctions(info);            CStlClassInfoFunctionsCI<TObjectType>::SetIteratorFunctions(info);            CStlClassInfoFunctionsI_set<TObjectType>::SetIteratorFunctions(info);                        return info;        }};template<typename Key, typename Value>class CStlClassInfo_multimap{public:    typedef multimap<Key, Value> TObjectType;    typedef typename TObjectType::value_type TElementType;    static TTypeInfo GetTypeInfo(TTypeInfo keyType, TTypeInfo valueType)        {            return CStlClassInfoUtil::Get_multimap(keyType, valueType,                                                   &CreateTypeInfo);        }    static CTypeInfo* CreateTypeInfo(TTypeInfo keyType, TTypeInfo valueType)        {            TElementType* dummy = 0;            CStlTwoArgsTemplate* info =                new CStlTwoArgsTemplate                (sizeof(TObjectType),                 keyType,                 reinterpret_cast<TPointerOffsetType>(&dummy->first),                 valueType,                 reinterpret_cast<TPointerOffsetType>(&dummy->second),                 true);                        CStlClassInfoFunctions<TObjectType>::SetMemFunctions(info);            CStlClassInfoFunctions_multiset<TObjectType>::SetAddElementFunctions(info);            CStlClassInfoFunctionsCI<TObjectType>::SetIteratorFunctions(info);            CStlClassInfoFunctionsI_set<TObjectType>::SetIteratorFunctions(info);                        return info;        }};END_NCBI_SCOPE#endif  /* STLTYPES__HPP *//* @} *//* ---------------------------------------------------------------------------* $Log: stltypes.hpp,v $* Revision 1000.2  2004/06/01 19:39:10  gouriano* PRODUCTION: UPGRADED [GCC34_MSVC7] Dev-tree R1.69** Revision 1.69  2004/04/26 16:40:59  ucko* Tweak for GCC 3.4 compatibility.** Revision 1.68  2004/04/02 16:57:35  gouriano* made it possible to create named CTypeInfo for containers** Revision 1.67  2004/03/25 15:57:55  gouriano* Added possibility to copy and compare serial object non-recursively** Revision 1.66  2003/08/26 19:24:47  gouriano* added possibility to discard a member of an STL container* (from a read hook)** Revision 1.65  2003/08/14 20:03:57  vasilche* Avoid memory reallocation when reading over preallocated object.* Simplified CContainerTypeInfo iterators interface.** Revision 1.64  2003/07/22 21:47:04  vasilche* Added SET OF implemented as vector<>.** Revision 1.63  2003/04/15 16:19:03  siyan* Added doxygen support** Revision 1.62  2002/12/23 18:38:51  dicuccio* Added WIn32 export specifier: NCBI_XSERIAL_EXPORT.* Moved all CVS logs to the end.** Revision 1.61  2002/06/27 21:19:49  ucko* Fix a memory leak in CStlClassInfoFunctions<>::AddElement (used by Assign)** Revision 1.60  2002/06/19 21:42:58  ucko* Tweak CStlClassInfo_(multi)map<>::CreateTypeInfo() to avoid GCC 3.1* warnings -- yes, we should technically be using pointer-to-member* types, but the offsets are constant in practice.** Revision 1.59  2002/04/12 19:31:31  grichenk* Fixed containers assignment** Revision 1.58  2001/09/04 14:08:27  ucko* Handle CConstRef analogously to CRef in type macros** Revision 1.57  2001/05/17 14:59:47  lavr* Typos corrected** Revision 1.56  2001/01/29 15:19:56  vasilche* Reduced memory usage on Sun.** Revision 1.55  2000/11/07 17:25:13  vasilche* Fixed encoding of XML:*     removed unnecessary apostrophes in OCTET STRING*     removed unnecessary content in NULL* Added module names to CTypeInfo and CEnumeratedTypeValues** Revision 1.54  2000/10/13 20:22:47  vasilche* Fixed warnings on 64 bit compilers.* Fixed missing typename in templates.** Revision 1.53  2000/10/13 16:28:33  vasilche* Reduced header dependency.* Avoid use of templates with virtual methods.* Reduced amount of different maps used.* All this lead to smaller compiled code size (libraries and programs).** Revision 1.52  2000/10/03 17:22:35  vasilche* Reduced header dependency.* Reduced size of debug libraries on WorkShop by 3 times.* Fixed tag allocation for parent classes.* Fixed CObject allocation/deallocation in streams.* Moved instantiation of several templates in separate source file.** Revision 1.51  2000/09/19 20:16:53  vasilche* Fixed type in CStlClassInfo_auto_ptr.* Added missing include serialutil.hpp.** Revision 1.50  2000/09/18 20:00:11  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.** Revision 1.49  2000/09/01 18:16:47  vasilche* Added files to MSVC project.* Fixed errors on MSVC.** Revision 1.48  2000/09/01 13:16:03  vasilche* Implemented class/container/choice iterators.* Implemented CObjectStreamCopier for copying data without loading into memory.** Revision 1.47  2000/08/15 19:44:42  vasilche* Added Read/Write hooks:* CReadObjectHook/CWriteObjectHook for objects of specified type.* CReadClassMemberHook/CWriteClassMemberHook for specified members.* CReadChoiceVariantHook/CWriteChoiceVariant for specified choice variants.* CReadContainerElementHook/CWriteContainerElementsHook for containers.** Revision 1.46  2000/07/10 19:32:05  vasilche* Avoid one more internal compiler error of WorkShop C++.** Revision 1.45  2000/07/10 19:01:00  vasilche* Avoid internal WorkShop C++ compiler error.** Revision 1.44  2000/07/03 18:42:38  vasilche* Added interface to typeinfo via CObjectInfo and CConstObjectInfo.* Reduced header dependency.** Revision 1.43  2000/06/16 20:01:21  vasilche* Avoid use of unexpected_exception() which is unimplemented on Mac.** Revision 1.42  2000/06/16 16:31:08  vasilche* Changed implementation of choices and classes info to allow use of the same classes in generated and user written classes.** Revision 1.41  2000/06/01 19:06:58  vasilche* Added parsing of XML data.** Revision 1.40  2000/05/25 13:27:13  vasilche* Fixed error with mixing list<> and set<>.** Revision 1.39  2000/05/24 20:50:51  vasilche* Fixed compilation error.** Revision 1.38  2000/05/24 20:08:15  vasilche* Implemented XML dump.** Revision 1.37  2000/05/09 16:38:34  vasilche* CObject::GetTypeInfo now moved to CObjectGetTypeInfo::GetTypeInfo to reduce possible errors.* Added write context to CObjectOStream.* Inlined most of methods of helping class Member, Block, ByteBlock etc.** Revision 1.36  2000/05/04 16:22:22  vasilche* Cleaned and optimized blocks and members.** Revision 1.35  2000/04/10 21:01:39  vasilche* Fixed Erase for map/set.* Added iteratorbase.hpp header for basic internal classes.** Revision 1.34  2000/04/10 18:01:52  vasilche* Added Erase() for STL types in type iterators.** Revision 1.33  2000/03/29 15:55:22  vasilche* Added two versions of object info - CObjectInfo and CConstObjectInfo.* Added generic iterators by class -* 	CTypeIterator<class>, CTypeConstIterator<class>,* 	CStdTypeIterator<type>, CStdTypeConstIterator<type>,* 	CObjectsIterator and CObjectsConstIterator.** Revision 1.32  2000/03/10 15:01:42  vasilche* Fixed OPTIONAL members reading.** Revision 1.31  2000/03/07 14:05:32  vasilche* Added stream buffering to ASN.1 binary input.* Optimized class loading/storing.* Fixed bugs in processing OPTIONAL fields.** Revision 1.30  2000/02/17 20:02:29  vasilche* Added some standard serialization exceptions.* Optimized text/binary ASN.1 reading.* Fixed wrong encoding of StringStore in ASN.1 binary format.* Optimized logic of object collection.** Revision 1.29  2000/01/10 19:46:34  vasilche* Fixed encoding/decoding of REAL type.* Fixed encoding/decoding of StringStore.* Fixed encoding/decoding of NULL type.* Fixed error reporting.* Reduced object map (only classes).** Revision 1.28  2000/01/05 19:43:47  vasilche* Fixed error messages when reading from ASN.1 binary file.* Fixed storing of integers with enumerated values in ASN.1 binary file.* Added TAG support to key/value of map.* Added support of NULL variant in CHOICE.** Revision 1.27  1999/12/28 21:04:22  vasilche* Removed three more implicit virtual destructors.** Revision 1.26  1999/12/28 18:55:40  vasilche* Reduced size of compiled object files:* 1. avoid inline or implicit virtual methods (especially destructors).* 2. avoid std::string's methods usage in inline methods.* 3. avoid string literals ("xxx") in inline methods.** Revision 1.25  1999/12/17 19:04:54  vasilche* Simplified generation of GetTypeInfo methods.** Revision 1.24  1999/12/01 17:36:21  vasilche* Fixed CHOICE processing.** Revision 1.23  1999/10/26 15:25:21  vasilche* Added multiset implementation.** Revision 1.22  1999/10/08 21:00:39  vasilche* Implemented automatic generation of unnamed ASN.1 types.** Revision 1.21  1999/09/27 14:17:59  vasilche* Fixed bug with overloaded constructors of Block.** Revision 1.20  1999/09/22 20:11:51  vasilche* Modified for compilation on IRIX native c++ compiler.** Revision 1.19  1999/09/14 18:54:06  vasilche* Fixed bugs detected by gcc & egcs.* Removed unneeded includes.** Revision 1.18  1999/09/01 17:38:03  vasilche* Fixed vector<char> implementation.* Added explicit naming of class info.* Moved IMPLICIT attribute from member info to class info.** Revision 1.17  1999/08/31 17:50:04  vasilche* Implemented several macros for specific data types.* Added implicit members.* Added multimap and set.** Revision 1.16  1999/07/20 18:22:57  vasilche* Added interface to old ASN.1 routines.* Added fixed choice of subclasses to use for pointers.** Revision 1.15  1999/07/19 15:50:20  vasilche* Added interface to old ASN.1 routines.* Added naming of key/value in STL map.** Revision 1.14  1999/07/15 19:35:06  vasilche* Implemented map<K, V>.** Revision 1.13  1999/07/15 16:59:55  vasilche* Fixed template use in typedef.** Revision 1.12  1999/07/15 16:54:44  vasilche* Implemented vector<X> & vector<char> as special case.** Revision 1.11  1999/07/13 20:18:08  vasilche* Changed types naming.** Revision 1.10  1999/07/01 17:55:22  vasilche* Implemented ASN.1 binary write.** Revision 1.9  1999/06/30 16:04:38  vasilche* Added support for old ASN.1 structures.** Revision 1.8  1999/06/24 14:44:46  vasilche* Added binary ASN.1 output.** Revision 1.7  1999/06/16 20:35:25  vasilche* Cleaned processing of blocks of data.* Added input from ASN.1 text format.** Revision 1.6  1999/06/15 16:20:08  vasilche* Added ASN.1 object output stream.** Revision 1.5  1999/06/11 19:15:50  vasilche* Working binary serialization and deserialization of first test object.** Revision 1.4  1999/06/10 21:06:42  vasilche* Working binary output and almost working binary input.** Revision 1.3  1999/06/09 18:39:00  vasilche* Modified templates to work on Sun.** Revision 1.2  1999/06/04 20:51:39  vasilche* First compilable version of serialization.** Revision 1.1  1999/05/19 19:56:31  vasilche* Commit just in case.** ===========================================================================*/

⌨️ 快捷键说明

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