FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
diffpy.srreal/src/extensions/wrap_libdiffpy_version.cpp at main · diffpy/diffpy.srreal · GitHub
diffpy
diffpy.srreal
Repository navigation
Code
Issues
13
(13)
Pull requests
5
(5)
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
diffpy.srreal
/
src
/
extensions
/
wrap_libdiffpy_version.cpp
Copy path
More file actions
More file actions
Latest commit
History
History
History
66 lines (52 loc) · 1.97 KB
Breadcrumbs
diffpy.srreal
/
src
/
extensions
/
wrap_libdiffpy_version.cpp
Copy path
File metadata and controls
66 lines (52 loc) · 1.97 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
/*
****************************************************************************
*
* diffpy.srreal Complex Modeling Initiative
* (c) 2014 Brookhaven Science Associates,
* Brookhaven National Laboratory.
* All rights reserved.
*
* File coded by: Pavol Juhas
*
* See AUTHORS.txt for a list of people who contributed.
* See LICENSE.txt for license information.
*
******************************************************************************
*
* Access to the libdiffpy version data.
*
****************************************************************************
*/
#
include
<
diffpy/version.hpp
>
#
include
<
nanobind/nanobind.h
>
namespace
nb
=
nanobind;
namespace
srrealmodule
{
namespace
nswrap_libdiffpy_version
{
//
docstrings ----------------------------------------------------------------
const
char
* doc__get_libdiffpy_version_info_dict =
"
\
Return dictionary with version data for the loaded libdiffpy library.
\n
\
"
;
//
wrappers ------------------------------------------------------------------
nb::dict
get_libdiffpy_version_info_dict
()
{
nb::dict rv;
//
Obtain version data from runtime values.
rv[
"
version
"
] = libdiffpy_version_info::version;
rv[
"
version_str
"
] = libdiffpy_version_info::version_str;
rv[
"
major
"
] = libdiffpy_version_info::major;
rv[
"
minor
"
] = libdiffpy_version_info::minor;
rv[
"
micro
"
] = libdiffpy_version_info::micro;
rv[
"
date
"
] = libdiffpy_version_info::date;
rv[
"
git_commit
"
] = libdiffpy_version_info::git_sha;
rv[
"
patch
"
] = libdiffpy_version_info::patch;
return
rv;
}
}
//
namespace nswrap_libdiffpy_version
//
Wrapper definition --------------------------------------------------------
void
wrap_libdiffpy_version
(nb::module_& m)
{
using
namespace
nswrap_libdiffpy_version
;
m.
def
(
"
_get_libdiffpy_version_info_dict
"
,
get_libdiffpy_version_info_dict,
doc__get_libdiffpy_version_info_dict);
}
}
//
namespace srrealmodule
//
End of file
Back
|
FazBrowse Home
|
New Git URL