mirror of
https://github.com/thorvg/thorvg.git
synced 2025-07-24 23:28:57 +00:00
common saver: change to instance based for future sync/async behavior.
reserve sync() method TODO
This commit is contained in:
parent
b13dec31cd
commit
60e3129ce2
3 changed files with 17 additions and 2 deletions
|
@ -1402,9 +1402,11 @@ public:
|
|||
* @retval Result::MemoryCorruption When casting in the internal function implementation failed.
|
||||
* @retval Result::Unknown Others.
|
||||
*
|
||||
* @BETA_API
|
||||
*/
|
||||
static Result save(std::unique_ptr<Paint> paint, const std::string& path) noexcept;
|
||||
Result save(std::unique_ptr<Paint> paint, const std::string& path) noexcept;
|
||||
Result sync() noexcept;
|
||||
|
||||
static std::unique_ptr<Saver> gen() noexcept;
|
||||
|
||||
_TVG_DECLARE_PRIVATE(Saver);
|
||||
};
|
||||
|
|
Binary file not shown.
|
@ -59,3 +59,16 @@ Result Saver::save(std::unique_ptr<Paint> paint, const std::string& path) noexce
|
|||
delete p;
|
||||
return Result::Unknown;
|
||||
}
|
||||
|
||||
|
||||
Result Saver::sync() noexcept
|
||||
{
|
||||
//TODO:
|
||||
return Result::Success;
|
||||
}
|
||||
|
||||
|
||||
unique_ptr<Saver> Saver::gen() noexcept
|
||||
{
|
||||
return unique_ptr<Saver>(new Saver);
|
||||
}
|
Loading…
Add table
Reference in a new issue