MemoryMappedFile::toString() method, cleanup of constants.h
parent
6d1f81ceda
commit
884136580d
|
@ -75,14 +75,6 @@
|
|||
#define SQRT_TWO_DBL 1.41421356237309504880
|
||||
#define INV_SQRT_TWO_DBL 0.70710678118654752440
|
||||
|
||||
#define M_E M_E_DBL
|
||||
#define M_PI M_PI_DBL
|
||||
#define INV_PI INV_PI_DBL
|
||||
#define INV_TWOPI INV_TWOPI_DBL
|
||||
#define INV_FOURPI INV_FOURPI_DBL
|
||||
#define SQRT_TWO SQRT_TWO_DBL
|
||||
#define INV_SQRT_TWO INV_SQRT_TWO_DBL
|
||||
|
||||
#ifdef SINGLE_PRECISION
|
||||
#define M_E M_E_FLT
|
||||
#define M_PI M_PI_FLT
|
||||
|
|
|
@ -46,10 +46,13 @@ public:
|
|||
/// Return the size of the mapped region
|
||||
size_t getSize() const;
|
||||
|
||||
/// Release all resources
|
||||
virtual ~MemoryMappedFile();
|
||||
/// Return a string representation
|
||||
std::string toString() const;
|
||||
|
||||
MTS_DECLARE_CLASS()
|
||||
protected:
|
||||
/// Release all resources
|
||||
virtual ~MemoryMappedFile();
|
||||
private:
|
||||
struct MemoryMappedFilePrivate;
|
||||
boost::scoped_ptr<MemoryMappedFilePrivate> d;
|
||||
|
|
|
@ -134,5 +134,13 @@ size_t MemoryMappedFile::getSize() const {
|
|||
return d->size;
|
||||
}
|
||||
|
||||
std::string MemoryMappedFile::toString() const {
|
||||
std::ostringstream oss;
|
||||
oss << "MemoryMappedFile[filename=\""
|
||||
<< d->filename.string() << "\", size="
|
||||
<< memString(d->size) << "]";
|
||||
return oss.str();
|
||||
}
|
||||
|
||||
MTS_IMPLEMENT_CLASS(MemoryMappedFile, false, Object)
|
||||
MTS_NAMESPACE_END
|
||||
|
|
Loading…
Reference in New Issue