NCBI C++ ToolKit
Public Types | Public Member Functions | Protected Attributes | List of all members
CCompoundID Class Reference

Search Toolkit Book for CCompoundID

Base64-encoded ID string that contains extractable typed fields. More...

#include <connect/services/compound_id.hpp>

+ Collaboration diagram for CCompoundID:

Public Types

typedef SCompoundIDImplTInstance
 

Public Member Functions

 CCompoundID (EVoid)
 
 CCompoundID (SCompoundIDImpl *impl)
 
CCompoundIDoperator= (SCompoundIDImpl *impl)
 
 operator SCompoundIDImpl * ()
 
 operator const SCompoundIDImpl * () const
 
SCompoundIDImploperator-- (int)
 
const SCompoundIDImploperator-- (int) const
 
SCompoundIDImploperator-> ()
 
const SCompoundIDImploperator-> () const
 
 CCompoundID ()
 
ECompoundIDClass GetClass () const
 One of the registered ID classes. More...
 
bool IsEmpty () const
 Return TRUE if this compound ID contains no fields. More...
 
unsigned GetLength () const
 Return the number of fields this ID contains. More...
 
CCompoundIDField GetFirstField ()
 Return the first field or NULL if this ID is empty. More...
 
CCompoundIDField GetFirst (ECompoundIDFieldType field_type)
 Return the first field of the specified type or NULL if this compound ID contains no fields of such type. More...
 
void AppendID (Uint8 id)
 Append an eCIT_ID field at the end of this compound ID. More...
 
void AppendInteger (Int8 number)
 Append an eCIT_Integer field at the end of this compound ID. More...
 
void AppendServiceName (const string &service_name)
 Append an eCIT_ServiceName field at the end of this compound ID. More...
 
void AppendDatabaseName (const string &db_name)
 Append an eCIT_DatabaseName field at the end of this compound ID. More...
 
void AppendTimestamp (Int8 timestamp)
 Append an eCIT_Timestamp field at the end of this compound ID. More...
 
void AppendCurrentTime ()
 Get the current time and append it as an eCIT_Timestamp field at the end of this compound ID. More...
 
void AppendRandom (Uint4 random_number)
 Append an eCIT_Random field at the end of this compound ID. More...
 
void AppendRandom ()
 Generate a 32-bit pseudo-random number and append it as an eCIT_Random field at the end of this compound ID. More...
 
void AppendIPv4Address (Uint4 ipv4_address)
 Append an eCIT_IPv4Address field at the end of this compound ID. More...
 
void AppendHost (const string &host)
 Append an eCIT_Host field at the end of this compound ID. More...
 
void AppendPort (Uint2 port_number)
 Append an eCIT_Port field at the end of this compound ID. More...
 
void AppendIPv4SockAddr (Uint4 ipv4_address, Uint2 port_number)
 Append an eCIT_IPv4SockAddr field at the end of this compound ID. More...
 
void AppendObjectRef (const string &loc)
 Append an eCIT_ObjectRef field at the end of this compound ID. More...
 
void AppendString (const string &string_value)
 Append an eCIT_String field at the end of this compound ID. More...
 
void AppendBoolean (bool boolean_value)
 Append an eCIT_Boolean field at the end of this compound ID. More...
 
void AppendFlags (Uint8 flags)
 Append an eCIT_Flags field at the end of this compound ID. More...
 
void AppendLabel (const string &tag)
 Append an eCIT_Label field at the end of this compound ID. More...
 
void AppendCue (Uint8 tag)
 Append an eCIT_Cue field at the end of this compound ID. More...
 
void AppendSeqID (const string &seq_id)
 Append an eCIT_SeqID field at the end of this compound ID. More...
 
void AppendTaxID (Uint8 tax_id)
 Append an eCIT_TaxID field at the end of this compound ID. More...
 
void AppendNestedCID (const CCompoundID &cid)
 Append an eCIT_NestedCID field at the end of this compound ID. More...
 
CCompoundIDField GetLastField ()
 Get the field that was added last. More...
 
string ToString ()
 Pack the ID and return its string representation. More...
 
string Dump ()
 Dump the contents of the ID in the human-readable format that can also be parsed by CCompoundIDPool::FromDump(). More...
 

Protected Attributes

CNetRef< SCompoundIDImplm_Impl
 

Detailed Description

Base64-encoded ID string that contains extractable typed fields.

Definition at line 204 of file compound_id.hpp.

Member Typedef Documentation

◆ TInstance

Definition at line 206 of file compound_id.hpp.

Constructor & Destructor Documentation

◆ CCompoundID() [1/3]

CCompoundID::CCompoundID ( EVoid  )
inline

Definition at line 206 of file compound_id.hpp.

◆ CCompoundID() [2/3]

CCompoundID::CCompoundID ( SCompoundIDImpl impl)
inline

Definition at line 206 of file compound_id.hpp.

◆ CCompoundID() [3/3]

CCompoundID::CCompoundID ( )
inline

Definition at line 206 of file compound_id.hpp.

Member Function Documentation

◆ AppendBoolean()

void CCompoundID::AppendBoolean ( bool  boolean_value)

Append an eCIT_Boolean field at the end of this compound ID.

Definition at line 280 of file compound_id.cpp.

Referenced by CGridCommandLineInterfaceApp::Cmd_Login().

◆ AppendCue()

void CCompoundID::AppendCue ( Uint8  tag)

Append an eCIT_Cue field at the end of this compound ID.

Definition at line 283 of file compound_id.cpp.

Referenced by CNetStorageObjectLoc::x_Pack().

◆ AppendCurrentTime()

void CCompoundID::AppendCurrentTime ( )

Get the current time and append it as an eCIT_Timestamp field at the end of this compound ID.

Definition at line 254 of file compound_id.cpp.

References NULL.

Referenced by CGridCommandLineInterfaceApp::Cmd_Login(), and CGridCommandLineInterfaceApp::Cmd_SubmitJob().

◆ AppendDatabaseName()

void CCompoundID::AppendDatabaseName ( const string db_name)

Append an eCIT_DatabaseName field at the end of this compound ID.

Definition at line 251 of file compound_id.cpp.

Referenced by CGridCommandLineInterfaceApp::Cmd_Login(), CNetScheduleKeyGenerator::GenerateCompoundID(), and CNetStorageObjectLoc::x_Pack().

◆ AppendFlags()

void CCompoundID::AppendFlags ( Uint8  flags)

Append an eCIT_Flags field at the end of this compound ID.

Definition at line 281 of file compound_id.cpp.

Referenced by CNetCacheKey::KeyToCompoundID(), and CNetStorageObjectLoc::x_Pack().

◆ AppendHost()

void CCompoundID::AppendHost ( const string host)

Append an eCIT_Host field at the end of this compound ID.

Definition at line 268 of file compound_id.cpp.

Referenced by CGridCommandLineInterfaceApp::Cmd_Login(), CNetScheduleKeyGenerator::GenerateCompoundID(), and CNetCacheKey::KeyToCompoundID().

◆ AppendID()

void CCompoundID::AppendID ( Uint8  id)

◆ AppendInteger()

void CCompoundID::AppendInteger ( Int8  number)

Append an eCIT_Integer field at the end of this compound ID.

Definition at line 247 of file compound_id.cpp.

Referenced by CNetStorageObjectLoc::x_Pack().

◆ AppendIPv4Address()

void CCompoundID::AppendIPv4Address ( Uint4  ipv4_address)

Append an eCIT_IPv4Address field at the end of this compound ID.

Definition at line 267 of file compound_id.cpp.

◆ AppendIPv4SockAddr()

void CCompoundID::AppendIPv4SockAddr ( Uint4  ipv4_address,
Uint2  port_number 
)

Append an eCIT_IPv4SockAddr field at the end of this compound ID.

Definition at line 271 of file compound_id.cpp.

References eCIT_IPv4SockAddr, and SCompoundIDFieldImpl::m_IPv4SockAddr.

Referenced by CNetScheduleKeyGenerator::GenerateCompoundID(), and CNetCacheKey::KeyToCompoundID().

◆ AppendLabel()

void CCompoundID::AppendLabel ( const string tag)

Append an eCIT_Label field at the end of this compound ID.

Definition at line 282 of file compound_id.cpp.

Referenced by CGridCommandLineInterfaceApp::Cmd_Login().

◆ AppendNestedCID()

void CCompoundID::AppendNestedCID ( const CCompoundID cid)

Append an eCIT_NestedCID field at the end of this compound ID.

Definition at line 287 of file compound_id.cpp.

◆ AppendObjectRef()

void CCompoundID::AppendObjectRef ( const string loc)

Append an eCIT_ObjectRef field at the end of this compound ID.

Definition at line 278 of file compound_id.cpp.

◆ AppendPort()

void CCompoundID::AppendPort ( Uint2  port_number)

Append an eCIT_Port field at the end of this compound ID.

Definition at line 269 of file compound_id.cpp.

Referenced by CNetScheduleKeyGenerator::GenerateCompoundID(), and CNetCacheKey::KeyToCompoundID().

◆ AppendRandom() [1/2]

void CCompoundID::AppendRandom ( )

Generate a 32-bit pseudo-random number and append it as an eCIT_Random field at the end of this compound ID.

Definition at line 261 of file compound_id.cpp.

◆ AppendRandom() [2/2]

void CCompoundID::AppendRandom ( Uint4  random_number)

Append an eCIT_Random field at the end of this compound ID.

Definition at line 259 of file compound_id.cpp.

Referenced by CGridCommandLineInterfaceApp::Cmd_SubmitJob(), CNetCacheKey::KeyToCompoundID(), and CNetStorageObjectLoc::x_Pack().

◆ AppendSeqID()

void CCompoundID::AppendSeqID ( const string seq_id)

Append an eCIT_SeqID field at the end of this compound ID.

Definition at line 284 of file compound_id.cpp.

Referenced by CWigGraph::GetCacheKey().

◆ AppendServiceName()

void CCompoundID::AppendServiceName ( const string service_name)

Append an eCIT_ServiceName field at the end of this compound ID.

Definition at line 249 of file compound_id.cpp.

Referenced by CGridCommandLineInterfaceApp::Cmd_Login(), CNetCacheKey::KeyToCompoundID(), and CNetStorageObjectLoc::x_Pack().

◆ AppendString()

void CCompoundID::AppendString ( const string string_value)

Append an eCIT_String field at the end of this compound ID.

Definition at line 279 of file compound_id.cpp.

Referenced by CGridCommandLineInterfaceApp::Cmd_Login(), CVcfHistogram::GetCacheKey(), and CNetStorageObjectLoc::x_Pack().

◆ AppendTaxID()

void CCompoundID::AppendTaxID ( Uint8  tax_id)

Append an eCIT_TaxID field at the end of this compound ID.

Definition at line 285 of file compound_id.cpp.

◆ AppendTimestamp()

void CCompoundID::AppendTimestamp ( Int8  timestamp)

Append an eCIT_Timestamp field at the end of this compound ID.

Definition at line 252 of file compound_id.cpp.

Referenced by CNetCacheKey::KeyToCompoundID(), and CNetStorageObjectLoc::x_Pack().

◆ Dump()

string CCompoundID::Dump ( )

Dump the contents of the ID in the human-readable format that can also be parsed by CCompoundIDPool::FromDump().

Definition at line 390 of file compound_id.cpp.

References m_Impl, NcbiEnds, and s_DumpCompoundID().

Referenced by CComponentIDToolApp::Cmd_Dump().

◆ GetClass()

ECompoundIDClass CCompoundID::GetClass ( ) const

One of the registered ID classes.

Definition at line 207 of file compound_id.cpp.

References m_Impl.

Referenced by SNetStorageRPC::GetServiceIfLocator(), CNetStorageObjectLoc::Parse(), and CNetCacheKey::ParseBlobKey().

◆ GetFirst()

CCompoundIDField CCompoundID::GetFirst ( ECompoundIDFieldType  field_type)

Return the first field of the specified type or NULL if this compound ID contains no fields of such type.

Definition at line 229 of file compound_id.cpp.

References _ASSERT, eCIT_NumberOfTypes, first(), m_Impl, and NULL.

Referenced by CBedCoverageGraph::CBedCoverageGraph(), CVcfHeatmap::CVcfHeatmap(), CVcfHistogram::CVcfHistogram(), CNetStorageObjectLoc::Parse(), CNetCacheKey::ParseBlobKey(), CNetScheduleKey::ParseJobKey(), and CGridCommandLineInterfaceApp::ParseLoginToken().

◆ GetFirstField()

CCompoundIDField CCompoundID::GetFirstField ( )

Return the first field or NULL if this ID is empty.

Definition at line 222 of file compound_id.cpp.

References first(), and m_Impl.

◆ GetLastField()

CCompoundIDField CCompoundID::GetLastField ( )

Get the field that was added last.

Definition at line 289 of file compound_id.cpp.

References last().

◆ GetLength()

unsigned CCompoundID::GetLength ( void  ) const

Return the number of fields this ID contains.

Definition at line 217 of file compound_id.cpp.

References m_Impl.

◆ IsEmpty()

bool CCompoundID::IsEmpty ( void  ) const

Return TRUE if this compound ID contains no fields.

Definition at line 212 of file compound_id.cpp.

References m_Impl.

◆ operator const SCompoundIDImpl *()

CCompoundID::operator const SCompoundIDImpl * ( ) const
inline

Definition at line 206 of file compound_id.hpp.

◆ operator SCompoundIDImpl *()

CCompoundID::operator SCompoundIDImpl * ( )
inline

Definition at line 206 of file compound_id.hpp.

◆ operator--() [1/2]

SCompoundIDImpl& CCompoundID::operator-- ( int  )
inline

Definition at line 206 of file compound_id.hpp.

◆ operator--() [2/2]

const SCompoundIDImpl& CCompoundID::operator-- ( int  ) const
inline

Definition at line 206 of file compound_id.hpp.

◆ operator->() [1/2]

SCompoundIDImpl* CCompoundID::operator-> ( void  )
inline

Definition at line 206 of file compound_id.hpp.

◆ operator->() [2/2]

const SCompoundIDImpl* CCompoundID::operator-> ( void  ) const
inline

Definition at line 206 of file compound_id.hpp.

◆ operator=()

CCompoundID& CCompoundID::operator= ( SCompoundIDImpl impl)
inline

Definition at line 206 of file compound_id.hpp.

◆ ToString()

string CCompoundID::ToString ( void  )

Member Data Documentation

◆ m_Impl

CNetRef< SCompoundIDImpl > CCompoundID::m_Impl
protected

Definition at line 206 of file compound_id.hpp.

Referenced by Dump(), GetClass(), GetFirst(), GetFirstField(), GetLength(), IsEmpty(), and ToString().


The documentation for this class was generated from the following files:
Modified on Tue May 28 05:49:06 2024 by modify_doxy.py rev. 669887