NCBI C++ ToolKit
|
Search Toolkit Book for CIdMapperBuiltin
IdMapper implementation using hardcoded values. More...
#include <objtools/readers/idmapper.hpp>
Public Member Functions | |
CIdMapperBuiltin (const std::string &strContext, bool bInvert=false, ILineErrorListener *pErrors=0) | |
Constructor specifying the mapping context, direction, and error handling. More... | |
void | Initialize () |
Public Member Functions inherited from CIdMapperConfig | |
CIdMapperConfig (CNcbiIstream &istr, const std::string &strContext="", bool bInvert=false, ILineErrorListener *pErrors=0) | |
Constructor specifying the content of the mapping table, mapping context, direction, and error handling. More... | |
CIdMapperConfig (const std::string &strContext="", bool bInvert=false, ILineErrorListener *pErrors=0) | |
void | Initialize (CNcbiIstream &istr) |
Public Member Functions inherited from CIdMapper | |
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 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) |
virtual void | MapObject (CSerialObject &) |
Map all embedded IDs in a given object at once. More... | |
Public Member Functions inherited from IIdMapper | |
virtual | ~IIdMapper () |
Protected Member Functions | |
void | AddMapEntry (const std::string &, int) |
Protected Member Functions inherited from CIdMapperConfig | |
void | AddMapEntry (const std::string &) |
void | SetCurrentContext (const std::string &, std::string &) |
CSeq_id_Handle | SourceHandle (const std::string &) |
CSeq_id_Handle | TargetHandle (const std::string &) |
Additional Inherited Members | |
Static Public Member Functions inherited from CIdMapperConfig | |
static void | DescribeContexts (CNcbiIstream &istr, list< SMappingContext > &contexts) |
Protected Types inherited from CIdMapper | |
typedef std::map< CSeq_id_Handle, SMapper > | TMapperCache |
Static Protected Member Functions inherited from CIdMapper | |
static std::string | MapErrorString (const CSeq_id_Handle &) |
static std::string | MapErrorString (const CSeq_loc &) |
Protected Attributes inherited from CIdMapper | |
const std::string | m_strContext |
const bool | m_bInvert |
TMapperCache | m_Cache |
ILineErrorListener * | m_pErrors |
IdMapper implementation using hardcoded values.
Mapping targets are fixed at compile time and cannot be modified later. Useful for self contained applications that should work without external configuration files or databases.
Definition at line 274 of file idmapper.hpp.
CIdMapperBuiltin::CIdMapperBuiltin | ( | const std::string & | strContext, |
bool | bInvert = false , |
||
ILineErrorListener * | pErrors = 0 |
||
) |
Constructor specifying the mapping context, direction, and error handling.
strContext | the mapping context or genome source IDs will belong to. Something like "mm6" or "hg18". |
bInvert | Mapping direction. "true" will map in reverse direction. |
pErrors | Optional error container. If specified, mapping errors will be passed to the error container for further processing. If not specified, mapping errors result in exceptions that need to be handled. |
Definition at line 51 of file idmapper_builtin.cpp.
References Initialize().
|
protected |
void CIdMapperBuiltin::Initialize | ( | void | ) |
Definition at line 60 of file idmapper_builtin.cpp.
References CIdMapperConfig::Initialize(), and sc_BuiltinConfig.
Referenced by CIdMapperBuiltin().