Program Listing for File toml.h#
↰ Return to documentation for file (interfaces\toml.h)
#ifndef __IDL_GENERATED__TOML_H__20260115_165121_290__
#define __IDL_GENERATED__TOML_H__20260115_165121_290__
#ifdef _MSC_VER
// Prevent bogus warnings about uninitialized members during static code analysis.
#pragma warning(push)
#pragma warning(disable : 26495)
#endif
// Provide fixed width integer types.
#include <cstdint>
#include "core.h"
namespace sdv
{
namespace toml
{
except XTOMLParseException : XSysExcept
{
// _id might also be member of the base class. Suppress in static code analysis.
// cppcheck-suppress duplInheritedMember
inline static const ::sdv::exception_id _id = 0x2D7A36F0F156B309;
// _description might also be member of the base class. Suppress in static code analysis.
// cppcheck-suppress duplInheritedMember
inline static const char _description[] = "TOML parse exception.";
sdv::u8string ssMessage;
virtual const char* what() const noexcept override { return _description; }
virtual ::sdv::exception_id id() const noexcept override { return _id; }
};
enum class ENodeType : uint32_t
{
node_table,
node_array,
node_integer,
node_floating_point,
node_boolean,
node_string,
node_invalid,
};
static const uint32_t npos = 0xFFFFFFFF;
interface INodeInfo
{
static constexpr ::sdv::interface_id _id = 0x74CE8D0D93E7F270;
virtual sdv::u8string GetName() const = 0;
virtual sdv::u8string GetPath(/*in*/ bool bResolveArrays) const = 0;
virtual ENodeType GetType() const = 0;
virtual sdv::any_t GetValue() const = 0;
virtual uint32_t GetIndex() const = 0;
virtual IInterfaceAccess* GetParent() const = 0;
virtual sdv::u8string GetTOML() const = 0;
enum class ECommentFlags : int32_t
{
comment_before = 0,
comment_behind = 1,
out_of_scope_comment_before = 2,
out_of_scope_comment_behind = 3,
comment_index_mask = 15,
raw_comment = 8,
replace_whitespace = 16,
};
virtual void SetComment(/*in*/ const sdv::u8string& ssComment, /*in*/ uint32_t uiFlags) = 0;
virtual sdv::u8string GetComment(/*in*/ uint32_t uiFlags) = 0;
virtual void AutomaticFormat() = 0;
};
interface INodeCollection
{
static constexpr ::sdv::interface_id _id = 0xBC836E7F94697937;
virtual uint32_t GetCount() const = 0;
virtual IInterfaceAccess* GetNode(/*in*/ uint32_t uiIndex) const = 0;
virtual IInterfaceAccess* GetNodeDirect(/*in*/ const sdv::u8string& ssPath) const = 0;
};
interface INodeCollectionInsert
{
static constexpr ::sdv::interface_id _id = 0xE0E4E7111E37C4D9;
virtual IInterfaceAccess* InsertValue(/*in*/ uint32_t uiIndex, /*in*/ const sdv::u8string& ssName, /*in*/ sdv::any_t anyValue) = 0;
virtual IInterfaceAccess* InsertArray(/*in*/ uint32_t uiIndex, /*in*/ const sdv::u8string& ssName) = 0;
virtual IInterfaceAccess* InsertTable(/*in*/ uint32_t uiIndex, /*in*/ const sdv::u8string& ssKeyName) = 0;
virtual IInterfaceAccess* InsertTableArray(/*in*/ uint32_t uiIndex, /*in*/ const sdv::u8string& ssName) = 0;
enum class EInsertResult : uint32_t
{
invalid_TOML,
insert_partly_success,
insert_success,
};
virtual EInsertResult InsertTOML(/*in*/ const sdv::u8string& ssTOML, /*in*/ bool bRollbackOnPartly) = 0;
};
interface INodeDelete
{
static constexpr ::sdv::interface_id _id = 0x1F4940AD4D24EFB3;
virtual bool DeleteNode() = 0;
};
interface INodeUpdate
{
static constexpr ::sdv::interface_id _id = 0x7BCFDBEAC34E2A6D;
virtual bool ChangeName(/*in*/ const sdv::u8string& ssNewName) = 0;
virtual bool ChangeValue(/*in*/ sdv::any_t anyNewValue) = 0;
virtual bool MoveUp() = 0;
virtual bool MoveDown() = 0;
};
interface ITOMLParser
{
static constexpr ::sdv::interface_id _id = 0xD504E441EE68E0A4;
virtual bool Process(/*in*/ const sdv::u8string& ssContent) = 0;
};
}
}
#ifdef _MSC_VER
#pragma warning(pop)
#endif
#endif // !defined(__IDL_GENERATED__TOML_H__20260115_165121_293__)