Update old doc comments
This commit is contained in:
@@ -13,12 +13,9 @@
|
||||
class AudioClipUpgrader : public BinaryAssetUpgrader
|
||||
{
|
||||
public:
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="AudioClipUpgrader"/> class.
|
||||
/// </summary>
|
||||
AudioClipUpgrader()
|
||||
{
|
||||
static const Upgrader upgraders[] =
|
||||
const Upgrader upgraders[] =
|
||||
{
|
||||
{},
|
||||
};
|
||||
|
||||
@@ -13,12 +13,9 @@
|
||||
class FontAssetUpgrader : public BinaryAssetUpgrader
|
||||
{
|
||||
public:
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="FontAssetUpgrader"/> class.
|
||||
/// </summary>
|
||||
FontAssetUpgrader()
|
||||
{
|
||||
static const Upgrader upgraders[] =
|
||||
const Upgrader upgraders[] =
|
||||
{
|
||||
{},
|
||||
};
|
||||
|
||||
@@ -13,12 +13,9 @@
|
||||
class MaterialInstanceUpgrader : public BinaryAssetUpgrader
|
||||
{
|
||||
public:
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="MaterialInstanceUpgrader"/> class.
|
||||
/// </summary>
|
||||
MaterialInstanceUpgrader()
|
||||
{
|
||||
static const Upgrader upgraders[] =
|
||||
const Upgrader upgraders[] =
|
||||
{
|
||||
{},
|
||||
};
|
||||
|
||||
@@ -13,12 +13,9 @@
|
||||
class ShaderAssetUpgrader : public BinaryAssetUpgrader
|
||||
{
|
||||
public:
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ShaderAssetUpgrader"/> class.
|
||||
/// </summary>
|
||||
ShaderAssetUpgrader()
|
||||
{
|
||||
static const Upgrader upgraders[] =
|
||||
const Upgrader upgraders[] =
|
||||
{
|
||||
{},
|
||||
};
|
||||
|
||||
@@ -13,12 +13,9 @@
|
||||
class SkeletonMaskUpgrader : public BinaryAssetUpgrader
|
||||
{
|
||||
public:
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="SkeletonMaskUpgrader"/> class.
|
||||
/// </summary>
|
||||
SkeletonMaskUpgrader()
|
||||
{
|
||||
static const Upgrader upgraders[] =
|
||||
const Upgrader upgraders[] =
|
||||
{
|
||||
{},
|
||||
};
|
||||
|
||||
@@ -13,12 +13,9 @@
|
||||
class TextureAssetUpgrader : public BinaryAssetUpgrader
|
||||
{
|
||||
public:
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="TextureAssetUpgrader"/> class.
|
||||
/// </summary>
|
||||
TextureAssetUpgrader()
|
||||
{
|
||||
static const Upgrader upgraders[] =
|
||||
const Upgrader upgraders[] =
|
||||
{
|
||||
{},
|
||||
};
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
/// <summary>
|
||||
/// Common values types.
|
||||
/// [Deprecated on 31.07.2020, expires on 31.07.2022]
|
||||
/// </summary>
|
||||
enum class CommonType
|
||||
{
|
||||
|
||||
@@ -53,31 +53,37 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
// Init
|
||||
// @param Days Amount of days
|
||||
// @param Hours Amount of hours
|
||||
// @param Minutes Amount of minutes
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="TimeSpan"/> struct.
|
||||
/// </summary>
|
||||
/// <param name="days">Amount of days.</param>
|
||||
/// <param name="hours">Amount of hours.</param>
|
||||
/// <param name="minutes">Amount of minutes.</param>
|
||||
TimeSpan(int32 days, int32 hours, int32 minutes)
|
||||
{
|
||||
Set(days, hours, minutes, 0, 0);
|
||||
}
|
||||
|
||||
// Init
|
||||
// @param Days Amount of days
|
||||
// @param Hours Amount of hours
|
||||
// @param Minutes Amount of minutes
|
||||
// @param Seconds Amount of seconds
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="TimeSpan"/> struct.
|
||||
/// </summary>
|
||||
/// <param name="days">Amount of days.</param>
|
||||
/// <param name="hours">Amount of hours.</param>
|
||||
/// <param name="minutes">Amount of minutes.</param>
|
||||
/// <param name="seconds">Amount of seconds.</param>
|
||||
TimeSpan(int32 days, int32 hours, int32 minutes, int32 seconds)
|
||||
{
|
||||
Set(days, hours, minutes, seconds, 0);
|
||||
}
|
||||
|
||||
// Init
|
||||
// @param Days Amount of days
|
||||
// @param Hours Amount of hours
|
||||
// @param Minutes Amount of minutes
|
||||
// @param Seconds Amount of seconds
|
||||
// @param Milliseconds Amount of milliseconds
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="TimeSpan"/> struct.
|
||||
/// </summary>
|
||||
/// <param name="days">Amount of days.</param>
|
||||
/// <param name="hours">Amount of hours.</param>
|
||||
/// <param name="minutes">Amount of minutes.</param>
|
||||
/// <param name="seconds">Amount of seconds.</param>
|
||||
/// <param name="milliseconds">Amount of milliseconds</param>
|
||||
TimeSpan(int32 days, int32 hours, int32 minutes, int32 seconds, int32 milliseconds)
|
||||
{
|
||||
Set(days, hours, minutes, seconds, milliseconds);
|
||||
@@ -87,8 +93,7 @@ public:
|
||||
// Get string
|
||||
String ToString() const;
|
||||
|
||||
// Get string
|
||||
// @param option Custom formatting. Possible values:
|
||||
// Get string with custom formatting. Possible values:
|
||||
// a: 11:54:22.097
|
||||
// default: 11:54:22.0972244
|
||||
String ToString(const char option) const;
|
||||
|
||||
@@ -276,17 +276,14 @@ public:
|
||||
/// </summary>
|
||||
void UpdateCachedData();
|
||||
|
||||
// Set up view with custom params
|
||||
// @param viewProjection View * Projection matrix
|
||||
// Setups view with custom params.
|
||||
void SetUp(const Matrix& viewProjection);
|
||||
|
||||
// Set up view with custom params
|
||||
// @param view View matrix
|
||||
// @param projection Projection matrix
|
||||
// Setups view with custom params.
|
||||
void SetUp(const Matrix& view, const Matrix& projection);
|
||||
|
||||
/// <summary>
|
||||
/// Set up view for cube rendering
|
||||
/// Setups view for cube rendering.
|
||||
/// </summary>
|
||||
/// <param name="nearPlane">Near plane</param>
|
||||
/// <param name="farPlane">Far plane</param>
|
||||
@@ -294,13 +291,13 @@ public:
|
||||
void SetUpCube(float nearPlane, float farPlane, const Float3& position);
|
||||
|
||||
/// <summary>
|
||||
/// Set up view for given face of the cube rendering
|
||||
/// Setups view for given face of the cube rendering.
|
||||
/// </summary>
|
||||
/// <param name="faceIndex">Face index(0-5)</param>
|
||||
void SetFace(int32 faceIndex);
|
||||
|
||||
/// <summary>
|
||||
/// Set up view for cube rendering
|
||||
/// Setups view for cube rendering.
|
||||
/// </summary>
|
||||
/// <param name="nearPlane">Near plane</param>
|
||||
/// <param name="farPlane">Far plane</param>
|
||||
|
||||
@@ -286,6 +286,7 @@ DateTime JsonTools::GetDateTime(const Value& value)
|
||||
|
||||
CommonValue JsonTools::GetCommonValue(const Value& value)
|
||||
{
|
||||
// [Deprecated on 31.07.2020, expires on 31.07.2022]
|
||||
CommonValue result;
|
||||
const auto typeMember = value.FindMember("Type");
|
||||
const auto valueMember = value.FindMember("Value");
|
||||
|
||||
@@ -246,6 +246,7 @@ void JsonWriter::Matrix(const ::Matrix& value)
|
||||
|
||||
void JsonWriter::CommonValue(const ::CommonValue& value)
|
||||
{
|
||||
// [Deprecated on 31.07.2020, expires on 31.07.2022]
|
||||
StartObject();
|
||||
|
||||
JKEY("Type");
|
||||
|
||||
@@ -6,53 +6,63 @@
|
||||
#include "Engine/Platform/Platform.h"
|
||||
|
||||
/// <summary>
|
||||
/// Super fast advanced data reading from raw bytes without any overhead at all
|
||||
/// Direct memory reading stream that uses a single allocation buffer.
|
||||
/// </summary>
|
||||
class FLAXENGINE_API MemoryReadStream : public ReadStream
|
||||
{
|
||||
private:
|
||||
|
||||
const byte* _buffer;
|
||||
const byte* _position;
|
||||
uint32 _length;
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Init (empty, cannot access before Init())
|
||||
/// </summary>
|
||||
MemoryReadStream();
|
||||
|
||||
/// <summary>
|
||||
/// Init
|
||||
/// Initializes a new instance of the <see cref="MemoryReadStream"/> class.
|
||||
/// </summary>
|
||||
/// <param name="bytes">Bytes with data to read from it (no memory cloned, using input buffer)</param>
|
||||
MemoryReadStream();
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="MemoryReadStream"/> class.
|
||||
/// </summary>
|
||||
/// <param name="bytes">Bytes with data to read from it (no memory cloned, using input buffer).</param>
|
||||
/// <param name="length">Amount of bytes</param>
|
||||
MemoryReadStream(const byte* bytes, uint32 length);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Init
|
||||
/// Initializes a new instance of the <see cref="MemoryReadStream"/> class.
|
||||
/// </summary>
|
||||
/// <param name="data">Array with data to read from</param>
|
||||
/// <param name="data">Array with data to read from.</param>
|
||||
template<typename T, typename AllocationType = HeapAllocation>
|
||||
MemoryReadStream(const Array<T, AllocationType>& data)
|
||||
: MemoryReadStream(data.Get(), data.Count() * sizeof(T))
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="MemoryReadStream"/> class.
|
||||
/// </summary>
|
||||
/// <param name="data">Span with data to read from.</param>
|
||||
template<typename T>
|
||||
MemoryReadStream(const Span<T>& data)
|
||||
: MemoryReadStream(data.Get(), data.Count() * sizeof(T))
|
||||
{
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Init stream to the custom buffer location
|
||||
/// Init stream to the custom buffer location.
|
||||
/// </summary>
|
||||
/// <param name="bytes">Bytes with data to read from it (no memory cloned, using input buffer)</param>
|
||||
/// <param name="length">Amount of bytes</param>
|
||||
/// <param name="bytes">Bytes with data to read from it (no memory cloned, using input buffer).</param>
|
||||
/// <param name="length">Amount of bytes.</param>
|
||||
void Init(const byte* bytes, uint32 length);
|
||||
|
||||
/// <summary>
|
||||
/// Init stream to the custom buffer location
|
||||
/// Init stream to the custom buffer location.
|
||||
/// </summary>
|
||||
/// <param name="data">Array with data to read from</param>
|
||||
/// <param name="data">Array with data to read from.</param>
|
||||
template<typename T, typename AllocationType = HeapAllocation>
|
||||
FORCE_INLINE void Init(const Array<T, AllocationType>& data)
|
||||
{
|
||||
@@ -62,7 +72,6 @@ public:
|
||||
/// <summary>
|
||||
/// Gets the current handle to position in buffer.
|
||||
/// </summary>
|
||||
/// <returns>The position of the buffer in memory.</returns>
|
||||
const byte* GetPositionHandle() const
|
||||
{
|
||||
return _position;
|
||||
@@ -104,7 +113,6 @@ public:
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
// [ReadStream]
|
||||
void Flush() override;
|
||||
void Close() override;
|
||||
|
||||
@@ -5,22 +5,23 @@
|
||||
#include "WriteStream.h"
|
||||
|
||||
/// <summary>
|
||||
/// Implementation of of the stream that can be used for fast data writing to the memory.
|
||||
/// Direct memory writing stream that uses a single allocation buffer.
|
||||
/// </summary>
|
||||
class FLAXENGINE_API MemoryWriteStream : public WriteStream
|
||||
{
|
||||
private:
|
||||
|
||||
byte* _buffer;
|
||||
byte* _position;
|
||||
uint32 _capacity;
|
||||
|
||||
public:
|
||||
|
||||
MemoryWriteStream();
|
||||
|
||||
/// <summary>
|
||||
/// Init
|
||||
/// Initializes a new instance of the <see cref="MemoryWriteStream"/> class.
|
||||
/// </summary>
|
||||
MemoryWriteStream();
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="MemoryWriteStream"/> class.
|
||||
/// </summary>
|
||||
/// <param name="capacity">Initial write buffer capacity (in bytes).</param>
|
||||
MemoryWriteStream(uint32 capacity);
|
||||
@@ -31,38 +32,33 @@ public:
|
||||
~MemoryWriteStream();
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Gets buffer handle
|
||||
/// Gets the pointer to the buffer in memory.
|
||||
/// </summary>
|
||||
/// <returns>Pointer to the buffer in memory</returns>
|
||||
FORCE_INLINE byte* GetHandle() const
|
||||
{
|
||||
return _buffer;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets current capacity of the memory stream
|
||||
/// Gets the current capacity of the stream.
|
||||
/// </summary>
|
||||
/// <returns>Stream capacity in bytes</returns>
|
||||
FORCE_INLINE uint32 GetCapacity() const
|
||||
{
|
||||
return _capacity;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets current stream length (capacity in bytes)
|
||||
/// Gets current stream length (capacity in bytes).
|
||||
/// </summary>
|
||||
/// <returns>Stream length in bytes</returns>
|
||||
FORCE_INLINE uint32 GetLength() const
|
||||
{
|
||||
return _capacity;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets current position in the stream (in bytes)
|
||||
/// Gets current position in the stream (in bytes).
|
||||
/// </summary>
|
||||
/// <returns>Stream position in bytes</returns>
|
||||
FORCE_INLINE uint32 GetPosition() const
|
||||
{
|
||||
return static_cast<uint32>(_position - _buffer);
|
||||
@@ -97,7 +93,6 @@ public:
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Cleanups the buffers, resets the position and allocated the new memory chunk.
|
||||
/// </summary>
|
||||
@@ -105,14 +100,13 @@ public:
|
||||
void Reset(uint32 capacity);
|
||||
|
||||
/// <summary>
|
||||
/// Saves current buffer contents to the file
|
||||
/// Saves current buffer contents to the file.
|
||||
/// </summary>
|
||||
/// <param name="path">Filepath</param>
|
||||
/// <returns>True if cannot save data, otherwise false</returns>
|
||||
/// <param name="path">The file path.</param>
|
||||
/// <returns>True if cannot save data, otherwise false.</returns>
|
||||
bool SaveToFile(const StringView& path) const;
|
||||
|
||||
public:
|
||||
|
||||
// [WriteStream]
|
||||
void Flush() override;
|
||||
void Close() override;
|
||||
|
||||
@@ -107,6 +107,7 @@ void ReadStream::Read(String& data, int16 lock)
|
||||
|
||||
void ReadStream::Read(CommonValue& data)
|
||||
{
|
||||
// [Deprecated on 31.07.2020, expires on 31.07.2022]
|
||||
byte type;
|
||||
ReadByte(&type);
|
||||
switch (static_cast<CommonType>(type))
|
||||
@@ -716,6 +717,7 @@ void WriteStream::Write(const StringAnsiView& data, int8 lock)
|
||||
|
||||
void WriteStream::Write(const CommonValue& data)
|
||||
{
|
||||
// [Deprecated on 31.07.2020, expires on 31.07.2022]
|
||||
WriteByte(static_cast<byte>(data.Type));
|
||||
switch (data.Type)
|
||||
{
|
||||
|
||||
@@ -12,129 +12,111 @@ class FLAXENGINE_API WriteStream : public Stream
|
||||
{
|
||||
public:
|
||||
/// <summary>
|
||||
/// Writes bytes to the stream
|
||||
/// Writes bytes to the stream.
|
||||
/// </summary>
|
||||
/// <param name="data">Data to write</param>
|
||||
/// <param name="bytes">Amount of bytes to write</param>
|
||||
/// <param name="data">Pointer to data to write.</param>
|
||||
/// <param name="bytes">Amount of bytes to write.</param>
|
||||
virtual void WriteBytes(const void* data, uint32 bytes) = 0;
|
||||
|
||||
public:
|
||||
// Writes byte to the stream
|
||||
// @param data Data to write
|
||||
// Writes byte to the stream.
|
||||
FORCE_INLINE void WriteByte(byte data)
|
||||
{
|
||||
WriteBytes(&data, sizeof(byte));
|
||||
}
|
||||
|
||||
// Writes bool to the stream
|
||||
// @param data Data to write
|
||||
// Writes bool to the stream.
|
||||
FORCE_INLINE void WriteBool(bool data)
|
||||
{
|
||||
WriteBytes(&data, sizeof(bool));
|
||||
}
|
||||
|
||||
// Writes char to the stream
|
||||
// @param data Data to write
|
||||
// Writes char to the stream.
|
||||
FORCE_INLINE void WriteChar(char data)
|
||||
{
|
||||
WriteBytes(&data, sizeof(char));
|
||||
}
|
||||
|
||||
// Writes Char to the stream
|
||||
// @param data Data to write
|
||||
// Writes Char to the stream.
|
||||
FORCE_INLINE void WriteChar(Char data)
|
||||
{
|
||||
WriteBytes(&data, sizeof(Char));
|
||||
}
|
||||
|
||||
// Writes uint8 to the stream
|
||||
// @param data Data to write
|
||||
// Writes uint8 to the stream.
|
||||
FORCE_INLINE void WriteUint8(uint8 data)
|
||||
{
|
||||
WriteBytes(&data, sizeof(uint8));
|
||||
}
|
||||
|
||||
// Writes int8 to the stream
|
||||
// @param data Data to write
|
||||
// Writes int8 to the stream.
|
||||
FORCE_INLINE void WriteInt8(int8 data)
|
||||
{
|
||||
WriteBytes(&data, sizeof(int8));
|
||||
}
|
||||
|
||||
// Writes uint16 to the stream
|
||||
// @param data Data to write
|
||||
// Writes uint16 to the stream.
|
||||
FORCE_INLINE void WriteUint16(uint16 data)
|
||||
{
|
||||
WriteBytes(&data, sizeof(uint16));
|
||||
}
|
||||
|
||||
// Writes int16 to the stream
|
||||
// @param data Data to write
|
||||
// Writes int16 to the stream.
|
||||
FORCE_INLINE void WriteInt16(int16 data)
|
||||
{
|
||||
WriteBytes(&data, sizeof(int16));
|
||||
}
|
||||
|
||||
// Writes uint32 to the stream
|
||||
// @param data Data to write
|
||||
// Writes uint32 to the stream.
|
||||
FORCE_INLINE void WriteUint32(uint32 data)
|
||||
{
|
||||
WriteBytes(&data, sizeof(uint32));
|
||||
}
|
||||
|
||||
// Writes int32 to the stream
|
||||
// @param data Data to write
|
||||
// Writes int32 to the stream.
|
||||
FORCE_INLINE void WriteInt32(int32 data)
|
||||
{
|
||||
WriteBytes(&data, sizeof(int32));
|
||||
}
|
||||
|
||||
// Writes int64 to the stream
|
||||
// @param data Data to write
|
||||
// Writes int64 to the stream.
|
||||
FORCE_INLINE void WriteInt64(int64 data)
|
||||
{
|
||||
WriteBytes(&data, sizeof(int64));
|
||||
}
|
||||
|
||||
// Writes uint64 to the stream
|
||||
// @param data Data to write
|
||||
// Writes uint64 to the stream.
|
||||
FORCE_INLINE void WriteUint64(uint64 data)
|
||||
{
|
||||
WriteBytes(&data, sizeof(uint64));
|
||||
}
|
||||
|
||||
// Writes float to the stream
|
||||
// @param data Data to write
|
||||
// Writes float to the stream.
|
||||
FORCE_INLINE void WriteFloat(float data)
|
||||
{
|
||||
WriteBytes(&data, sizeof(float));
|
||||
}
|
||||
|
||||
// Writes double to the stream
|
||||
// @param data Data to write
|
||||
// Writes double to the stream.
|
||||
FORCE_INLINE void WriteDouble(double data)
|
||||
{
|
||||
WriteBytes(&data, sizeof(double));
|
||||
}
|
||||
|
||||
public:
|
||||
// Writes text to the stream
|
||||
// @param data Text to write
|
||||
// @param length Text length
|
||||
// Writes text to the stream.
|
||||
void WriteText(const char* text, int32 length)
|
||||
{
|
||||
WriteBytes((const void*)text, sizeof(char) * length);
|
||||
}
|
||||
|
||||
// Writes text to the stream
|
||||
// @param data Text to write
|
||||
// @param length Text length
|
||||
// Writes text to the stream.
|
||||
void WriteText(const Char* text, int32 length)
|
||||
{
|
||||
WriteBytes((const void*)text, sizeof(Char) * length);
|
||||
}
|
||||
|
||||
// Write UTF BOM character sequence
|
||||
// Write UTF BOM character sequence.
|
||||
void WriteBOM()
|
||||
{
|
||||
WriteByte(0xEF);
|
||||
@@ -142,8 +124,7 @@ public:
|
||||
WriteByte(0xBF);
|
||||
}
|
||||
|
||||
// Writes text to the stream
|
||||
// @param data Text to write
|
||||
// Writes text to the stream.
|
||||
void WriteText(const StringView& text);
|
||||
void WriteText(const StringAnsiView& text);
|
||||
|
||||
@@ -249,7 +230,6 @@ public:
|
||||
|
||||
// Writes Ansi String to the stream
|
||||
/// [Deprecated on 11.10.2022, expires on 11.10.2024]
|
||||
// @param data Data to write
|
||||
void WriteStringAnsi(const StringAnsiView& data);
|
||||
|
||||
// Writes Ansi String to the stream
|
||||
|
||||
@@ -234,8 +234,10 @@ public:
|
||||
return index;
|
||||
}
|
||||
|
||||
// Add collection of items to the collection
|
||||
// @param collection Array with the items to add
|
||||
/// <summary>
|
||||
/// Adds a collection of items to the collection.
|
||||
/// </summary>
|
||||
/// <param name="collection">The collection of items to add.</param>
|
||||
FORCE_INLINE void Add(ConcurrentBuffer<T>& collection)
|
||||
{
|
||||
Add(collection.Get(), collection.Count());
|
||||
|
||||
Reference in New Issue
Block a user