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

Search Toolkit Book for CFormatGuess::CFormatHints

Hints for guessing formats. More...

#include <util/format_guess.hpp>

Public Types

typedef CFormatGuess::EFormat TFormat
 

Public Member Functions

 CFormatHints (void)
 
CFormatHintsAddPreferredFormat (TFormat fmt)
 Mark the format as preferred. More...
 
CFormatHintsAddDisabledFormat (TFormat fmt)
 Mark the format as disabled. More...
 
CFormatHintsDisableAllNonpreferred (void)
 Disable all formats not marked as preferred. More...
 
void RemoveFormat (TFormat fmt)
 Remove format hint. More...
 
CFormatHintsReset (void)
 Remove all hints. More...
 
bool IsEmpty (void) const
 Check if there are any hints are set at all. More...
 
bool IsPreferred (TFormat fmt) const
 Check if the format is listed as preferred. More...
 
bool IsDisabled (TFormat fmt) const
 Check if the format is listed as disabled. More...
 

Private Types

typedef bitset< CFormatGuess::eFormat_maxTHints
 

Private Attributes

THints m_Preferred
 
THints m_Disabled
 

Detailed Description

Hints for guessing formats.

Two hint types can be used: preferred and disabled. Preferred are checked before any other formats. Disabled formats are not checked at all.

Definition at line 171 of file format_guess.hpp.

Member Typedef Documentation

◆ TFormat

Definition at line 174 of file format_guess.hpp.

◆ THints

Definition at line 197 of file format_guess.hpp.

Constructor & Destructor Documentation

◆ CFormatHints()

CFormatGuess::CFormatHints::CFormatHints ( void  )
inline

Definition at line 176 of file format_guess.hpp.

Member Function Documentation

◆ AddDisabledFormat()

CFormatGuess::CFormatHints & CFormatGuess::CFormatHints::AddDisabledFormat ( TFormat  fmt)
inline

Mark the format as disabled.

Definition at line 412 of file format_guess.hpp.

◆ AddPreferredFormat()

CFormatGuess::CFormatHints & CFormatGuess::CFormatHints::AddPreferredFormat ( TFormat  fmt)
inline

◆ DisableAllNonpreferred()

CFormatGuess::CFormatHints & CFormatGuess::CFormatHints::DisableAllNonpreferred ( void  )
inline

◆ IsDisabled()

bool CFormatGuess::CFormatHints::IsDisabled ( TFormat  fmt) const
inline

Check if the format is listed as disabled.

Definition at line 450 of file format_guess.hpp.

Referenced by CFormatGuess::GuessFormat(), CFormatGuess::IsEnabled(), and CFormatGuess::x_TestFormat().

◆ IsEmpty()

bool CFormatGuess::CFormatHints::IsEmpty ( void  ) const
inline

Check if there are any hints are set at all.

Definition at line 440 of file format_guess.hpp.

Referenced by CFormatGuess::GuessFormat().

◆ IsPreferred()

bool CFormatGuess::CFormatHints::IsPreferred ( TFormat  fmt) const
inline

Check if the format is listed as preferred.

Definition at line 445 of file format_guess.hpp.

Referenced by CFormatGuess::GuessFormat().

◆ RemoveFormat()

void CFormatGuess::CFormatHints::RemoveFormat ( TFormat  fmt)
inline

Remove format hint.

Definition at line 426 of file format_guess.hpp.

◆ Reset()

CFormatGuess::CFormatHints & CFormatGuess::CFormatHints::Reset ( void  )
inline

Remove all hints.

Definition at line 433 of file format_guess.hpp.

Member Data Documentation

◆ m_Disabled

THints CFormatGuess::CFormatHints::m_Disabled
private

Definition at line 200 of file format_guess.hpp.

Referenced by AddPreferredFormat().

◆ m_Preferred

THints CFormatGuess::CFormatHints::m_Preferred
private

Definition at line 199 of file format_guess.hpp.

Referenced by AddPreferredFormat().


The documentation for this class was generated from the following file:
Modified on Wed Jun 19 17:05:23 2024 by modify_doxy.py rev. 669887