Graph, Node and Relation initial data objects
[LivingGraph.git] / LivingGraphBase / Relation.cs
blobd2ab598df97140ed8b807c6eff86b3b4268726dc
1 using System;
2 using System.Collections.Generic;
3 using System.Linq;
4 using System.Text;
6 namespace LivingGraphBase
8 public class Relation
10 private Node m_Source;
11 private Node m_Target;
13 /// <summary>
14 /// default constructor
15 /// </summary>
16 public Relation()
18 m_Source = new Node();
19 m_Target = new Node();
22 public Relation(Node source, Node target)
24 if (source == null || target == null)
26 throw new ArgumentException("source or target node is null");
28 m_Source = source;
29 m_Target = target;
32 /// <summary>
33 /// Get or set the source node
34 /// </summary>
35 public Node Source
37 get { return m_Source; }
38 set { m_Source = value; }
40 /// <summary>
41 /// Get or set the target node
42 /// </summary>
43 public Node Target
45 get { return m_Target; }
46 set { m_Target = value; }