Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
IDataVisitNode.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.Collections.Generic;
4 
5 namespace SiliconStudio.Assets.Visitors
6 {
7  /// <summary>
8  /// Interface providing a generic access to hierarchical data that contains members (property/fields)
9  /// and collection items (array item, list item, dictionary item).
10  /// </summary>
11  public interface IDataVisitNode<T> where T : IDataVisitNode<T>
12  {
13  /// <summary>
14  /// Gets or sets the parent of this node.
15  /// </summary>
16  /// <value>The parent.</value>
17  T Parent { get; set; }
18 
19  /// <summary>
20  /// Gets a value indicating whether this instance has <see cref="Members"/>.
21  /// </summary>
22  /// <value><c>true</c> if this instance has members; otherwise, <c>false</c>.</value>
23  bool HasMembers { get; }
24 
25  /// <summary>
26  /// Gets a value indicating whether this instance has <see cref="Items"/>.
27  /// </summary>
28  /// <value><c>true</c> if this instance has items; otherwise, <c>false</c>.</value>
29  bool HasItems { get; }
30 
31  /// <summary>
32  /// Gets the members. Can be null if no members.
33  /// </summary>
34  /// <value>The members.</value>
35  List<T> Members { get; set; }
36 
37  /// <summary>
38  /// Gets the items (array, list or dictionary items). Can be null if no items.
39  /// </summary>
40  /// <value>The items.</value>
41  List<T> Items { get; set; }
42  }
43 }