-
Notifications
You must be signed in to change notification settings - Fork 19
/
Variable.cs
45 lines (43 loc) · 896 Bytes
/
Variable.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
using System;
namespace DXFLibrary
{
/// <summary>
/// Representation of a DXF header variable
/// </summary>
public class Variable : Element
{
/// <summary>
/// Constructor for a header variable
/// </summary>
/// <param name="nume">The name</param>
/// <param name="dataType">The datatype</param>
/// <param name="val">The value</param>
public Variable(string nume, int dataType, object val)
{
startTag = new Data(0,0);
endTag = new Data(0,0);
this.data.Add(new Data(9,nume));
this.data.Add(new Data(dataType,val));
}
/// <summary>
/// The header variable's name. Just get.
/// </summary>
public string VarName
{
get
{
return (string)((Data)this.data[0]).data;
}
}
/// <summary>
/// The header variable's value. Just get.
/// </summary>
public object Value
{
get
{
return ((Data)this.data[1]).data;
}
}
}
}