MemoryMappedFile::toString() method, cleanup of constants.h
parent
6d1f81ceda
commit
884136580d
|
@ -75,14 +75,6 @@
|
||||||
#define SQRT_TWO_DBL 1.41421356237309504880
|
#define SQRT_TWO_DBL 1.41421356237309504880
|
||||||
#define INV_SQRT_TWO_DBL 0.70710678118654752440
|
#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
|
#ifdef SINGLE_PRECISION
|
||||||
#define M_E M_E_FLT
|
#define M_E M_E_FLT
|
||||||
#define M_PI M_PI_FLT
|
#define M_PI M_PI_FLT
|
||||||
|
|
|
@ -46,10 +46,13 @@ public:
|
||||||
/// Return the size of the mapped region
|
/// Return the size of the mapped region
|
||||||
size_t getSize() const;
|
size_t getSize() const;
|
||||||
|
|
||||||
/// Release all resources
|
/// Return a string representation
|
||||||
virtual ~MemoryMappedFile();
|
std::string toString() const;
|
||||||
|
|
||||||
MTS_DECLARE_CLASS()
|
MTS_DECLARE_CLASS()
|
||||||
|
protected:
|
||||||
|
/// Release all resources
|
||||||
|
virtual ~MemoryMappedFile();
|
||||||
private:
|
private:
|
||||||
struct MemoryMappedFilePrivate;
|
struct MemoryMappedFilePrivate;
|
||||||
boost::scoped_ptr<MemoryMappedFilePrivate> d;
|
boost::scoped_ptr<MemoryMappedFilePrivate> d;
|
||||||
|
|
|
@ -134,5 +134,13 @@ size_t MemoryMappedFile::getSize() const {
|
||||||
return d->size;
|
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_IMPLEMENT_CLASS(MemoryMappedFile, false, Object)
|
||||||
MTS_NAMESPACE_END
|
MTS_NAMESPACE_END
|
||||||
|
|
Loading…
Reference in New Issue