~ubuntu-branches/ubuntu/raring/openmcdf/raring

« back to all changes in this revision

Viewing changes to src/OLECompoundFileStorage/BinaryTree/BinaryTree.cs

  • Committer: Package Import Robot
  • Author(s): Mathieu Malaterre
  • Date: 2012-05-04 10:00:39 UTC
  • Revision ID: package-import@ubuntu.com-20120504100039-6opexlhz3d4cdj3y
Tags: upstream-1.5.2
Import upstream version 1.5.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#region Using directives
 
2
 
 
3
using System;
 
4
using System.Collections.Generic;
 
5
using System.Text;
 
6
 
 
7
#endregion
 
8
 
 
9
namespace BinaryTrees
 
10
{
 
11
    /// <summary>
 
12
    /// Represents a binary tree.  This class provides access to the Root of the tree.  The developer
 
13
    /// must manually create the binary tree by adding descendents to the root.
 
14
    /// </summary>
 
15
    /// <typeparam name="T">The type of data stored in the binary tree's nodes.</typeparam>
 
16
    public class BinaryTree<T>
 
17
    {
 
18
        #region Private Member Variables
 
19
        private BinaryTreeNode<T> root = null;
 
20
        #endregion
 
21
 
 
22
        #region Public Methods
 
23
        /// <summary>
 
24
        /// Clears out the contents of the binary tree.
 
25
        /// </summary>
 
26
        public void Clear()
 
27
        {
 
28
            root = null;
 
29
        }
 
30
        #endregion
 
31
 
 
32
        #region Public Properties
 
33
        public BinaryTreeNode<T> Root
 
34
        {
 
35
            get
 
36
            {
 
37
                return root;
 
38
            }
 
39
            set
 
40
            {
 
41
                root = value;
 
42
            }
 
43
        }
 
44
        #endregion
 
45
    }
 
46
}