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

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