using System;
using RealmForge.SceneObjects;
namespace RealmForge.Definitions{
/// <summary>
/// Represents a reference to an ISceneObjectTemplate, which together represent an instance of a scene object in the scene graph.
/// </summary>
/// <remarks>
/// The xml files that defines the scene graph such as Realms.xml is comprissed of xml elements that are mapped to classes that implement this interface
/// It is deserialized into a graph of these template references. The SceneManager then uses them with the associated templates to instantiate scene object classes and construct
/// a scene with the same heirarchy as the xml file.
/// </remarks>
public interface ITemplateReference {
/// <summary>
/// The id of the template that the implementing class is referencing
/// </summary>
string Template { get; }
/// <summary>
/// The type of scene object and the name of the template group from which the template is found
/// Type names such as "Entity" may map to different class types or derived classes by plug-ins overriding
/// the template class and keying it to the xml tag name of the default for Serialization purposes
/// </summary>
string SceneObjectType { get; }
string ID { get; }
void ApplyReferenceConfiguration(ISceneObject sceneObj);
void UpdateTo(ISceneObject sceneObj);
}
}
|