1 #ifndef NCBI_TAXON1_HPP
2 #define NCBI_TAXON1_HPP
83 static const unsigned def_reconnect_attempts = 5;
84 static const unsigned def_cache_capacity = 1000;
86 bool Init(
unsigned cache_capacity);
87 bool Init(
const STimeout* timeout,
unsigned reconnect_attempts=def_reconnect_attempts,
88 unsigned cache_capacity=def_cache_capacity);
111 bool GetScientificName(
TTaxId tax_id,
string& name_out);
179 bool CheckOrgRef(
const COrg_ref& orgRef, TOrgRefStatus& stat_out,
string* psLog = 0 );
195 TTaxId GetTaxIdByName(
const string& orgname);
205 TTaxId FindTaxIdByName(
const string& orgname);
216 TTaxId SearchTaxIdByName(
const string& orgname,
217 ESearch
mode = eSearch_TokenSet,
225 int GetAllTaxIdByName(
const string& orgname, TTaxIdList& lIds);
240 bool* is_specified =
NULL);
248 bool SetSynonyms(
bool on_off);
332 TTaxId GetAncestorByRank(
TTaxId id_tax,
const char* rank_name);
340 int GetChildren(
TTaxId id_tax, TTaxIdList& children_ids);
350 bool GetRankName(
TTaxRank rank_id,
string& rank_name_out );
357 TTaxRank GetRankIdByName(
const string& rank_name);
362 bool GetDivisionName(
TTaxDivision div_id,
string& div_name_out,
string* div_code_out =
NULL );
369 TTaxDivision GetDivisionIdByName(
const string& div_name);
374 bool GetNameClass(
TTaxNameClass nameclass_id,
string& class_name_out );
420 int GetAllNames(
TTaxId tax_id, TNameList& lNames,
bool unique);
455 bool GetTaxId4GI(
TGi gi,
TTaxId& tax_id_out);
465 bool GetBlastName(
TTaxId tax_id,
string& blast_name_out);
480 bool GetPopsetJoin(
const TTaxIdList& ids_in, TTaxIdList& ids_out );
489 {
return LoadSubtreeEx( tax_id, 0, ppNode ); }
499 {
return LoadSubtreeEx( tax_id, 1, ppNode ); }
508 {
return LoadSubtreeEx( tax_id, -1, ppNode ); }
517 eIteratorMode_Default = eIteratorMode_FullTree
526 = eIteratorMode_Default );
534 = eIteratorMode_Default );
543 bool GetNodeProperty(
TTaxId tax_id,
const string& prop_name,
545 bool GetNodeProperty(
TTaxId tax_id,
const string& prop_name,
547 bool GetNodeProperty(
TTaxId tax_id,
const string& prop_name,
558 bool GetInheritedPropertyDefines(
const string& prop_name,
559 TInfoList& results_out,
569 bool GetTypeMaterial(
TTaxId tax_id, TNameList& type_material_list_out );
575 TTaxId GetMaxTaxId(
void );
588 bool GetDisplayCommonName(
TTaxId tax_id,
string& disp_name_out );
615 void SetLastError(
const char* err_msg);
793 EAction TraverseDownward(I4Each&,
unsigned levels =
kMax_UInt);
809 EAction TraverseUpward(I4Each&,
unsigned levels =
kMax_UInt);
826 EAction TraverseLevelByLevel(I4Each&,
unsigned levels =
kMax_UInt);
836 EAction TraverseAncestors(I4Each&);
852 EAction TraverseLevelByLevelInternal(
I4Each& cb,
unsigned levels,
853 vector< const ITaxon1Node* >& skp);
This stream exchanges data with a named service, in a constraint that the service is implemented as o...
bool LoadChildren(TTaxId tax_id, const ITaxon1Node **ppNode=NULL)
const string & GetLastError() const
vector< TTaxId > TTaxIdList
const char * m_pchService
ESerialDataFormat m_eDataFormat
bool LoadSubtree(TTaxId tax_id, const ITaxon1Node **ppNode=NULL)
CConn_ServiceStream * m_pServer
@ eIteratorMode_LeavesBranches
bool LoadNode(TTaxId tax_id, const ITaxon1Node **ppNode=NULL)
unsigned m_nReconnectAttempts
list< CRef< CTaxon1_info > > TInfoList
map< TTaxGeneticCode, string > TGCMap
virtual TTaxGeneticCode GetMGC() const =0
virtual bool IsUncultured() const =0
virtual const string & GetName() const =0
virtual bool IsGenBankHidden() const =0
virtual TTaxDivision GetDivision() const =0
virtual const string & GetBlastName() const =0
virtual bool IsRoot() const =0
virtual TTaxId GetTaxId() const =0
virtual TTaxGeneticCode GetGC() const =0
virtual TTaxRank GetRank() const =0
virtual EAction LevelEnd(const ITaxon1Node *)
virtual EAction LevelBegin(const ITaxon1Node *)
virtual EAction Execute(const ITaxon1Node *pNode)=0
virtual bool GoSibling()=0
virtual bool GoNode(const ITaxon1Node *pNode)=0
virtual bool IsFirstChild() const =0
virtual const ITaxon1Node * GetNode() const =0
virtual bool IsLastChild() const =0
virtual bool GoParent()=0
const ITaxon1Node * operator->() const
virtual bool AboveNode(const ITaxon1Node *node) const =0
virtual CTaxon1::EIteratorMode GetMode() const =0
virtual bool IsTerminal() const =0
virtual bool BelongSubtree(const ITaxon1Node *subtree_root) const =0
virtual bool GoAncestor(const ITaxon1Node *pNode)=0
std::ofstream out("events_result.xml")
main entry point for tests
SStrictId_Tax::TId TTaxId
Taxon id type.
ESerialDataFormat
Data file format.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
#define NCBI_TAXON1_EXPORT
@ eSkip
Unicode to be skipped in translation. Usually it is combined mark.
Miscellaneous common-use basic types and functionality.
short int TTaxRank
Primitive types for some taxon1 object fields.
short int TTaxGeneticCode