__close of Lua 5.4 is supported
[liba.git] / lua / src / version.h
blob2c4bedf0aeaaa647bb5c3947ab36c89f10a8d791
1 /***
2 algorithm library version
3 @classmod a.version
4 */
6 #ifndef LUA_LIBA_VERSION_H
7 #define LUA_LIBA_VERSION_H
9 #include "a.h"
11 /***
12 algorithm library version
13 @field major version major number
14 @field minor version minor number
15 @field patch version patch number
16 @field extra version extra number
17 @table a.version
19 #if defined(__cplusplus)
20 extern "C" {
21 #endif /* __cplusplus */
23 /***
24 constructor for algorithm library version
25 @tparam[opt] integer major version major number
26 @tparam[opt] integer minor version minor number
27 @tparam[opt] integer patch version patch number
28 @tparam[opt] integer extra version extra number
29 @treturn a.version algorithm library version userdata
30 @function new
32 int liba_version_new(lua_State *L);
34 /***
35 initialize for algorithm library version
36 @tparam[opt] integer major version major number
37 @tparam[opt] integer minor version minor number
38 @tparam[opt] integer patch version patch number
39 @tparam[opt] integer extra version extra number
40 @treturn a.version algorithm library version userdata
41 @function init
43 int liba_version_init(lua_State *L);
45 /***
46 algorithm library version parse
47 @tparam string version string to be parsed
48 @treturn a.version algorithm library version userdata
49 @function parse
51 int liba_version_parse(lua_State *L);
53 /***
54 compare the version lhs with the version rhs
55 @tparam a.version lhs version userdata on the left
56 @tparam a.version rhs version userdata on the right
57 @treturn integer <0 version lhs < version rhs
58 @treturn integer >0 version lhs > version rhs
59 @treturn integer 0 version lhs == version rhs
60 @function cmp
62 int liba_version_cmp(lua_State *L);
64 /***
65 version lhs is less than version rhs
66 @tparam a.version lhs version userdata on the left
67 @tparam a.version rhs version userdata on the right
68 @treturn integer result of comparison
69 @function lt
71 int liba_version_lt(lua_State *L);
73 /***
74 version lhs is greater than version rhs
75 @tparam a.version lhs version userdata on the left
76 @tparam a.version rhs version userdata on the right
77 @treturn integer result of comparison
78 @function gt
80 int liba_version_gt(lua_State *L);
82 /***
83 version lhs is less than or equal to version rhs
84 @tparam a.version lhs version userdata on the left
85 @tparam a.version rhs version userdata on the right
86 @treturn integer result of comparison
87 @function le
89 int liba_version_le(lua_State *L);
91 /***
92 version lhs is greater than or equal to version rhs
93 @tparam a.version lhs version userdata on the left
94 @tparam a.version rhs version userdata on the right
95 @treturn integer result of comparison
96 @function ge
98 int liba_version_ge(lua_State *L);
100 /***
101 version lhs is equal to version rhs
102 @tparam a.version lhs version userdata on the left
103 @tparam a.version rhs version userdata on the right
104 @treturn integer result of comparison
105 @function eq
107 int liba_version_eq(lua_State *L);
109 /***
110 version lhs is not equal to version rhs
111 @tparam a.version lhs version userdata on the left
112 @tparam a.version rhs version userdata on the right
113 @treturn integer result of comparison
114 @function ne
116 int liba_version_ne(lua_State *L);
118 #if defined(__cplusplus)
119 } /* extern "C" */
120 #endif /* __cplusplus */
122 #endif /* version.h */