OpendTect  6.3
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 ________________________________________________________________________
10 -*/
11 
12 #include "basicmod.h"
13 #include "fixedstring.h"
14 
15 
16 
21 {
22 public:
23  NrBytesToStringCreator();
24  NrBytesToStringCreator(od_uint64 nrbytes);
26  enum Unit { Bytes=0, KB=1, MB=2, GB=3, TB=4, PB=5 };
27 
28  void setUnitFrom(od_uint64 number,bool maximum=true);
35  FixedString getString(od_uint64 number,int nrdecimals=2,
36  bool withunit=true) const;
40  FixedString getUnitString() const;
41  static FixedString toString(Unit);
42 
43 protected:
44 
46 
47 };
#define mExpClass(module)
Definition: commondefs.h:157
Unit
Definition: nrbytes2string.h:26
Definition: nrbytes2string.h:20
OD::String that holds an existing text string.
Definition: fixedstring.h:27
BufferString toString(const DBKey &ky)
Definition: dbkey.h:115
Unit unit_
Definition: nrbytes2string.h:45
#define od_uint64
Definition: plftypes.h:35

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