Ejemplo n.º 1
0
void CSeqMap_CI::x_Select(const CConstRef<CSeqMap>& seqMap,
                          const SSeqMapSelector& selector,
                          TSeqPos pos)
{
    m_Selector = selector;
    if ( m_Selector.m_Length == kInvalidSeqPos ) {
        TSeqPos len = seqMap->GetLength(GetScope());
        len -= min(len, m_Selector.m_Position);
        m_Selector.m_Length = len;
    }
    if ( pos < m_Selector.m_Position ) {
        pos = m_Selector.m_Position;
    }
    else if ( pos > m_Selector.m_Position + m_Selector.m_Length ) {
        pos = m_Selector.m_Position + m_Selector.m_Length;
    }
    x_Push(seqMap, m_Selector.m_TopTSE,
           m_Selector.m_Position,
           m_Selector.m_Length,
           m_Selector.m_MinusStrand,
           pos - m_Selector.m_Position);
    while ( !x_Found() && GetPosition() < m_SearchEnd ) {
        if ( !x_Push(pos - m_Selector.m_Position) ) {
            x_SettleNext();
            break;
        }
    }
}
Ejemplo n.º 2
0
bool CSeqMap_CI::x_SettlePrev(void)
{
    while ( !x_Found() ) {
        if ( !x_Prev() )
            return false;
    }
    return true;
}
Ejemplo n.º 3
0
bool CSeqMap_CI::x_SettleNext(void)
{
    while ( !x_Found() && GetPosition() < m_SearchEnd ) {
        if ( !x_Next() )
            return false;
    }
    return true;
}
Ejemplo n.º 4
0
const CObject* CLocalHookSetBase::GetHook(const THookData* key) const
{
    THooks::const_iterator it = x_Find(key);
    return x_Found(it, key)? it->second.GetPointer(): 0;
}
Ejemplo n.º 5
0
void CLocalHookSetBase::ResetHook(THookData* key)
{
    THooks::iterator it = x_Find(key);
    _ASSERT(x_Found(it, key));
    m_Hooks.erase(it);
}
Ejemplo n.º 6
0
void CLocalHookSetBase::SetHook(THookData* key, THook* hook)
{
    THooks::iterator it = x_Find(key);
    _ASSERT(!x_Found(it, key));
    m_Hooks.insert(it, TValue(key, CRef<CObject>(hook)));
}