Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
INodeBuilder.cs
Go to the documentation of this file.
1 // Copyright (c) 2014 Silicon Studio Corp. (http://siliconstudio.co.jp)
2 // This file is distributed under GPL v3. See LICENSE.md for details.
3 using System;
4 using System.Collections.Generic;
5 
7 using SiliconStudio.Quantum.Contents;
8 
9 namespace SiliconStudio.Quantum
10 {
11  /// <summary>
12  /// This interface provides objects and methods to build a nodal view model from a given object.
13  /// </summary>
14  public interface INodeBuilder
15  {
16  /// <summary>
17  /// Gets the collection of structure types that represents custom primitive types. Primitive structures won't have node created for each of their members.
18  /// </summary>
19  /// <remarks>Default .NET primitive types, string and enum are always considered to be primitive type.</remarks>
20  ICollection<Type> PrimitiveTypes { get; }
21 
22  /// <summary>
23  /// Gets the collection of available commands to attach to nodes.
24  /// </summary>
25  ICollection<INodeCommand> AvailableCommands { get; }
26 
27  /// <summary>
28  /// Gets the enumerable of content that have references created during the last execution of the builder visitor.
29  /// </summary>
30  IEnumerable<IContent> ReferenceContents { get; }
31 
32  /// <summary>
33  /// Raised when a node is about to be constructed. The construction can be cancelled by setting <see cref="NodeConstructingArgs.Discard"/> to <c>true</c>.
34  /// </summary>
35  event EventHandler<NodeConstructingArgs> NodeConstructing;
36 
37  /// <summary>
38  /// Raised when a node has been constructed. Allows to attach associated data to the node via the <see cref="NodeConstructedArgs.AssociatedData"/> dictionary.
39  /// </summary>
40  event EventHandler<NodeConstructedArgs> NodeConstructed;
41 
42  /// <summary>
43  /// Build the node hierarchy corresponding to the given object and fill the <see cref="ReferenceContents"/> list with references created during this process.
44  /// </summary>
45  /// <param name="obj">The object. Can be <c>null</c>.</param>
46  /// <param name="type">The type of the object</param>
47  /// <param name="rootGuid">The <see cref="Guid"/> To assign to the root node.</param>
48  /// <returns>The root node of the node hierarchy corresponding to the given object.</returns>
49  IModelNode Build(object obj, Type type, Guid rootGuid);
50  }
51 }
This interface provides objects and methods to build a nodal view model from a given object...
Definition: INodeBuilder.cs:14
EventHandler< NodeConstructingArgs > NodeConstructing
Raised when a node is about to be constructed. The construction can be cancelled by setting NodeConst...
Definition: INodeBuilder.cs:35
The IModelNode interface represents a node in a model object. A model object is represented by a grap...
Definition: IModelNode.cs:16
EventHandler< NodeConstructedArgs > NodeConstructed
Raised when a node has been constructed. Allows to attach associated data to the node via the NodeCon...
Definition: INodeBuilder.cs:40