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

Search Toolkit Book for CSize

#include <objmgr/split/size.hpp>

+ Collaboration diagram for CSize:

Public Types

typedef size_t TDataSize
 
typedef pair< TDataSize, TDataSizeTSizeRatio
 

Public Member Functions

 CSize (void)
 
 CSize (const CAsnSizer &sizer)
 
 CSize (TDataSize asn_size, TSizeRatio ratio)
 
void clear (void)
 
CSizeoperator+= (const CSize &size)
 
CSizeoperator-= (const CSize &size)
 
CSize operator+ (const CSize &size) const
 
size_t GetCount (void) const
 
TDataSize GetAsnSize (void) const
 
TDataSize GetZipSize (void) const
 
double GetRatio (void) const
 
TSizeRatio GetExactRatio (void) const
 
CNcbiOstreamPrint (CNcbiOstream &out) const
 
 DECLARE_OPERATOR_BOOL (m_Count !=0)
 
bool operator> (const CSize &size) const
 
int Compare (const CSize &size) const
 

Private Attributes

size_t m_Count
 
TDataSize m_AsnSize
 
TDataSize m_ZipSize
 

Detailed Description

Definition at line 45 of file size.hpp.

Member Typedef Documentation

◆ TDataSize

typedef size_t CSize::TDataSize

Definition at line 48 of file size.hpp.

◆ TSizeRatio

Definition at line 49 of file size.hpp.

Constructor & Destructor Documentation

◆ CSize() [1/3]

CSize::CSize ( void  )
inline

Definition at line 51 of file size.hpp.

References clear().

◆ CSize() [2/3]

CSize::CSize ( const CAsnSizer sizer)

Definition at line 42 of file size.cpp.

◆ CSize() [3/3]

CSize::CSize ( TDataSize  asn_size,
TSizeRatio  ratio 
)

Definition at line 50 of file size.cpp.

Member Function Documentation

◆ clear()

void CSize::clear ( void  )
inline

Definition at line 58 of file size.hpp.

References m_AsnSize, m_Count, and m_ZipSize.

Referenced by SIdAnnotPieces::clear(), CLocObjects_SplitInfo::clear(), and CSize().

◆ Compare()

int CSize::Compare ( const CSize size) const

◆ DECLARE_OPERATOR_BOOL()

CSize::DECLARE_OPERATOR_BOOL ( m_Count = 0)

◆ GetAsnSize()

TDataSize CSize::GetAsnSize ( void  ) const
inline

Definition at line 90 of file size.hpp.

References m_AsnSize.

Referenced by Compare(), Print(), and CBlobSplitterImpl::Split().

◆ GetCount()

size_t CSize::GetCount ( void  ) const
inline

Definition at line 86 of file size.hpp.

References m_Count.

Referenced by Compare(), and CBlobSplitterImpl::SplitPieces().

◆ GetExactRatio()

TSizeRatio CSize::GetExactRatio ( void  ) const
inline

Definition at line 102 of file size.hpp.

References m_AsnSize, and m_ZipSize.

Referenced by CSeq_annot_SplitInfo::SetSeq_annot().

◆ GetRatio()

double CSize::GetRatio ( void  ) const
inline

Definition at line 98 of file size.hpp.

References m_AsnSize, and m_ZipSize.

Referenced by Print().

◆ GetZipSize()

TDataSize CSize::GetZipSize ( void  ) const
inline

◆ operator+()

CSize CSize::operator+ ( const CSize size) const
inline

Definition at line 79 of file size.hpp.

References ncbi::grid::netcache::search::fields::size.

◆ operator+=()

CSize& CSize::operator+= ( const CSize size)
inline

Definition at line 65 of file size.hpp.

References m_AsnSize, m_Count, m_ZipSize, and ncbi::grid::netcache::search::fields::size.

◆ operator-=()

CSize& CSize::operator-= ( const CSize size)
inline

Definition at line 72 of file size.hpp.

References m_AsnSize, m_Count, m_ZipSize, and ncbi::grid::netcache::search::fields::size.

◆ operator>()

bool CSize::operator> ( const CSize size) const
inline

Definition at line 111 of file size.hpp.

References m_ZipSize, and ncbi::grid::netcache::search::fields::size.

◆ Print()

CNcbiOstream & CSize::Print ( CNcbiOstream out) const

Definition at line 97 of file size.cpp.

References GetAsnSize(), GetRatio(), GetZipSize(), m_Count, and out().

Member Data Documentation

◆ m_AsnSize

TDataSize CSize::m_AsnSize
private

Definition at line 120 of file size.hpp.

Referenced by clear(), GetAsnSize(), GetExactRatio(), GetRatio(), operator+=(), and operator-=().

◆ m_Count

size_t CSize::m_Count
private

Definition at line 119 of file size.hpp.

Referenced by clear(), GetCount(), operator+=(), operator-=(), and Print().

◆ m_ZipSize

TDataSize CSize::m_ZipSize
private

Definition at line 121 of file size.hpp.

Referenced by clear(), GetExactRatio(), GetRatio(), GetZipSize(), operator+=(), operator-=(), and operator>().


The documentation for this class was generated from the following files:
Modified on Fri Sep 20 14:57:52 2024 by modify_doxy.py rev. 669887