/[gr2lib]/trunk/gr2lib/core/coreclasses/apiversion/granny2apiversion.cs
ViewVC logotype

Diff of /trunk/gr2lib/core/coreclasses/apiversion/granny2apiversion.cs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 109 by william, Sun Jul 18 01:58:10 2010 UTC revision 133 by william, Sun Jul 18 06:14:54 2010 UTC
# Line 5  using System.Text; Line 5  using System.Text;
5  using gr2lib.core.typedefs;  using gr2lib.core.typedefs;
6  using gr2lib.core.exceptions;  using gr2lib.core.exceptions;
7  using gr2lib.core.interfaces;  using gr2lib.core.interfaces;
8    using System.ComponentModel;
9    
10  namespace gr2lib.core.apiversion  namespace gr2lib.core.apiversion
11  {  {
12      #region public class VersionType      #region public class VersionType
13      public interface Iversiontype      public interface Iversiontype
14      {      {
15          granny_int32x major { get; }          int major { get; set; }
16          granny_int32x minor { get; }          int minor { get; set; }
17          granny_int32x customization { get; }          int customization { get; set; }
18          granny_int32x build { get; }          int build { get; set; }
19          string version { get; }          //string version { get; }
20      }      }
21    
22      public class versiontype : Iversiontype      public class versiontype : Iversiontype
# Line 33  namespace gr2lib.core.apiversion Line 34  namespace gr2lib.core.apiversion
34          /// <summary>          /// <summary>
35          /// versiontype construction: major.minor.customization.build          /// versiontype construction: major.minor.customization.build
36          /// </summary>          /// </summary>
37          public versiontype(granny_int32x major, granny_int32x minor, granny_int32x customization, granny_int32x build)          public versiontype(int major, int minor, int customization, int build)
38          {          {
39              this.major = major;              this.major = major;
40              this.minor = minor;              this.minor = minor;
# Line 47  namespace gr2lib.core.apiversion Line 48  namespace gr2lib.core.apiversion
48          {          {
49              string[] _version = version.Split('.');              string[] _version = version.Split('.');
50                            
51              this.major = _version[0];              this.major = Convert.ToInt32(_version[0]);
52              this.minor = _version[1];              this.minor = Convert.ToInt32(_version[1]);
53              this.customization = _version[2];              this.customization = Convert.ToInt32(_version[2]);
54              this.build = _version[3];              this.build = Convert.ToInt32(_version[3]);
55          }          }
56          /// <summary>          /// <summary>
57          /// Gets this version in format: major.minor.customization.build          /// Gets this version in format: major.minor.customization.build
# Line 65  namespace gr2lib.core.apiversion Line 66  namespace gr2lib.core.apiversion
66          /// <summary>          /// <summary>
67          /// Returns a string representation of the Granny2 API Version in format (major.minor.customization.build)          /// Returns a string representation of the Granny2 API Version in format (major.minor.customization.build)
68          /// </summary>          /// </summary>
69          public string version { get { return string.Format("{0}.{1}.{2}.{3}", major, minor, customization, build); } }          private string version { get { return string.Format("{0}.{1}.{2}.{3}", major, minor, customization, build); } }
70          private granny_int32x _major;          private int _major;
71            [RefreshPropertiesAttribute(RefreshProperties.All)]  
72          /// <summary>          /// <summary>
73          /// Returns the Major of the Granny2 API Version (X.0.0.0)          /// Returns the Major of the Granny2 API Version (X.0.0.0)
74          /// </summary>          /// </summary>
75          public granny_int32x major { get { return _major; } private set { _major = value; } }          public int major { get { return _major; } set { _major = value; } }
76    
77          private granny_int32x _minor;          private int _minor;
78            [RefreshPropertiesAttribute(RefreshProperties.All)]  
79          /// <summary>          /// <summary>
80          /// Returns the Minor of the Granny2 API Version (0.X.0.0)          /// Returns the Minor of the Granny2 API Version (0.X.0.0)
81          /// </summary>          /// </summary>
82          public granny_int32x minor { get { return _minor; } private set { _minor = value; } }          public int minor { get { return _minor; } set { _minor = value; } }
83    
84          private granny_int32x _customization;          private int _customization;
85            [RefreshPropertiesAttribute(RefreshProperties.All)]  
86          /// <summary>          /// <summary>
87          /// Returns the Customization of the Granny2 API Version - Customization (0.0.X.0)          /// Returns the Customization of the Granny2 API Version - Customization (0.0.X.0)
88          /// </summary>          /// </summary>
89          public granny_int32x customization { get { return _customization; } private set { _customization = value; } }          public int customization { get { return _customization; } set { _customization = value; } }
90    
91          private granny_int32x _build;          private int _build;
92            [RefreshPropertiesAttribute(RefreshProperties.All)]  
93          /// <summary>          /// <summary>
94          /// Returns the Build of the Granny2 API Version (0.0.0.X)          /// Returns the Build of the Granny2 API Version (0.0.0.X)
95          /// </summary>          /// </summary>
96          public granny_int32x build { get { return _build; } private set { _build = value; } }          public int build { get { return _build; } set { _build = value; } }
97          #endregion          #endregion
98      }      }
99      #endregion      #endregion

Legend:
Removed from v.109  
changed lines
  Added in v.133

  ViewVC Help
Powered by ViewVC 1.1.22