NCBI C++ ToolKit
psg_protobuf_data.hpp
Go to the documentation of this file.

Go to the SVN repository for this file.

1 #ifndef PSG_PROTOBUF_DATA_HPP
2 #define PSG_PROTOBUF_DATA_HPP
3 
5 
6 #include <corelib/ncbistd.hpp>
7 
9 
11 {
12 public:
13  static bool UnpackBioseqInfo(const string& accession, int version, int seq_id_type, const string& data, psg::retrieval::bioseq_info& result) {
14  return result.mutable_value()->ParseFromString(data);
15  }
16  static bool UnpackBioseqInfo(const string& data, psg::retrieval::bioseq_info_value& result) {
17  return result.ParseFromString(data);
18  }
19  static bool PackBioseqInfo(const psg::retrieval::bioseq_info_value& value, string& data) {
20  return value.SerializeToString(&data);
21  }
22  static bool PackBioseqInfo(const psg::retrieval::bioseq_info& value, string& data) {
23  return value.SerializeToString(&data);
24  }
25 
26 
27  static bool UnpackSiInfo(const string& data, psg::retrieval::si2csi_value& result) {
28  return result.ParseFromString(data);
29  }
30  static bool PackSiInfo(const psg::retrieval::si2csi_value& info, string& result) {
31  return info.SerializeToString(&result);
32  }
33 
34  static bool UnpackBlobPropInfo(const string& data, psg::retrieval::blob_prop_value& result) {
35  return result.ParseFromString(data);
36  }
37  static bool PackBlobPropInfo(const psg::retrieval::blob_prop_value& value, string& result) {
38  return value.SerializeToString(&result);
39  }
40 };
41 
43 
44 #endif
static bool UnpackBioseqInfo(const string &data, psg::retrieval::bioseq_info_value &result)
static bool UnpackBlobPropInfo(const string &data, psg::retrieval::blob_prop_value &result)
static bool UnpackSiInfo(const string &data, psg::retrieval::si2csi_value &result)
static bool PackSiInfo(const psg::retrieval::si2csi_value &info, string &result)
static bool UnpackBioseqInfo(const string &accession, int version, int seq_id_type, const string &data, psg::retrieval::bioseq_info &result)
static bool PackBioseqInfo(const psg::retrieval::bioseq_info &value, string &data)
static bool PackBioseqInfo(const psg::retrieval::bioseq_info_value &value, string &data)
static bool PackBlobPropInfo(const psg::retrieval::blob_prop_value &value, string &result)
Include a standard set of the NCBI C++ Toolkit most basic headers.
char data[12]
Definition: iconv.c:80
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
static MDB_envinfo info
Definition: mdb_load.c:37
static int version
Definition: mdb_load.c:29
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1227
else result
Definition: token2.c:20
Modified on Sun Jun 16 04:32:46 2024 by modify_doxy.py rev. 669887