18 #ifndef DOXYGEN_SHOULD_SKIP_THIS
58 MemoryAllocationFailed,
66 virtual const char* getDefaultPath() const noexcept = 0;
72 virtual
void setDefaultPath(const
char* path) noexcept = 0;
80 virtual
Result<Error> load(const
char* path) noexcept = 0;
89 virtual
Result<Error> loadFromString(const
char* content) noexcept = 0;
96 virtual
bool save(const
char* path) const noexcept = 0;
102 virtual
void clear() noexcept = 0;
108 virtual
bool isEmpty() const noexcept = 0;
136 std::uint64_t m_value;
187 Value(
int x) noexcept;
193 Value(std::uint64_t x) noexcept;
200 Value(
int x,
int y) noexcept;
208 Value(
int x,
int y,
int z) noexcept;
217 Value(
int x,
int y,
int z,
int w) noexcept;
223 Value(
float x) noexcept;
230 Value(
float x,
float y) noexcept;
237 Value(
float x,
float y,
float z) noexcept;
246 Value(
float x,
float y,
float z,
float w) noexcept;
253 Value(const
char*
string) noexcept;
259 Value(const
Rect& rect) noexcept;
265 Value(const
Size& size) noexcept;
271 Value(const
Point2f& point) noexcept;
277 Value(
bool x) noexcept;
283 operator
bool() const noexcept;
290 bool is(Type type) const noexcept;
297 bool setString(const
char*
string) noexcept;
305 bool getString(
char*
string) const noexcept;
312 void setRect(const
Rect& rect) noexcept;
321 bool getRect(
Rect* rect) const noexcept;
328 void setSize(const
Size& size) noexcept;
337 bool getSize(
Size* size) const noexcept;
344 void setPoint2i(const
Point2i& point) noexcept;
353 bool getPoint2i(
Point2i* point) const noexcept;
360 void setPoint2f(const
Point2f& point) noexcept;
369 bool getPoint2f(
Point2f* point) const noexcept;
375 void setBool(
bool x) noexcept;
384 bool getBool(
bool* x) const noexcept;
391 void setInt(
int x) noexcept;
399 bool getInt(
int* x) const noexcept;
405 void setULong(std::uint64_t x) noexcept;
413 bool getULong(std::uint64_t* x) const noexcept;
421 void setInt(
int x,
int y) noexcept;
431 bool getInt(
int* x,
int* y) const noexcept;
440 void setInt(
int x,
int y,
int z) noexcept;
451 bool getInt(
int* x,
int* y,
int* z) const noexcept;
461 void setInt(
int x,
int y,
int z,
int w) noexcept;
473 bool getInt(
int* x,
int* y,
int* z,
int* w) const noexcept;
480 void setFloat(
float x) noexcept;
488 bool getFloat(
float* x) const noexcept;
496 void setFloat(
float x,
float y) noexcept;
506 bool getFloat(
float* x,
float* y) const noexcept;
515 void setFloat(
float x,
float y,
float z) noexcept;
526 bool getFloat(
float* x,
float* y,
float* z) const noexcept;
536 void setFloat(
float x,
float y,
float z,
float w) noexcept;
548 bool getFloat(
float* x,
float* y,
float* z,
float* w) const noexcept;
557 float asFloat(
float defaultValue = 0.f) const noexcept;
577 bool asBool(
bool defaultValue = false) const noexcept;
586 int asInt(
int defaultValue = 0) const noexcept;
594 std::uint64_t asULong(std::uint64_t defaultValue = 0) const noexcept;
604 Size asSize(const
Size& defaultValue =
Size()) const noexcept;
624 Rect asRect(const
Rect& defaultValue =
Rect()) const noexcept;
634 const
char* asString(const
char* defaultValue = "") const noexcept;
636 inline Value(const Value& other) = delete;
637 Value(Value&& other);
639 inline Value& operator=(const Value& other) = delete;
640 Value& operator=(Value&& other);
642 void swap(Value& first, Value& second);
658 Key(
const char* section,
const char* parameter) noexcept;
664 const char* getSection()
const noexcept;
670 const char* getParameter()
const noexcept;
676 void setSection(
const char* section) noexcept;
682 void setParameter(
const char* parameter) noexcept;
692 static const unsigned int m_bufferLength = 128;
693 char m_section[m_bufferLength];
694 char m_parameter[m_bufferLength];
707 Desc(
const char* desc) noexcept;
713 const char* getDesc()
const noexcept;
719 void setDesc(
const char* desc) noexcept;
722 static const unsigned int m_bufferLength = 256;
723 char m_desc[m_bufferLength];
733 Entry() noexcept = default;
745 Entry(const
Desc& desc, Value&& value) noexcept;
751 void setDesc(const
Desc& desc) noexcept;
757 void setValue(Value&& value) noexcept;
763 const
Desc& getDesc() const noexcept;
769 const Value& getValue() const noexcept;
779 virtual
void setDesc(const
Key& key, const
Desc& desc) noexcept = 0;
789 void setDesc(const
char* section, const
char* parameter, const
Desc& desc) noexcept;
798 virtual
void setValue(const
Key& key, Value&& value) noexcept = 0;
808 void setValue(const
char* section, const
char* parameter, Value&& value) noexcept;
817 virtual
void setEntry(const
Key& key,
Entry&& entry) noexcept = 0;
827 void setEntry(const
Key& key, const
Desc& desc, Value&& value) noexcept;
838 void setEntry(const
char* section, const
char* parameter, const
Desc& desc, Value&& value) noexcept;
847 virtual const
Entry& getEntry(const
Key& key) const noexcept = 0;
856 Desc getDesc(const
Key& key) const noexcept;
866 Desc getDesc(const
char* section, const
char* parameter) const noexcept;
875 const Value& getValue(const
Key& key) const noexcept;
885 const Value& getValue(const
char* section, const
char* parameter) const noexcept;
920 return "Could not allocate memory";
922 return "Error reading from file";
924 return "Internal error";
926 return "Error during document declaration/processing instruction parsing";
928 return "Parser could not determine tag type";
930 return "Error during CDATA section parsing";
932 return "File was not found";
934 return "Error during PCDATA section parsing";
936 return "Error during comment parsing";
938 return "Error during document type declaration parsing";
940 return "Settings sections is invalid or absent";
942 return "Error during element attribute parsing";
944 return "Error during end element tag parsing";
946 return "Root type is not node_element or node_document";
948 return "Document without element nodes";
950 return "Mismatch of start-end tags";
952 return "Error during start element tag parsing";
954 return "Unknown error";
Could not allocate memory.
2D floating point.
Definition: ISettingsProvider.h:171
floating point.
Definition: ISettingsProvider.h:170
Error
Config parsing error codes.
Definition: ISettingsProvider.h:37
3D floating point.
Definition: ISettingsProvider.h:172
#define FSDK_API
Dummy.
Definition: Def.h:27
#define DECLARE_SMARTPTR(X)
Smart ptr declaration helper macro.
Definition: Def.h:56
(exclusive to xml_node::append_buffer)
A structure that encapsulates an action result enumeration.
Definition: Result.h:27
Common data types and structures.
Configuration parameter key.
Definition: ISettingsProvider.h:648
Definition: ISettingsProvider.h:123
Object system types and interfaces.
Definition: ISettingsProvider.h:131
FSDK_API ResultValue< FSDKError, ISettingsProviderPtr > createSettingsProviderFromString(const char *content) noexcept
Creates a settings provider from the xml-formatted string.
Parser could not determine tag type.
4D floating point.
Definition: ISettingsProvider.h:173
Type
Value type.
Definition: ISettingsProvider.h:163
Desc m_desc
Parameter description.
Definition: ISettingsProvider.h:730
Base strong reference counted object interface.
Definition: IRefCounted.h:37
Definition: ISettingsProvider.h:151
Value data.
Definition: ISettingsProvider.h:118
Definition: ISettingsProvider.h:143
tag was not closed or there was an excessive closing tag)
Parsing error occurred while parsing document declaration/processing instruction. ...
std::uint64_t.
Definition: ISettingsProvider.h:169
Parsing error occurred while parsing document type declaration.
Parsing error occurred while parsing comment.
Definition: ISettingsProvider.h:119
Configuration parameter description.
Definition: ISettingsProvider.h:698
Definition: ISettingsProvider.h:127
bool operator<(Version lhs, Version rhs) noexcept
Check if one version is less than another.
Definition: Version.h:36
Integer.
Definition: ISettingsProvider.h:165
File was not found during load_file()
Addon for Result to output some value aside the result. Specialization for copiable types...
Definition: ResultValue.h:21
Definition: ISettingsProvider.h:147
Definition: ISettingsProvider.h:139
4D integer.
Definition: ISettingsProvider.h:168
Definition: ISettingsProvider.h:135
Parsing resulted in a document without element nodes.
Parsing error occurred while parsing end element tag.
Settings section is invalid or absent.
2D integer.
Definition: ISettingsProvider.h:166
Parsing error occurred while parsing PCDATA section.
const char * toString(Image::MemoryResidence residence)
Returns a string representation of a MemoryResidence type.
Configuration parameter entry.
Definition: ISettingsProvider.h:727
FSDKError
Common SDK error codes.
Definition: FSDKError.h:17
Configuration parameter value.
Definition: ISettingsProvider.h:113
Parsing error occurred while parsing start element tag.
Error reading from file/stream.
FSDK_API ResultValue< FSDKError, ISettingsProviderPtr > createSettingsProvider(const char *path) noexcept
Create a settings provider.
3D integer.
Definition: ISettingsProvider.h:167
Value m_value
Parameter value.
Definition: ISettingsProvider.h:729
Unkown value type.
Definition: ISettingsProvider.h:164
Definition: ISettingsProvider.h:155
Parsing error occurred while parsing element attribute.
Parsing error occurred while parsing CDATA section.
SDK settings provider interface.
Definition: ISettingsProvider.h:32