Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

ByteCount.H File Reference


Detailed Description

A class to handle byte counts, parsing them from strings, and converting between bytes, kibibytes, mebibytes, etc.

Definition in file ByteCount.H.

#include "Util/sformat.H"
#include <string>

Include dependency graph for ByteCount.H:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  ByteCount
 A class to handle parsing + converting byte counts. More...

Functions

std::string convertToString (const ByteCount &val)
 ByteCount overload: format is "<int>".
void convertFromString (const std::string &str, ByteCount &val)
 ByteCount overload: format is "<float>[<B|KiB|MiB|GiB>]".


Function Documentation

void convertFromString const std::string str,
ByteCount val
[inline]
 

ByteCount overload: format is "<float>[<B|KiB|MiB|GiB>]".

Definition at line 130 of file ByteCount.H.

std::string convertToString const ByteCount val  )  [inline]
 

ByteCount overload: format is "<int>".

Note that we don't do any abbreviations to KiB, Mib, GiB, etc. on output, since that would involve a conversion to floating point that might result in data loss after a conversion to string and back. If you want such an abbreviated string, you can use ByteCount::prettyPrint().

Definition at line 124 of file ByteCount.H.

References ByteCount::bytes(), and sformat().


Generated on Sun Nov 22 13:45:08 2009 for iLab Neuromorphic Vision Toolkit by  doxygen 1.4.4