Core: Merge InputStream and OutputStream to Stream

Remove serialization support from Stream


Former-commit-id: 7a761e4fcd07cab561f13e4709c4492ed18da88a
This commit is contained in:
Lynix
2015-11-20 13:52:49 +01:00
parent a47e5633d4
commit ed961f5ba8
66 changed files with 372 additions and 565 deletions

View File

@@ -83,7 +83,7 @@ namespace Nz
bool LoadFromFile(const String& filePath, const AnimationParams& params = AnimationParams());
bool LoadFromMemory(const void* data, std::size_t size, const AnimationParams& params = AnimationParams());
bool LoadFromStream(InputStream& stream, const AnimationParams& params = AnimationParams());
bool LoadFromStream(Stream& stream, const AnimationParams& params = AnimationParams());
void RemoveSequence(const String& sequenceName);
void RemoveSequence(unsigned int index);

View File

@@ -78,7 +78,7 @@ namespace Nz
// Open
bool OpenFromFile(const String& filePath, const FontParams& params = FontParams());
bool OpenFromMemory(const void* data, std::size_t size, const FontParams& params = FontParams());
bool OpenFromStream(InputStream& stream, const FontParams& params = FontParams());
bool OpenFromStream(Stream& stream, const FontParams& params = FontParams());
void SetAtlas(const std::shared_ptr<AbstractAtlas>& atlas);
void SetGlyphBorder(unsigned int borderSize);

View File

@@ -8,7 +8,7 @@
#define NAZARA_FORMATS_MD5ANIMPARSER_HPP
#include <Nazara/Prerequesites.hpp>
#include <Nazara/Core/InputStream.hpp>
#include <Nazara/Core/Stream.hpp>
#include <Nazara/Math/Box.hpp>
#include <Nazara/Math/Quaternion.hpp>
#include <Nazara/Math/Vector3.hpp>
@@ -42,7 +42,7 @@ namespace Nz
unsigned int index;
};
MD5AnimParser(InputStream& stream);
MD5AnimParser(Stream& stream);
~MD5AnimParser();
Ternary Check();
@@ -69,7 +69,7 @@ namespace Nz
std::vector<float> m_animatedComponents;
std::vector<Frame> m_frames;
std::vector<Joint> m_joints;
InputStream& m_stream;
Stream& m_stream;
String m_currentLine;
bool m_keepLastLine;
unsigned int m_frameIndex;

View File

@@ -8,7 +8,7 @@
#define NAZARA_FORMATS_MD5MESHPARSER_HPP
#include <Nazara/Prerequesites.hpp>
#include <Nazara/Core/InputStream.hpp>
#include <Nazara/Core/Stream.hpp>
#include <Nazara/Core/String.hpp>
#include <Nazara/Math/Quaternion.hpp>
#include <Nazara/Math/Vector3.hpp>
@@ -52,7 +52,7 @@ namespace Nz
String shader;
};
MD5MeshParser(InputStream& stream);
MD5MeshParser(Stream& stream);
~MD5MeshParser();
Ternary Check();
@@ -74,7 +74,7 @@ namespace Nz
std::vector<Joint> m_joints;
std::vector<Mesh> m_meshes;
InputStream& m_stream;
Stream& m_stream;
String m_currentLine;
bool m_keepLastLine;
unsigned int m_lineCount;

View File

@@ -9,7 +9,7 @@
#include <Nazara/Prerequesites.hpp>
#include <Nazara/Core/Color.hpp>
#include <Nazara/Core/InputStream.hpp>
#include <Nazara/Core/Stream.hpp>
#include <Nazara/Core/String.hpp>
#include <Nazara/Utility/Config.hpp>
#include <unordered_map>
@@ -39,7 +39,7 @@ namespace Nz
unsigned int illumModel = 0;
};
MTLParser(InputStream& stream$);
MTLParser(Stream& stream$);
~MTLParser();
const Material* GetMaterial(const String& materialName) const;
@@ -54,7 +54,7 @@ namespace Nz
void UnrecognizedLine(bool error = false);
std::unordered_map<String, Material> m_materials;
InputStream& m_stream;
Stream& m_stream;
String m_currentLine;
bool m_keepLastLine;
unsigned int m_lineCount;

View File

@@ -8,7 +8,7 @@
#define NAZARA_FORMATS_OBJPARSER_HPP
#include <Nazara/Prerequesites.hpp>
#include <Nazara/Core/InputStream.hpp>
#include <Nazara/Core/Stream.hpp>
#include <Nazara/Core/String.hpp>
#include <Nazara/Math/Vector3.hpp>
#include <Nazara/Math/Vector4.hpp>
@@ -39,7 +39,7 @@ namespace Nz
unsigned int material;
};
OBJParser(InputStream& stream$);
OBJParser(Stream& stream$);
~OBJParser();
const String* GetMaterials() const;
@@ -67,7 +67,7 @@ namespace Nz
std::vector<Vector3f> m_normals;
std::vector<Vector4f> m_positions;
std::vector<Vector3f> m_texCoords;
InputStream& m_stream;
Stream& m_stream;
String m_currentLine;
String m_mtlLib;
bool m_keepLastLine;

View File

@@ -9,7 +9,6 @@
#include <Nazara/Prerequesites.hpp>
#include <Nazara/Core/Color.hpp>
#include <Nazara/Core/InputStream.hpp>
#include <Nazara/Core/ObjectLibrary.hpp>
#include <Nazara/Core/ObjectRef.hpp>
#include <Nazara/Core/RefCounted.hpp>
@@ -17,6 +16,7 @@
#include <Nazara/Core/ResourceLoader.hpp>
#include <Nazara/Core/ResourceManager.hpp>
#include <Nazara/Core/Signal.hpp>
#include <Nazara/Core/Stream.hpp>
#include <Nazara/Utility/AbstractImage.hpp>
#include <Nazara/Utility/CubemapParams.hpp>
#include <atomic>
@@ -93,19 +93,19 @@ namespace Nz
// Load
bool LoadFromFile(const String& filePath, const ImageParams& params = ImageParams());
bool LoadFromMemory(const void* data, std::size_t size, const ImageParams& params = ImageParams());
bool LoadFromStream(InputStream& stream, const ImageParams& params = ImageParams());
bool LoadFromStream(Stream& stream, const ImageParams& params = ImageParams());
// LoadArray
bool LoadArrayFromFile(const String& filePath, const ImageParams& imageParams = ImageParams(), const Vector2ui& atlasSize = Vector2ui(2, 2));
bool LoadArrayFromImage(const Image& image, const Vector2ui& atlasSize = Vector2ui(2, 2));
bool LoadArrayFromMemory(const void* data, std::size_t size, const ImageParams& imageParams = ImageParams(), const Vector2ui& atlasSize = Vector2ui(2, 2));
bool LoadArrayFromStream(InputStream& stream, const ImageParams& imageParams = ImageParams(), const Vector2ui& atlasSize = Vector2ui(2, 2));
bool LoadArrayFromStream(Stream& stream, const ImageParams& imageParams = ImageParams(), const Vector2ui& atlasSize = Vector2ui(2, 2));
// LoadCubemap
bool LoadCubemapFromFile(const String& filePath, const ImageParams& imageParams = ImageParams(), const CubemapParams& cubemapParams = CubemapParams());
bool LoadCubemapFromImage(const Image& image, const CubemapParams& params = CubemapParams());
bool LoadCubemapFromMemory(const void* data, std::size_t size, const ImageParams& imageParams = ImageParams(), const CubemapParams& cubemapParams = CubemapParams());
bool LoadCubemapFromStream(InputStream& stream, const ImageParams& imageParams = ImageParams(), const CubemapParams& cubemapParams = CubemapParams());
bool LoadCubemapFromStream(Stream& stream, const ImageParams& imageParams = ImageParams(), const CubemapParams& cubemapParams = CubemapParams());
void SetLevelCount(UInt8 levelCount);
bool SetPixelColor(const Color& color, unsigned int x, unsigned int y = 0, unsigned int z = 0);

View File

@@ -8,7 +8,6 @@
#define NAZARA_MESH_HPP
#include <Nazara/Prerequesites.hpp>
#include <Nazara/Core/InputStream.hpp>
#include <Nazara/Core/ObjectLibrary.hpp>
#include <Nazara/Core/ObjectRef.hpp>
#include <Nazara/Core/Primitive.hpp>
@@ -16,6 +15,7 @@
#include <Nazara/Core/Resource.hpp>
#include <Nazara/Core/ResourceLoader.hpp>
#include <Nazara/Core/ResourceManager.hpp>
#include <Nazara/Core/Stream.hpp>
#include <Nazara/Core/String.hpp>
#include <Nazara/Math/Box.hpp>
#include <Nazara/Utility/Skeleton.hpp>
@@ -115,7 +115,7 @@ namespace Nz
bool LoadFromFile(const String& filePath, const MeshParams& params = MeshParams());
bool LoadFromMemory(const void* data, std::size_t size, const MeshParams& params = MeshParams());
bool LoadFromStream(InputStream& stream, const MeshParams& params = MeshParams());
bool LoadFromStream(Stream& stream, const MeshParams& params = MeshParams());
void Recenter();