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

Search Toolkit Book for CPackString

#include <serial/pack_string.hpp>

+ Collaboration diagram for CPackString:

Classes

struct  SNode
 

Public Types

typedef SNode TKey
 
typedef set< TKeyTStrings
 
typedef TStrings::iterator iterator
 

Public Member Functions

 CPackString (void)
 
 CPackString (size_t length_limit, size_t count_limit)
 
 ~CPackString (void)
 
void ReadString (CObjectIStream &in, string &s)
 
size_t GetLengthLimit (void) const
 
size_t GetCountLimit (void) const
 
size_t GetCount (void) const
 
bool Pack (string &s)
 
bool Pack (string &s, const char *data, size_t size)
 
pair< iterator, boolLocate (const char *data, size_t size)
 
void AddOld (string &s, const iterator &iter)
 
bool AddNew (string &s, const char *data, size_t size, iterator iter)
 
void Skipped (void)
 
CNcbiOstreamDumpStatistics (CNcbiOstream &out) const
 

Static Public Member Functions

static bool Assign (string &s, const string &src)
 
static bool s_GetEnvFlag (const char *env, bool def_val)
 
static bool TryStringPack (void)
 

Private Member Functions

 CPackString (const CPackString &)
 
CPackStringoperator= (const CPackString &)
 

Static Private Member Functions

static void x_RefCounterError (void)
 
static bool x_Assign (string &s, const string &src)
 

Private Attributes

size_t m_LengthLimit
 
size_t m_CountLimit
 
size_t m_Skipped
 
size_t m_CompressedIn
 
size_t m_CompressedOut
 
set< SNodem_Strings
 

Detailed Description

Definition at line 42 of file pack_string.hpp.

Member Typedef Documentation

◆ iterator

Definition at line 109 of file pack_string.hpp.

◆ TKey

Definition at line 107 of file pack_string.hpp.

◆ TStrings

Definition at line 108 of file pack_string.hpp.

Constructor & Destructor Documentation

◆ CPackString() [1/3]

CPackString::CPackString ( void  )

Definition at line 44 of file pack_string.cpp.

◆ CPackString() [2/3]

CPackString::CPackString ( size_t  length_limit,
size_t  count_limit 
)

Definition at line 52 of file pack_string.cpp.

◆ ~CPackString()

CPackString::~CPackString ( void  )

Definition at line 60 of file pack_string.cpp.

◆ CPackString() [3/3]

CPackString::CPackString ( const CPackString )
private

Member Function Documentation

◆ AddNew()

bool CPackString::AddNew ( string s,
const char *  data,
size_t  size,
iterator  iter 
)

◆ AddOld()

void CPackString::AddOld ( string s,
const iterator iter 
)
inline

Definition at line 268 of file pack_string.hpp.

References m_CompressedIn.

Referenced by AddNew(), Pack(), and CObjectIStreamAsnBinary::ReadPackedString().

◆ Assign()

bool CPackString::Assign ( string s,
const string src 
)
inlinestatic

◆ DumpStatistics()

CNcbiOstream & CPackString::DumpStatistics ( CNcbiOstream out) const

Definition at line 65 of file pack_string.cpp.

References i, ITERATE, m_CompressedIn, m_CompressedOut, m_Skipped, m_Strings, and out().

Referenced by operator<<().

◆ GetCount()

size_t CPackString::GetCount ( void  ) const
inline

Definition at line 199 of file pack_string.hpp.

References m_CompressedOut.

Referenced by AddNew(), and Pack().

◆ GetCountLimit()

size_t CPackString::GetCountLimit ( void  ) const
inline

Definition at line 192 of file pack_string.hpp.

References m_CountLimit.

Referenced by AddNew(), and Pack().

◆ GetLengthLimit()

size_t CPackString::GetLengthLimit ( void  ) const
inline

Definition at line 185 of file pack_string.hpp.

References m_LengthLimit.

Referenced by AddNew(), Locate(), Pack(), and CObjectIStreamAsnBinary::ReadPackedString().

◆ Locate()

pair< CPackString::iterator, bool > CPackString::Locate ( const char *  data,
size_t  size 
)
inline

◆ operator=()

CPackString& CPackString::operator= ( const CPackString )
private

◆ Pack() [1/2]

bool CPackString::Pack ( string s)

◆ Pack() [2/2]

bool CPackString::Pack ( string s,
const char *  data,
size_t  size 
)

◆ ReadString()

void CPackString::ReadString ( CObjectIStream in,
string s 
)
inline

Definition at line 248 of file pack_string.hpp.

References in().

◆ s_GetEnvFlag()

bool CPackString::s_GetEnvFlag ( const char *  env,
bool  def_val 
)
static

Definition at line 83 of file pack_string.cpp.

References NStr::CompareNocase(), env, ENV_YES, and val.

Referenced by TryStringPack().

◆ Skipped()

void CPackString::Skipped ( void  )
inline

Definition at line 276 of file pack_string.hpp.

References m_Skipped.

Referenced by AddNew(), Pack(), and CObjectIStreamAsnBinary::ReadPackedString().

◆ TryStringPack()

bool CPackString::TryStringPack ( void  )
static

Definition at line 94 of file pack_string.cpp.

References s_GetEnvFlag(), and STRING_PACK_ENV.

Referenced by CProcessor::TryStringPack(), and x_Assign().

◆ x_Assign()

bool CPackString::x_Assign ( string s,
const string src 
)
staticprivate

Definition at line 125 of file pack_string.cpp.

References TryStringPack(), and x_RefCounterError().

Referenced by Assign().

◆ x_RefCounterError()

void CPackString::x_RefCounterError ( void  )
staticprivate

Definition at line 118 of file pack_string.cpp.

References THROW1_TRACE.

Referenced by x_Assign().

Member Data Documentation

◆ m_CompressedIn

size_t CPackString::m_CompressedIn
private

Definition at line 146 of file pack_string.hpp.

Referenced by AddOld(), and DumpStatistics().

◆ m_CompressedOut

size_t CPackString::m_CompressedOut
private

Definition at line 147 of file pack_string.hpp.

Referenced by AddNew(), DumpStatistics(), GetCount(), and Pack().

◆ m_CountLimit

size_t CPackString::m_CountLimit
private

Definition at line 144 of file pack_string.hpp.

Referenced by GetCountLimit().

◆ m_LengthLimit

size_t CPackString::m_LengthLimit
private

Definition at line 143 of file pack_string.hpp.

Referenced by GetLengthLimit().

◆ m_Skipped

size_t CPackString::m_Skipped
private

Definition at line 145 of file pack_string.hpp.

Referenced by DumpStatistics(), and Skipped().

◆ m_Strings

set<SNode> CPackString::m_Strings
private

Definition at line 148 of file pack_string.hpp.

Referenced by AddNew(), DumpStatistics(), Locate(), and Pack().


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