41 #define STAT_FMT_COMPONENT_NAME "windowmasker-statistics-format-version"
42 #define STAT_FMT_VER_MAJOR 1
43 #define STAT_FMT_VER_MINOR 1
44 #define STAT_FMT_VER_PATCH 0
45 #define STAT_FMT_VER_PFX "ascii "
69 const string & name,
string const &
metadata )
91 static Uint4 punit = 0;
93 if( unit != 0 && unit <= punit )
96 ostr <<
"current unit " <<
hex << unit <<
"; "
97 <<
"previous unit " <<
hex << punit;
117 for(
size_t i( 0 );
i <
counts.size(); ++
i ) {
119 << dec <<
counts[
i].second <<
'\n';
129 out_stream << '>
' << PARAMS[0] << ' ' << pvalues[0] << '\n';
130 out_stream << '>
' << PARAMS[1] << ' ' << pvalues[1] << '\n';
131 out_stream << '>
' << PARAMS[2] << ' ' << pvalues[2] << '\n';
132 out_stream << '>
' << PARAMS[3] << ' ' << pvalues[3] << '\n';
CNcbiOstrstreamToString class helps convert CNcbiOstrstream to a string Sample usage:
Exceptions that CSeqMaskerOstatAscii might throw.
virtual const char * GetErrCodeString() const override
Get a description string for this exception.
@ eBadOrder
Unit information is not added in ascending order of units.
std::vector< std::string > comments
Set of comments to print in the end of the stats file.
virtual void doFinalize()
Write data to output file.
virtual ~CSeqMaskerOstatAscii()
Object destructor.
virtual void doSetComment(const string &msg)
Prints msg as a comment line in the output file.
static CSeqMaskerVersion FormatVersion
Format version.
CSeqMaskerOstatAscii(const string &name, string const &metadat)
Object constructor.
virtual void doSetUnitCount(Uint4 unit, Uint4 count)
Output a line with information about the given unit count.
Base class for computing and saving unit counts data.
string metadata
metadata string
vector< pair< Uint4, Uint4 > > counts
Unit counts.
CNcbiOstream & out_stream
Refers to the C++ stream that should be used to write out the unit counts data.
string FormatMetaData() const
Combine version data and metadata into a single string.
Include a standard set of the NCBI C++ Toolkit most basic headers.
TErrCode GetErrCode(void) const
Get error code.
#define NCBI_THROW(exception_class, err_code, message)
Generic macro to throw an exception, given the exception class, error code and message string.
virtual const char * GetErrCodeString(void) const
Get error code interpreted as text.
uint32_t Uint4
4-byte (32-bit) unsigned integer
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
IO_PREFIX::ofstream CNcbiOfstream
Portable alias for ofstream.
IO_PREFIX::ostream CNcbiOstream
Portable alias for ostream.
static void hex(unsigned char c)
constexpr bool empty(list< Ts... >) noexcept
#define STAT_FMT_COMPONENT_NAME
#define STAT_FMT_VER_MAJOR
#define STAT_FMT_VER_PATCH
#define STAT_FMT_VER_MINOR
static SLJIT_INLINE sljit_ins msg(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)