verLeaf.hpp
Go to the documentation of this file.
1
2#pragma once
3
5
6namespace by {
7
12 class _nout verLeaf: public valLeaf {
13 BY_ME(verLeaf, valLeaf)
14 BY_INIT_META(verLeaf)
15
16 public:
17 verLeaf(int major, int minor, int fix);
18 explicit verLeaf(const std::string& verStr);
19 explicit verLeaf(const nchar* verStr);
20
21 public:
22 nbool operator>(const me& rhs) const;
23 nbool operator<(const me& rhs) const;
24 nbool operator==(const me& rhs) const;
25 nbool operator!=(const me& rhs) const;
26 nbool operator<=(const me& rhs) const;
27 nbool operator>=(const me& rhs) const;
28
29 public:
30 nint asMajor() const;
31 nint asMinor() const;
32 nint asFix() const;
33 const type& getType() const override;
34
35 private:
36 static nint _isFromBigger(nint from, nint to);
37 void _parseVerStr(const std::string& verStr);
38
39 private:
40 nint _maj;
41 nint _min;
42 nint _fix;
43 static constexpr nint VER_LEN = 3;
44 static constexpr const nchar* DELIMITER = ".";
45 };
46} // namespace by
Base class for runtime type information in byeol language.
Definition: type.hpp:12
Value leaf node for storing primitive values.
Definition: valLeaf.hpp:12
Version leaf node for semantic version handling.
Definition: verLeaf.hpp:12