TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
BinaryOutput.cpp File Reference
#include "G3D/platform.h"
#include "G3D/BinaryOutput.h"
#include "G3D/fileutils.h"
#include "G3D/FileSystem.h"
#include "G3D/stringutils.h"
#include "G3D/Array.h"
#include <zlib.h>
#include "G3D/Log.h"
#include <cstring>
+ Include dependency graph for BinaryOutput.cpp:

Namespaces

 G3D
 

Macros

#define MAX_BINARYOUTPUT_BUFFER_SIZE   400000000
 
#define IMPLEMENT_WRITER(ucase, lcase)
 
#define IMPLEMENT_WRITER(ucase, lcase)
 
#define IMPLEMENT_WRITER(ucase, lcase)
 

Detailed Description

Author
Morgan McGuire, http://graphics.cs.williams.edu Copyright 2002-2011, Morgan McGuire, All rights reserved.

2002-02-20 2010-03-17

Macro Definition Documentation

#define IMPLEMENT_WRITER (   ucase,
  lcase 
)
Value:
void BinaryOutput::write##ucase(const std::vector<lcase>& out, int n) {\
write##ucase(&out[0], n);\
}\
\
\
void BinaryOutput::write##ucase(const Array<lcase>& out, int n) {\
write##ucase(out.getCArray(), n);\
}
#define IMPLEMENT_WRITER (   ucase,
  lcase 
)
Value:
void BinaryOutput::write##ucase(const lcase* out, int n) {\
if (sizeof(lcase) == 1) {\
writeBytes((void*)out, n);\
} else {\
for (int i = 0; i < n ; ++i) {\
write##ucase(out[i]);\
}\
}\
}
#define IMPLEMENT_WRITER (   ucase,
  lcase 
)
Value:
void BinaryOutput::write##ucase(const lcase* out, int n) {\
if (m_swapBytes) {\
for (int i = 0; i < n; ++i) {\
write##ucase(out[i]);\
}\
} else {\
writeBytes((const void*)out, sizeof(lcase) * n);\
}\
}
#define MAX_BINARYOUTPUT_BUFFER_SIZE   400000000