using System;
namespace Substrate.Nbt
{
///
/// Defines methods for loading or extracting an NBT tree.
///
/// Object type that supports this interface.
public interface INbtObject
{
///
/// Attempt to load an NBT tree into the object without validation.
///
/// The root node of an NBT tree.
/// The object returns itself on success, or null if the tree was unparsable.
T LoadTree (TagNode tree);
///
/// Attempt to load an NBT tree into the object with validation.
///
/// The root node of an NBT tree.
/// The object returns itself on success, or null if the tree failed validation.
T LoadTreeSafe (TagNode tree);
///
/// Builds an NBT tree from the object's data.
///
/// The root node of an NBT tree representing the object's data.
TagNode BuildTree ();
///
/// Validate an NBT tree, usually against an object-supplied schema.
///
/// The root node of an NBT tree.
/// Status indicating whether the tree was valid for this object.
bool ValidateTree (TagNode tree);
}
}