mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-22 05:27:19 +00:00
6a38b67ed5
* General AMF cleanup Proper memory management as well as style cleanup * General optimizations Fix AMFArray so values are properly deleted when you leave the scope it was created in. Add bounds check for deletion so you don't double delete. Remove all AMFdeletions that are contained in an array since the array now manages its own memory and deletes it when it is no longer needed. * Better tests and fix de-serialize Fix de-serialize to be correct and implement a test to check this * Update AMFDeserializeTests.cpp * Update AMFFormat.cpp
93 lines
2.2 KiB
C++
93 lines
2.2 KiB
C++
#pragma once
|
|
|
|
// Custom Classes
|
|
#include "AMFFormat.h"
|
|
|
|
// RakNet
|
|
#include <BitStream.h>
|
|
|
|
/*!
|
|
\file AMFFormat_BitStream.h
|
|
\brief A class that implements native writing of AMF values to RakNet::BitStream
|
|
*/
|
|
|
|
// We are using the RakNet namespace
|
|
namespace RakNet {
|
|
//! Writes an AMFValue pointer to a RakNet::BitStream
|
|
/*!
|
|
\param value The value to write
|
|
*/
|
|
template <>
|
|
void RakNet::BitStream::Write<AMFValue*>(AMFValue* value);
|
|
|
|
//! Writes an AMFUndefinedValue to a RakNet::BitStream
|
|
/*!
|
|
\param value The value to write
|
|
*/
|
|
template <>
|
|
void RakNet::BitStream::Write<AMFUndefinedValue>(AMFUndefinedValue value);
|
|
|
|
//! Writes an AMFNullValue to a RakNet::BitStream
|
|
/*!
|
|
\param value The value to write
|
|
*/
|
|
template <>
|
|
void RakNet::BitStream::Write<AMFNullValue>(AMFNullValue value);
|
|
|
|
//! Writes an AMFFalseValue to a RakNet::BitStream
|
|
/*!
|
|
\param value The value to write
|
|
*/
|
|
template <>
|
|
void RakNet::BitStream::Write<AMFFalseValue>(AMFFalseValue value);
|
|
|
|
//! Writes an AMFTrueValue to a RakNet::BitStream
|
|
/*!
|
|
\param value The value to write
|
|
*/
|
|
template <>
|
|
void RakNet::BitStream::Write<AMFTrueValue>(AMFTrueValue value);
|
|
|
|
//! Writes an AMFIntegerValue to a RakNet::BitStream
|
|
/*!
|
|
\param value The value to write
|
|
*/
|
|
template <>
|
|
void RakNet::BitStream::Write<AMFIntegerValue>(AMFIntegerValue value);
|
|
|
|
//! Writes an AMFDoubleValue to a RakNet::BitStream
|
|
/*!
|
|
\param value The value to write
|
|
*/
|
|
template <>
|
|
void RakNet::BitStream::Write<AMFDoubleValue>(AMFDoubleValue value);
|
|
|
|
//! Writes an AMFStringValue to a RakNet::BitStream
|
|
/*!
|
|
\param value The value to write
|
|
*/
|
|
template <>
|
|
void RakNet::BitStream::Write<AMFStringValue>(AMFStringValue value);
|
|
|
|
//! Writes an AMFXMLDocValue to a RakNet::BitStream
|
|
/*!
|
|
\param value The value to write
|
|
*/
|
|
template <>
|
|
void RakNet::BitStream::Write<AMFXMLDocValue>(AMFXMLDocValue value);
|
|
|
|
//! Writes an AMFDateValue to a RakNet::BitStream
|
|
/*!
|
|
\param value The value to write
|
|
*/
|
|
template <>
|
|
void RakNet::BitStream::Write<AMFDateValue>(AMFDateValue value);
|
|
|
|
//! Writes an AMFArrayValue to a RakNet::BitStream
|
|
/*!
|
|
\param value The value to write
|
|
*/
|
|
template <>
|
|
void RakNet::BitStream::Write<AMFArrayValue*>(AMFArrayValue* value);
|
|
} // namespace RakNet
|