Marked all (probably) functions that take regular string instead of std::fs::path as deprecated

This commit is contained in:
Vladyslav Baranovskyi
2025-02-11 16:15:05 +02:00
parent a992b65c39
commit e976515d82
25 changed files with 44 additions and 44 deletions

View File

@@ -121,7 +121,7 @@ namespace OpenVulkano::AR
* If path is changed after starting the recording, the already running recording will be moved to the new path.
* @param path The path to be used to store the recording
*/
void SetRecordingPath(const std::string& path)
void SetRecordingPath(const std::string& path) [[deprecated]]
{
std::filesystem::path p(path);
SetRecordingPath(p);

View File

@@ -114,7 +114,7 @@ namespace OpenVulkano::AR
* @param autoAdvance If set to true the playback will advance based on the stored timestamps. If set to false it will only advance if a new frame is requested.
* @return ArCreateResult about the status of the AR session creation. The session pointer will always be nullptr unless the status is SUCCESS.
*/
[[nodiscard]] static ArCreateResult CreatePlayback(const std::string& recordingPath, bool autoAdvance = true, bool loadImages = true, bool loadDepth = true);
[[nodiscard]] static ArCreateResult CreatePlayback(const std::string& recordingPath, bool autoAdvance = true, bool loadImages = true, bool loadDepth = true) [[deprecated]];
/**
* Creates a network streamed AR session. nullptr if failed to create session for given address. This will block till the connection with the remote host has been established.

View File

@@ -60,8 +60,8 @@ namespace OpenVulkano::AR
static bool DirHasMetadata(const std::filesystem::path& dirPath);
static ArSessionMetadata FromXML(const std::string& filePath);
static ArSessionMetadata FromXML(const std::string& filePath) [[deprecated]];
static ArSessionMetadata FromYaml(const std::string& filePath);
static ArSessionMetadata FromYaml(const std::string& filePath) [[deprecated]];
};
}

View File

@@ -47,7 +47,7 @@ namespace OpenVulkano::AR::Playback
size_t m_imgTotalSize = 0, m_imgReadSize = 0;
public:
ArPlaybackReader(const std::string& recDir)
ArPlaybackReader(const std::string& recDir) [[deprecated]]
{
std::string extensions = R"((_\d+|\.part\d+)?)" + std::string(TAR_EXTENSIONS_REGEX);
m_archiveMetadata.Open(recDir, ".*meta(data)?" + extensions);

View File

@@ -15,7 +15,7 @@ namespace OpenVulkano::AR::Playback
class ArSessionPlayback final : public ArSession, public std::enable_shared_from_this<ArSessionPlayback>
{
public:
ArSessionPlayback(const std::string& recordingPath, bool autoAdvance, bool loadImages, bool loadDepth);
ArSessionPlayback(const std::string& recordingPath, bool autoAdvance, bool loadImages, bool loadDepth); [[deprecated]]
~ArSessionPlayback() override;
@@ -31,7 +31,7 @@ class ArSessionPlayback final : public ArSession, public std::enable_shared_from
[[nodiscard]] ArType GetArType() override;
[[nodiscard]] const std::string& GetPlaybackPath() const { return recordingPath; }
[[nodiscard]] [[deprecated]] const std::string& GetPlaybackPath() const { return recordingPath; }
[[nodiscard]] bool IsLoadColorEnabled() const { return loadImages; }
[[nodiscard]] bool IsLoadDepthEnabled() const { return loadDepth; }

View File

@@ -34,7 +34,7 @@ namespace OpenVulkano
static Ptr PERF;
static Ptr APP;
static void SetupLogger(std::string logFolder = "", const std::string& logFile = "openVulkano.log", bool handleSignals = false);
static void SetupLogger(std::string logFolder = "", const std::string& logFile = "openVulkano.log", bool handleSignals = false) [[deprecated]];
/**
* \brief Creates a new custom logger that writes to the main log file.

View File

@@ -16,7 +16,7 @@ namespace OpenVulkano
class ExeAppendedZipResourceLoader : public ResourceLoader
{
public:
std::string GetResourcePath(const std::string& resourceName) final { return ""; }
std::string GetResourcePath(const std::string& resourceName) [[deprecated]] final { return ""; }
Array<char> GetResource(const std::string& resourceName) override;
protected:
virtual std::string GetCurrentExecutablePath() const = 0;

View File

@@ -19,7 +19,7 @@ namespace OpenVulkano
[[nodiscard]] virtual Array<char> GetResource(const std::string& resourceName) = 0;
[[nodiscard]] virtual std::string GetResourcePath(const std::string& resourceName) { return ""; }
[[nodiscard]] virtual std::string GetResourcePath(const std::string& resourceName) [[deprecated]] { return ""; }
static ResourceLoader& GetInstance();

View File

@@ -14,7 +14,7 @@ namespace OpenVulkano
class SystemFontResolver
{
public:
static const std::string& GetSystemFontPath(const std::string& fontName);
static const std::string& GetSystemFontPath(const std::string& fontName) [[deprecated]];
private:
static std::map<std::string, std::string> ReadSystemFonts();

View File

@@ -13,7 +13,7 @@ namespace OpenVulkano
class ResourceLoaderAppDirWindows final : public ResourceLoader
{
public:
std::string GetResourcePath(const std::string& resourceName) override;
std::string GetResourcePath(const std::string& resourceName) [[deprecated]] override;
Array<char> GetResource(const std::string& resourceName) override;
};
}

View File

@@ -30,13 +30,13 @@ namespace OpenVulkano
void CheckSize(size_t size);
public:
MultiPartArchiveWriter(const std::string& dir, const std::string& fileNamePattern, const ArchiveConfiguration& archiveConfiguration, size_t sizeLimit = 2_GiB, bool lazyCreation = false, const std::shared_ptr<spdlog::logger>& logger = nullptr);
MultiPartArchiveWriter(const std::string& dir, const std::string& fileNamePattern, const ArchiveConfiguration& archiveConfiguration, size_t sizeLimit = 2_GiB, bool lazyCreation = false, const std::shared_ptr<spdlog::logger>& logger = nullptr) [[deprecated]];
~MultiPartArchiveWriter() override;
bool AddFile(const FileDescription& description, const void* buffer) override;
bool AddFile(const FileDescription& description, const std::vector<std::pair<const void*, size_t>>& buffers) override;
bool AddFile(const char* fileName, const char* inArchiveName) override;
bool AddFile(const char* fileName, const char* inArchiveName) [[deprecated]] override;
using IArchiveWriter::AddFile;
[[nodiscard]] virtual ArchiveOStream AddFileStream(const FileDescription& description) override;

View File

@@ -19,10 +19,10 @@ namespace OpenVulkano::Image
virtual ~IImageLoader() = default;
static std::unique_ptr<Image> loadData(const uint8_t* data, int size, int desiredChannels = 0);
virtual std::unique_ptr<Image> loadFromFile(const std::string& filePath) = 0;
virtual std::unique_ptr<Image> loadFromFile(const std::string& filePath) [[deprecated]] = 0;
virtual std::unique_ptr<Image> loadFromMemory(const std::vector<uint8_t>& buffer) = 0;
virtual Math::Vector2i GetImageDimensions(const std::string& filename) = 0;
virtual Math::Vector2i GetImageDimensions(const std::string& filename) [[deprecated]] = 0;
protected:
static Math::Vector2i GetDimensionsInternal(const std::string& filename);
static Math::Vector2i GetDimensionsInternal(const std::string& filename) [[deprecated]];
};
}

View File

@@ -18,9 +18,9 @@ namespace OpenVulkano::Image
class ImageLoaderDds : public IImageLoader
{
public:
std::unique_ptr<Image> loadFromFile(const std::string& filePath) override;
std::unique_ptr<Image> loadFromFile(const std::string& filePath) [[deprecated]] override;
std::unique_ptr<Image> loadFromMemory(const std::vector<uint8_t>& buffer) override;
Math::Vector2i GetImageDimensions(const std::string& filename) override;
Math::Vector2i GetImageDimensions(const std::string& filename) [[deprecated]] override;
protected:
std::unique_ptr<Image> ExtractImage(dds::Image* ddsImage);

View File

@@ -13,9 +13,9 @@ namespace OpenVulkano::Image
class ImageLoaderJpeg : public IImageLoader
{
public:
std::unique_ptr<Image> loadFromFile(const std::string& filePath) override;
std::unique_ptr<Image> loadFromFile(const std::string& filePath) [[deprecated]] override;
std::unique_ptr<Image> loadFromMemory(const std::vector<uint8_t>& buffer) override;
Math::Vector2i GetImageDimensions(const std::string& filename) override;
Math::Vector2i GetImageDimensions(const std::string& filename) [[deprecated]] override;
private:
std::unique_ptr<Image> loadJpeg(const uint8_t* data, size_t size);
};

View File

@@ -13,8 +13,8 @@ namespace OpenVulkano::Image
class ImageLoaderKtx : public IImageLoader
{
public:
std::unique_ptr<Image> loadFromFile(const std::string& filePath) override;
std::unique_ptr<Image> loadFromFile(const std::string& filePath) [[deprecated]] override;
std::unique_ptr<Image> loadFromMemory(const std::vector<uint8_t>& buffer) override;
Math::Vector2i GetImageDimensions(const std::string& filename) override;
Math::Vector2i GetImageDimensions(const std::string& filename) [[deprecated]] override;
};
}

View File

@@ -13,8 +13,8 @@ namespace OpenVulkano::Image
class ImageLoaderPfm : public IImageLoader
{
public:
std::unique_ptr<Image> loadFromFile(const std::string& filePath) override;
std::unique_ptr<Image> loadFromFile(const std::string& filePath) [[deprecated]] override;
std::unique_ptr<Image> loadFromMemory(const std::vector<uint8_t>& buffer) override;
Math::Vector2i GetImageDimensions(const std::string& filename) override;
Math::Vector2i GetImageDimensions(const std::string& filename) [[deprecated]] override;
};
}

View File

@@ -13,8 +13,8 @@ namespace OpenVulkano::Image
class ImageLoaderPng : public IImageLoader
{
public:
std::unique_ptr<Image> loadFromFile(const std::string& filePath) override;
std::unique_ptr<Image> loadFromFile(const std::string& filePath) [[deprecated]] override;
std::unique_ptr<Image> loadFromMemory(const std::vector<uint8_t>& buffer) override;
Math::Vector2i GetImageDimensions(const std::string& filename) override;
Math::Vector2i GetImageDimensions(const std::string& filename) [[deprecated]] override;
};
}

View File

@@ -12,8 +12,8 @@ namespace OpenVulkano::Image
class ImageLoaderPnm : public IImageLoader
{
public:
std::unique_ptr<Image> loadFromFile(const std::string& filePath) override;
std::unique_ptr<Image> loadFromFile(const std::string& filePath) [[deprecated]] override;
std::unique_ptr<Image> loadFromMemory(const std::vector<uint8_t>& buffer) override;
Math::Vector2i GetImageDimensions(const std::string& filename) override;
Math::Vector2i GetImageDimensions(const std::string& filename) [[deprecated]] override;
};
}

View File

@@ -14,11 +14,11 @@ namespace OpenVulkano::Scene
class MeshWriter
{
public:
static void WriteAsOBJ(Geometry* geometry, const std::string& filePath);
static void WriteAsUSD(Geometry* geometry, const std::string& filePath);
static void WriteObjAsZip(Geometry* geometry, const std::string& texturePath, const std::string& zipPath);
static void WriteAsUSDZ(Geometry* geometry, const std::string& texturePath, const std::string& usdzPath);
static void WriteAsFBX(Geometry* geometry, const std::string& texturePath, const std::string& fbxPath);
static void WriteAsSTL(Geometry* geometry, const std::string& filePath, bool binary);
static void WriteAsOBJ(Geometry* geometry, const std::string& filePath) [[deprecated]];
static void WriteAsUSD(Geometry* geometry, const std::string& filePath) [[deprecated]];
static void WriteObjAsZip(Geometry* geometry, const std::string& texturePath, const std::string& zipPath) [[deprecated]];
static void WriteAsUSDZ(Geometry* geometry, const std::string& texturePath, const std::string& usdzPath) [[deprecated]];
static void WriteAsFBX(Geometry* geometry, const std::string& texturePath, const std::string& fbxPath) [[deprecated]];
static void WriteAsSTL(Geometry* geometry, const std::string& filePath, bool binary) [[deprecated]];
};
}

View File

@@ -13,9 +13,9 @@ namespace OpenVulkano::Scene
class Geometry;
class MeshLoader
{
static void ParseAssimpFile(Geometry *geometry, const std::string& file);
static void ParseUSDFile(Geometry *geometry, const std::string& file);
static void ParseAssimpFile(Geometry *geometry, const std::string& file) [[deprecated]];
static void ParseUSDFile(Geometry *geometry, const std::string& file) [[deprecated]];
public:
static Geometry* LoadFromFile(const std::string& file);
static Geometry* LoadFromFile(const std::string& file) [[deprecated]];
};
}

View File

@@ -43,7 +43,7 @@ namespace OpenVulkano::Scene
{
}
void GenerateAtlas(const std::string& fontFile, const std::set<uint32_t>& charset,
const std::optional<std::string>& pngOutput = std::nullopt) override;
const std::optional<std::string>& pngOutput = std::nullopt) [[deprecated]] override;
void GenerateAtlas(const Array<char>& fontData, const std::set<uint32_t>& charset,
const std::optional<std::string>& pngOutput = std::nullopt) override;
private:

View File

@@ -45,6 +45,6 @@ namespace OpenVulkano::Scene
const std::set<uint32_t>& charset = {}) const;
private:
Array<char> FindFont(const std::string& fontFile) const;
Array<char> FindFont(const std::string& fontFile) const [[deprecated]];
};
}

View File

@@ -21,7 +21,7 @@ namespace OpenVulkano::Scene
public:
virtual ~IFontAtlasGenerator() = default;
virtual void GenerateAtlas(const std::string& fontFile, const std::set<uint32_t>& charset,
const std::optional<std::string>& pngOutput = std::nullopt) = 0;
const std::optional<std::string>& pngOutput = std::nullopt) [[deprecated]] = 0;
virtual void GenerateAtlas(const Array<char>& fontData, const std::set<uint32_t>& charset,
const std::optional<std::string>& pngOutput = std::nullopt) = 0;
virtual const std::shared_ptr<FontAtlas>& GetAtlas() const = 0;

View File

@@ -43,11 +43,11 @@ namespace OpenVulkano::Scene
static constexpr int channelsCount = (Channels == 1 ? 1 : 4);
SdfFontAtlasGeneratorGeneric();
void GenerateAtlas(const std::string& fontFile, const std::set<uint32_t>& charset,
const std::optional<std::string>& pngOutput = std::nullopt) override;
const std::optional<std::string>& pngOutput = std::nullopt) [[deprecated]] override;
void GenerateAtlas(const Array<char>& fontData, const std::set<uint32_t>& charset,
const std::optional<std::string>& pngOutput = std::nullopt) override;
void GenerateAtlas(const std::string& fontFile, const msdf_atlas::Charset& charset = msdf_atlas::Charset::ASCII,
const std::optional<std::string>& pngOutput = std::nullopt);
const std::optional<std::string>& pngOutput = std::nullopt) [[deprecated]];
void GenerateAtlas(const msdfgen::byte* fontData, int length,
const msdf_atlas::Charset& charset = msdf_atlas::Charset::ASCII,
const std::optional<std::string>& pngOutput = std::nullopt);

View File

@@ -15,7 +15,7 @@ namespace OpenVulkano
* @param shaderStage - type of the shader that needs to be compiled
*/
static Array<uint32_t> CompileGLSLToSpirv(const std::string& absPath, bool hasIncludes,
const std::string& incPath = std::string(), const std::string& entryPoint = "main")
const std::string& incPath = std::string(), const std::string& entryPoint = "main") [[deprecated]]
#if defined(HAS_SHADERC)
;
#else