OpendTect  6.6
nrbytes2string.h
Go to the documentation of this file.
1 #pragma once
2 
3 /*@+
4 ________________________________________________________________________
5 
6  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
7  Author: Kris
8  Date: 2013
9  RCS: $Id$
10 ________________________________________________________________________
11 -*/
12 
13 #include "basicmod.h"
14 #include "fixedstring.h"
15 
16 
17 
22 {
23 public:
27  enum Unit { Bytes=0, KB=1, MB=2, GB=3, TB=4, PB=5 };
28 
29  void setUnitFrom(od_uint64 number,bool maximum=true);
36  FixedString getString(od_uint64 number,int nrdecimals=2,
37  bool withunit=true) const;
43 
44 protected:
45 
47 
48 };
49 
50 
od_uint64
#define od_uint64
Definition: plftypes.h:36
NrBytesToStringCreator::getUnitString
FixedString getUnitString() const
NrBytesToStringCreator::Unit
Unit
Definition: nrbytes2string.h:27
fixedstring.h
mExpClass
#define mExpClass(module)
Definition: commondefs.h:177
NrBytesToStringCreator::NrBytesToStringCreator
NrBytesToStringCreator()
NrBytesToStringCreator::unit_
Unit unit_
Definition: nrbytes2string.h:46
NrBytesToStringCreator
Definition: nrbytes2string.h:22
FixedString
OD::String that holds an existing text string.
Definition: fixedstring.h:29
NrBytesToStringCreator::getString
FixedString getString(uint64_t number, int nrdecimals=2, bool withunit=true) const
NrBytesToStringCreator::NrBytesToStringCreator
NrBytesToStringCreator(uint64_t nrbytes)
NrBytesToStringCreator::toString
static FixedString toString(Unit)
NrBytesToStringCreator::setUnitFrom
void setUnitFrom(uint64_t number, bool maximum=true)

Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B.V. 1995-2021