~vbursian/research-assistant/intervers

« back to all changes in this revision

Viewing changes to RANet/Version.h

  • Committer: Viktor Bursian
  • Date: 2013-06-06 15:10:08 UTC
  • Revision ID: vbursian@gmail.com-20130606151008-6641eh62f0lgx8jt
Tags: version_0.3.0
versionĀ 0.3.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
 
25
25
class RANet_EXPORT  sVersion
26
26
{
 
27
  public://static
 
28
    static sVersion           FromString (sString  text);
 
29
 
27
30
  public:
28
31
                              sVersion (int      major
29
32
                                       ,int      minor
30
 
                                       ,sString  patch
31
 
                                       ,sString  build_date)
32
 
                                  :Major(major),Minor(minor)
33
 
                                  ,Patch(patch),BuildDate(build_date)
34
 
                                {};
35
 
                              sVersion (int      major
36
 
                                       ,int      minor)
37
 
                                  :Major(major),Minor(minor)
38
 
                                {};
39
 
                              sVersion (sString  text);
40
 
    sString                   PrincipalText () const;
 
33
                                       ,sString  patch_str
 
34
                                       ,sString  build_date);
 
35
                              sVersion (int      major
 
36
                                       ,int      minor
 
37
                                       ,sString  patch_str);
 
38
                              sVersion (int      major
 
39
                                       ,int      minor);
 
40
                              sVersion (int      major
 
41
                                       ,int      minor
 
42
                                       ,int      patch);
 
43
                              sVersion (rcsVersion  V);
 
44
    sVersion                  Principal () const
 
45
                                { return sVersion(Major,Minor); };
 
46
    sVersion                  Valuable () const
 
47
                                { return sVersion(Major,Minor,PatchStr); };
41
48
    sString                   Text () const;
 
49
    bool                      IsValid () const;
 
50
    bool                      IsValidAndNumeric () const;
 
51
 
 
52
  public://operators
42
53
    bool                      operator == (rcsVersion) const;
43
54
                                //!< compares only Major.Minor part
44
55
    bool                      operator < (rcsVersion) const;
45
56
                                //!< compares only Major.Minor part
46
57
 
47
 
  public: //constant fields
 
58
  public://constant fields
48
59
    const int                 Major;
49
60
    const int                 Minor;
50
 
    const sString             Patch;
 
61
    const int                 Patch;
 
62
    const sString             PatchStr;
51
63
    const sString             BuildDate;
 
64
 
 
65
  private://static
 
66
    static int                PatchFromStr (sString  patch_str);
 
67
    static sString            PatchStrFromInt (int  patch);
 
68
 
 
69
  private://operators
 
70
    rsVersion                 operator = (rcsVersion)
 
71
                                { return *this; };
52
72
};
53
73
 
54
74
//------------------------------------------------------------------------------