Program Listing for File toml.idl#
↰ Return to documentation for file (interfaces\toml.idl)
#include "core.idl"
module sdv
{
module toml
{
exception XTOMLParseException : XSysExcept
{
const char _description[] = "TOML parse exception.";
u8string ssMessage;
};
enum ENodeType : uint32
{
node_table,
node_array,
node_integer,
node_floating_point,
node_boolean,
node_string,
node_invalid
};
const uint32 npos = 0xFFFFFFFF;
interface INodeInfo
{
u8string GetName() const;
u8string GetPath(in boolean bResolveArrays) const;
ENodeType GetType() const;
any GetValue() const;
uint32 GetIndex() const;
IInterfaceAccess GetParent() const;
u8string GetTOML() const;
enum ECommentFlags
{
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,
};
void SetComment(in u8string ssComment, in uint32 uiFlags);
u8string GetComment(in uint32 uiFlags);
void AutomaticFormat();
};
interface INodeCollection
{
uint32 GetCount() const;
IInterfaceAccess GetNode(in uint32 uiIndex) const;
IInterfaceAccess GetNodeDirect(in u8string ssPath) const;
};
interface INodeCollectionInsert
{
IInterfaceAccess InsertValue(in uint32 uiIndex, in u8string ssName, in any anyValue);
IInterfaceAccess InsertArray(in uint32 uiIndex, in u8string ssName);
IInterfaceAccess InsertTable(in uint32 uiIndex, in u8string ssKeyName);
IInterfaceAccess InsertTableArray(in uint32 uiIndex, in u8string ssName);
enum EInsertResult : uint32
{
invalid_TOML,
insert_partly_success,
insert_success,
};
EInsertResult InsertTOML(in u8string ssTOML, in boolean bRollbackOnPartly);
};
interface INodeDelete
{
boolean DeleteNode();
};
interface INodeUpdate
{
boolean ChangeName(in u8string ssNewName);
boolean ChangeValue(in any anyNewValue);
boolean MoveUp();
boolean MoveDown();
};
interface ITOMLParser
{
boolean Process(in u8string ssContent) raises(XTOMLParseException);
};
};
};