beast cleaning and tidying:

* Consolidate small modules into one
* Remove Android-specific platform support
* Remove Chrono.h from beast_core.h
* Removed files:
  - TypeTraits.h
  - Utility.h
  - Net.h
  - Asio.h
* Remove zlib support:
  - Remove inline zlib library sources
  - Remove GZIPCompressorOutputStream
  - Remove GZIPDecompressorInputStream
* Remove obsolete or unused classes:
  - AbstractObject
  - BigInteger
  - BufferedInputStream
  - CacheLine
  - CPUMeter
  - DatagramSocket
  - DynamicObject
  - FileLogger
  - FPUFlags
  - Identifier
  - JSON
  - LocalisedStrings
  - MACAddress
  - MemoryAlignment
  - MemoryInputStream
  - MemoryMappedFile
  - NamedValueSet
  - OptionalScopedPointer
  - PerformanceCounter
  - PropertySet
  - ScopedTimeInterval
  - SparseSet
  - SpinDelay
  - StreamingSocket
  - StringPool
  - SubregionStream
  - Uuid
  - Variant
This commit is contained in:
Vinnie Falco
2014-03-20 18:08:54 -07:00
parent 761affacc3
commit 2d490f6e6a
142 changed files with 129 additions and 25187 deletions

View File

@@ -902,19 +902,6 @@ File File::createTempFile (const String& fileNameEnding)
return tempFile;
}
//==============================================================================
MemoryMappedFile::MemoryMappedFile (const File& file, MemoryMappedFile::AccessMode mode)
: address (nullptr), range (0, file.getSize()), fileHandle (0)
{
openInternal (file, mode);
}
MemoryMappedFile::MemoryMappedFile (const File& file, const Range<int64>& fileRange, AccessMode mode)
: address (nullptr), range (fileRange.getIntersectionWith (Range<int64> (0, file.getSize()))), fileHandle (0)
{
openInternal (file, mode);
}
//==============================================================================
class FileTests : public UnitTest
@@ -1049,37 +1036,6 @@ public:
expect (tempFile.getSize() == 10);
}
beginTestCase ("Memory-mapped files");
{
MemoryMappedFile mmf (tempFile, MemoryMappedFile::readOnly);
expect (mmf.getSize() == 10);
expect (mmf.getData() != nullptr);
expect (memcmp (mmf.getData(), "0123456789", 10) == 0);
}
{
const File tempFile2 (tempFile.getNonexistentSibling (false));
expect (tempFile2.create());
expect (tempFile2.appendData ("xxxxxxxxxx", 10));
{
MemoryMappedFile mmf (tempFile2, MemoryMappedFile::readWrite);
expect (mmf.getSize() == 10);
expect (mmf.getData() != nullptr);
memcpy (mmf.getData(), "abcdefghij", 10);
}
{
MemoryMappedFile mmf (tempFile2, MemoryMappedFile::readWrite);
expect (mmf.getSize() == 10);
expect (mmf.getData() != nullptr);
expect (memcmp (mmf.getData(), "abcdefghij", 10) == 0);
}
expect (tempFile2.deleteFile());
}
beginTestCase ("More writing");
expect (tempFile.appendData ("abcdefghij", 10));