NCBI C++ ToolKit
|
Search Toolkit Book for CIdMapperComposite
IdMapper implementation combining multiple id mappers with the selected priorities. More...
#include <objtools/readers/idmapper.hpp>
Classes | |
struct | SNode |
Public Types | |
enum | EPriority { kPriority_Default = 0 } |
Sub-mapper priority. More... | |
typedef int | TPriority |
Public Member Functions | |
CIdMapperComposite (void) | |
void | AddMapper (IIdMapper *mapper, TPriority priority=kPriority_Default, EOwnership ownership=eTakeOwnership) |
Add sub-mapper. More... | |
virtual CSeq_id_Handle | Map (const CSeq_id_Handle &) |
Map a single given CSeq_id_Handle to another. More... | |
virtual CRef< CSeq_loc > | Map (const CSeq_loc &loc) |
![]() | |
CIdMapper (const std::string &strContext="", bool bInvert=false, ILineErrorListener *pErrors=0) | |
Constructor specifying the mapping context, direction, and error handling. More... | |
virtual | ~CIdMapper () |
virtual void | AddMapping (const CSeq_id_Handle &from, const CSeq_id_Handle &to) |
Add a mapping to the internal mapping table. More... | |
virtual void | AddMapping (const CSeq_loc &loc_from, const CSeq_loc &loc_to) |
virtual void | MapObject (CSerialObject &) |
Map all embedded IDs in a given object at once. More... | |
![]() | |
virtual | ~IIdMapper () |
Private Types | |
typedef CAtomicCounter::TValue | TOrder |
typedef set< SNode > | TMappers |
Private Attributes | |
TMappers | m_Mappers |
Additional Inherited Members | |
![]() | |
typedef std::map< CSeq_id_Handle, SMapper > | TMapperCache |
![]() | |
static std::string | MapErrorString (const CSeq_id_Handle &) |
static std::string | MapErrorString (const CSeq_loc &) |
![]() | |
const std::string | m_strContext |
const bool | m_bInvert |
TMapperCache | m_Cache |
ILineErrorListener * | m_pErrors |
IdMapper implementation combining multiple id mappers with the selected priorities.
Definition at line 126 of file idmapper.hpp.
|
private |
Definition at line 177 of file idmapper.hpp.
|
private |
Definition at line 151 of file idmapper.hpp.
typedef int CIdMapperComposite::TPriority |
Definition at line 136 of file idmapper.hpp.
Sub-mapper priority.
Default is zero, positive values are for higher priorities. Mappers with the same priorities are checked in the order of their addition to the composite mapper.
Enumerator | |
---|---|
kPriority_Default |
Definition at line 133 of file idmapper.hpp.
|
inline |
Definition at line 138 of file idmapper.hpp.
void CIdMapperComposite::AddMapper | ( | IIdMapper * | mapper, |
TPriority | priority = kPriority_Default , |
||
EOwnership | ownership = eTakeOwnership |
||
) |
Add sub-mapper.
By default the composite mapper owns the added object.
Definition at line 230 of file idmapper.cpp.
References set< Key, Compare >::insert(), and m_Mappers.
|
virtual |
Map a single given CSeq_id_Handle to another.
Reimplemented from CIdMapper.
Definition at line 238 of file idmapper.cpp.
Reimplemented from CIdMapper.
Definition at line 249 of file idmapper.cpp.
|
private |
Definition at line 179 of file idmapper.hpp.
Referenced by AddMapper(), and Map().