NCBI C++ ToolKit
vector_serial.hpp File Reference
#include <corelib/ncbistd.hpp>
#include <util/simple_buffer.hpp>
#include <algo/text/vector.hpp>
+ Include dependency graph for vector_serial.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Go to the SVN repository for this file.

Functions

Serialization interfaces
template<class Key , class Score >
void Serialize (CNcbiOstream &, const CRawScoreVector< Key, Score > &)
 Generics These throw an exception; we must implement serialization for each type. More...
 
template<class Key , class Score >
void Deserialize (CNcbiIstream &istr, CRawScoreVector< Key, Score > &)
 
template<class Key , class Score >
void Serialize (CNcbiOstream &, const CScoreVector< Key, Score > &)
 
template<class Key , class Score >
void Deserialize (CNcbiIstream &istr, CScoreVector< Key, Score > &)
 
template<class Key , class Score >
void Encode (const CRawScoreVector< Key, Score > &, vector< char > &)
 
template<class Key , class Score >
void Encode (const CRawScoreVector< Key, Score > &, vector< unsigned char > &)
 
template<class Key , class Score >
void Encode (const CRawScoreVector< Key, Score > &, CSimpleBuffer &)
 
template<class Key , class Score >
void Decode (const vector< char > &, CRawScoreVector< Key, Score > &)
 
template<class Key , class Score >
void Decode (const vector< unsigned char > &, CRawScoreVector< Key, Score > &)
 
template<class Key , class Score >
void Decode (const CSimpleBuffer &, CRawScoreVector< Key, Score > &)
 
template<class Key , class Score >
void Decode (const void *, size_t, CRawScoreVector< Key, Score > &)
 
template<class Key , class Score >
void Encode (const CScoreVector< Key, Score > &, vector< char > &)
 
template<class Key , class Score >
void Encode (const CScoreVector< Key, Score > &, vector< unsigned char > &)
 
template<class Key , class Score >
void Encode (const CScoreVector< Key, Score > &, CSimpleBuffer &)
 
template<class Key , class Score >
void Decode (const vector< char > &, CScoreVector< Key, Score > &)
 
template<class Key , class Score >
void Decode (const vector< unsigned char > &, CScoreVector< Key, Score > &)
 
template<class Key , class Score >
void Decode (const CSimpleBuffer &, CScoreVector< Key, Score > &)
 
template<class Key , class Score >
void Decode (const void *, size_t, CScoreVector< Key, Score > &)
 
template<>
void Serialize< Uint4, float > (CNcbiOstream &ostr, const CRawScoreVector< Uint4, float > &vec)
 Specializations for known types. More...
 
template<>
void Deserialize< Uint4, float > (CNcbiIstream &istr, CRawScoreVector< Uint4, float > &vec)
 
template<>
void Encode< Uint4, float > (const CRawScoreVector< Uint4, float > &vec, vector< unsigned char > &data)
 
template<>
void Encode< Uint4, float > (const CRawScoreVector< Uint4, float > &vec, vector< char > &data)
 
template<>
void Encode< Uint4, float > (const CRawScoreVector< Uint4, float > &vec, CSimpleBuffer &data)
 
template<>
void Decode< Uint4, float > (const vector< unsigned char > &data, CRawScoreVector< Uint4, float > &vec)
 
template<>
void Decode< Uint4, float > (const vector< char > &data, CRawScoreVector< Uint4, float > &vec)
 
template<>
void Decode< Uint4, float > (const CSimpleBuffer &data, CRawScoreVector< Uint4, float > &vec)
 
template<>
void Decode< Uint4, float > (const void *data, size_t size, CRawScoreVector< Uint4, float > &vec)
 
template<>
void Serialize< Uint4, float > (CNcbiOstream &ostr, const CScoreVector< Uint4, float > &vec)
 
template<>
void Deserialize< Uint4, float > (CNcbiIstream &istr, CScoreVector< Uint4, float > &vec)
 
template<>
void Encode< Uint4, float > (const CScoreVector< Uint4, float > &vec, vector< char > &data)
 
template<>
void Encode< Uint4, float > (const CScoreVector< Uint4, float > &vec, vector< unsigned char > &data)
 
template<>
void Encode< Uint4, float > (const CScoreVector< Uint4, float > &vec, CSimpleBuffer &data)
 
template<>
void Decode< Uint4, float > (const vector< char > &data, CScoreVector< Uint4, float > &vec)
 
template<>
void Decode< Uint4, float > (const vector< unsigned char > &data, CScoreVector< Uint4, float > &vec)
 
template<>
void Decode< Uint4, float > (const CSimpleBuffer &data, CScoreVector< Uint4, float > &vec)
 
template<>
void Decode< Uint4, float > (const void *data, size_t size, CScoreVector< Uint4, float > &vec)
 
template<>
void Serialize< string, float > (CNcbiOstream &ostr, const CScoreVector< string, float > &vec)
 String based keys Raw vector encoding is not supported. More...
 
template<>
void Deserialize< string, float > (CNcbiIstream &istr, CScoreVector< string, float > &vec)
 
template<>
void Encode< string, float > (const CScoreVector< string, float > &vec, vector< unsigned char > &data)
 
template<>
void Encode< string, float > (const CScoreVector< string, float > &vec, vector< char > &data)
 
template<>
void Encode< string, float > (const CScoreVector< string, float > &vec, CSimpleBuffer &data)
 
template<>
void Decode< string, float > (const vector< unsigned char > &data, CScoreVector< string, float > &vec)
 
template<>
void Decode< string, float > (const vector< char > &data, CScoreVector< string, float > &vec)
 
template<>
void Decode< string, float > (const CSimpleBuffer &data, CScoreVector< string, float > &vec)
 
template<>
void Decode< string, float > (const void *data, size_t size, CScoreVector< string, float > &vec)
 

Function Documentation

◆ Decode() [1/8]

template<class Key , class Score >
void Decode ( const CSimpleBuffer ,
CRawScoreVector< Key, Score > &   
)

Definition at line 120 of file vector_serial.hpp.

References eUnknown, and NCBI_THROW.

◆ Decode() [2/8]

template<class Key , class Score >
void Decode ( const CSimpleBuffer ,
CScoreVector< Key, Score > &   
)

Definition at line 177 of file vector_serial.hpp.

References eUnknown, and NCBI_THROW.

◆ Decode() [3/8]

template<class Key , class Score >
void Decode ( const vector< char > &  ,
CRawScoreVector< Key, Score > &   
)

◆ Decode() [4/8]

template<class Key , class Score >
void Decode ( const vector< char > &  ,
CScoreVector< Key, Score > &   
)

Definition at line 163 of file vector_serial.hpp.

References eUnknown, and NCBI_THROW.

◆ Decode() [5/8]

template<class Key , class Score >
void Decode ( const vector< unsigned char > &  ,
CRawScoreVector< Key, Score > &   
)

Definition at line 112 of file vector_serial.hpp.

References eUnknown, and NCBI_THROW.

◆ Decode() [6/8]

template<class Key , class Score >
void Decode ( const vector< unsigned char > &  ,
CScoreVector< Key, Score > &   
)

Definition at line 170 of file vector_serial.hpp.

References eUnknown, and NCBI_THROW.

◆ Decode() [7/8]

template<class Key , class Score >
void Decode ( const void *  ,
size_t  ,
CRawScoreVector< Key, Score > &   
)

Definition at line 128 of file vector_serial.hpp.

References eUnknown, and NCBI_THROW.

◆ Decode() [8/8]

template<class Key , class Score >
void Decode ( const void *  ,
size_t  ,
CScoreVector< Key, Score > &   
)

Definition at line 184 of file vector_serial.hpp.

References eUnknown, and NCBI_THROW.

◆ Decode< string, float >() [1/4]

template<>
void Decode< string, float > ( const CSimpleBuffer data,
CScoreVector< string, float > &  vec 
)

Definition at line 389 of file vector_serial.cpp.

References data, and Decode().

◆ Decode< string, float >() [2/4]

template<>
void Decode< string, float > ( const vector< char > &  data,
CScoreVector< string, float > &  vec 
)

Definition at line 373 of file vector_serial.cpp.

References data, and Decode().

◆ Decode< string, float >() [3/4]

template<>
void Decode< string, float > ( const vector< unsigned char > &  data,
CScoreVector< string, float > &  vec 
)

Definition at line 381 of file vector_serial.cpp.

References data, and Decode().

◆ Decode< string, float >() [4/4]

template<>
void Decode< string, float > ( const void *  data,
size_t  size,
CScoreVector< string, float > &  vec 
)

◆ Decode< Uint4, float >() [1/8]

template<>
void Decode< Uint4, float > ( const CSimpleBuffer data,
CRawScoreVector< Uint4, float > &  vec 
)

Definition at line 235 of file vector_serial.cpp.

References data, and Decode().

◆ Decode< Uint4, float >() [2/8]

template<>
void Decode< Uint4, float > ( const CSimpleBuffer data,
CScoreVector< Uint4, float > &  vec 
)

Definition at line 260 of file vector_serial.cpp.

References data, and Decode().

◆ Decode< Uint4, float >() [3/8]

template<>
void Decode< Uint4, float > ( const vector< char > &  data,
CRawScoreVector< Uint4, float > &  vec 
)

Definition at line 221 of file vector_serial.cpp.

References data, and Decode().

◆ Decode< Uint4, float >() [4/8]

template<>
void Decode< Uint4, float > ( const vector< char > &  data,
CScoreVector< Uint4, float > &  vec 
)

Definition at line 242 of file vector_serial.cpp.

References data, and Decode().

◆ Decode< Uint4, float >() [5/8]

template<>
void Decode< Uint4, float > ( const vector< unsigned char > &  data,
CRawScoreVector< Uint4, float > &  vec 
)

Definition at line 228 of file vector_serial.cpp.

References data, and Decode().

◆ Decode< Uint4, float >() [6/8]

template<>
void Decode< Uint4, float > ( const vector< unsigned char > &  data,
CScoreVector< Uint4, float > &  vec 
)

Definition at line 251 of file vector_serial.cpp.

References data, and Decode().

◆ Decode< Uint4, float >() [7/8]

template<>
void Decode< Uint4, float > ( const void *  data,
size_t  size,
CRawScoreVector< Uint4, float > &  vec 
)

◆ Decode< Uint4, float >() [8/8]

template<>
void Decode< Uint4, float > ( const void *  data,
size_t  size,
CScoreVector< Uint4, float > &  vec 
)

Definition at line 269 of file vector_serial.cpp.

References data, Decode(), and ncbi::grid::netcache::search::fields::size.

◆ Deserialize() [1/2]

template<class Key , class Score >
void Deserialize ( CNcbiIstream istr,
CRawScoreVector< Key, Score > &   
)

◆ Deserialize() [2/2]

template<class Key , class Score >
void Deserialize ( CNcbiIstream istr,
CScoreVector< Key, Score > &   
)

Definition at line 71 of file vector_serial.hpp.

References eUnknown, and NCBI_THROW.

◆ Deserialize< string, float >()

template<>
void Deserialize< string, float > ( CNcbiIstream istr,
CScoreVector< string, float > &  vec 
)

◆ Deserialize< Uint4, float >() [1/2]

template<>
void Deserialize< Uint4, float > ( CNcbiIstream istr,
CRawScoreVector< Uint4, float > &  vec 
)

Definition at line 68 of file vector_serial.cpp.

◆ Deserialize< Uint4, float >() [2/2]

template<>
void Deserialize< Uint4, float > ( CNcbiIstream istr,
CScoreVector< Uint4, float > &  vec 
)

Definition at line 76 of file vector_serial.cpp.

◆ Encode() [1/6]

template<class Key , class Score >
void Encode ( const CRawScoreVector< Key, Score > &  ,
CSimpleBuffer  
)

Definition at line 96 of file vector_serial.hpp.

References eUnknown, and NCBI_THROW.

◆ Encode() [2/6]

template<class Key , class Score >
void Encode ( const CRawScoreVector< Key, Score > &  ,
vector< char > &   
)

◆ Encode() [3/6]

template<class Key , class Score >
void Encode ( const CRawScoreVector< Key, Score > &  ,
vector< unsigned char > &   
)

Definition at line 88 of file vector_serial.hpp.

References eUnknown, and NCBI_THROW.

◆ Encode() [4/6]

template<class Key , class Score >
void Encode ( const CScoreVector< Key, Score > &  ,
CSimpleBuffer  
)

Definition at line 154 of file vector_serial.hpp.

References eUnknown, and NCBI_THROW.

◆ Encode() [5/6]

template<class Key , class Score >
void Encode ( const CScoreVector< Key, Score > &  ,
vector< char > &   
)

Definition at line 138 of file vector_serial.hpp.

References eUnknown, and NCBI_THROW.

◆ Encode() [6/6]

template<class Key , class Score >
void Encode ( const CScoreVector< Key, Score > &  ,
vector< unsigned char > &   
)

Definition at line 146 of file vector_serial.hpp.

References eUnknown, and NCBI_THROW.

◆ Encode< string, float >() [1/3]

template<>
void Encode< string, float > ( const CScoreVector< string, float > &  vec,
CSimpleBuffer data 
)

Definition at line 354 of file vector_serial.cpp.

References data, and Serialize().

◆ Encode< string, float >() [2/3]

template<>
void Encode< string, float > ( const CScoreVector< string, float > &  vec,
vector< char > &  data 
)

Definition at line 334 of file vector_serial.cpp.

References data, and Serialize().

◆ Encode< string, float >() [3/3]

template<>
void Encode< string, float > ( const CScoreVector< string, float > &  vec,
vector< unsigned char > &  data 
)

Definition at line 344 of file vector_serial.cpp.

References data, and Serialize().

◆ Encode< Uint4, float >() [1/6]

template<>
void Encode< Uint4, float > ( const CRawScoreVector< Uint4, float > &  vec,
CSimpleBuffer data 
)

Definition at line 167 of file vector_serial.cpp.

◆ Encode< Uint4, float >() [2/6]

template<>
void Encode< Uint4, float > ( const CRawScoreVector< Uint4, float > &  vec,
vector< char > &  data 
)

Definition at line 165 of file vector_serial.cpp.

◆ Encode< Uint4, float >() [3/6]

template<>
void Encode< Uint4, float > ( const CRawScoreVector< Uint4, float > &  vec,
vector< unsigned char > &  data 
)

Definition at line 166 of file vector_serial.cpp.

◆ Encode< Uint4, float >() [4/6]

template<>
void Encode< Uint4, float > ( const CScoreVector< Uint4, float > &  vec,
CSimpleBuffer data 
)

Definition at line 179 of file vector_serial.cpp.

References data, and Encode().

◆ Encode< Uint4, float >() [5/6]

template<>
void Encode< Uint4, float > ( const CScoreVector< Uint4, float > &  vec,
vector< char > &  data 
)

Definition at line 171 of file vector_serial.cpp.

References data, and Encode().

◆ Encode< Uint4, float >() [6/6]

template<>
void Encode< Uint4, float > ( const CScoreVector< Uint4, float > &  vec,
vector< unsigned char > &  data 
)

◆ Serialize() [1/2]

template<class Key , class Score >
void Serialize ( CNcbiOstream ,
const CRawScoreVector< Key, Score > &   
)

Generics These throw an exception; we must implement serialization for each type.

Definition at line 50 of file vector_serial.hpp.

References eUnknown, and NCBI_THROW.

Referenced by Encode< string, float >().

◆ Serialize() [2/2]

template<class Key , class Score >
void Serialize ( CNcbiOstream ,
const CScoreVector< Key, Score > &   
)

Definition at line 64 of file vector_serial.hpp.

References eUnknown, and NCBI_THROW.

◆ Serialize< string, float >()

template<>
void Serialize< string, float > ( CNcbiOstream ostr,
const CScoreVector< string, float > &  vec 
)

String based keys Raw vector encoding is not supported.

Definition at line 285 of file vector_serial.cpp.

References ICompression::eLevel_Best, CZipStreamCompressor::GetCompressor(), ITERATE, len, CZipCompression::SetMemoryLevel(), and CZipCompression::SetWindowBits().

◆ Serialize< Uint4, float >() [1/2]

template<>
void Serialize< Uint4, float > ( CNcbiOstream ostr,
const CRawScoreVector< Uint4, float > &  vec 
)

Specializations for known types.

Uint4-based keys

Definition at line 52 of file vector_serial.cpp.

◆ Serialize< Uint4, float >() [2/2]

template<>
void Serialize< Uint4, float > ( CNcbiOstream ostr,
const CScoreVector< Uint4, float > &  vec 
)

Definition at line 60 of file vector_serial.cpp.

Modified on Sun May 19 04:45:05 2024 by modify_doxy.py rev. 669887