Added StaticMemoryChunk class

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3830 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Tyler Dauwalder 2003-07-04 06:18:10 +00:00
parent e90fa96289
commit 7e57ce9132
1 changed files with 13 additions and 2 deletions

View File

@ -12,7 +12,7 @@
#include "cpp.h"
namespace UDF {
namespace Udf {
/*! Simple class to encapsulate the boring details of allocating
and deallocating a chunk of memory.
@ -56,6 +56,17 @@ private:
bool fOwnsData;
};
}; // namespace UDF
template <uint32 size>
class StaticMemoryChunk {
public:
uint32 Size() { return size; }
void* Data() { return reinterpret_cast<void*>(fData); }
status_t InitCheck() { return B_OK; }
private:
uint8 fData[size];
};
}; // namespace Udf
#endif // _UDF_MEMORY_CHUNK_H