📄 projectdb.h
字号:
#ifndef PROJECT_DB_H
#define PROJECT_DB_H
#pragma warning(disable:4786)
#include <map>
#include <vector>
typedef unsigned short ItemSubscriptType;
struct ProjectedSeqInfo
{
ProjectedSeqInfo(unsigned SIndex, unsigned suffixPos):SIndex_(SIndex), suffixPos_(suffixPos)
{}
unsigned SIndex_;//序列号标记
unsigned suffixPos_;
};
//------------------------------------------------------------------------
//------------------------------------------------------------------------
class ProjectDB
{
public:
void InsertItemSeqIndex(ItemSubscriptType itemSubscript, unsigned seqIndex, unsigned suffixPos)
{//
if ((projectedDB_[itemSubscript].empty())||
(seqIndex != projectedDB_[itemSubscript].back().SIndex_))
projectedDB_[itemSubscript].push_back(ProjectedSeqInfo(seqIndex, suffixPos));
}
//获取候选序列的index向量。
void GetCandidateSIndexVec(ItemSubscriptType itemSubscript,
std::vector<ProjectedSeqInfo>& CandSIndexVec)
{
CandSIndexVec = projectedDB_[itemSubscript];
}
protected:
private:
std::map<ItemSubscriptType, std::vector<ProjectedSeqInfo> >projectedDB_;
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -