forked from MaRDI4NFDI/open-interfaces
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add more type definitions and constants to OpenInterfaces.jl
- Loading branch information
1 parent
64a284d
commit 35e63f7
Showing
1 changed file
with
22 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,32 @@ | ||
module OpenInterfaces | ||
# Define constants and data structures equivalent to the C interface. | ||
# See oif/api.h | ||
|
||
export OIFArrayF64 | ||
export OIFArgType, OIFArgs, OIFArrayF64 | ||
export OIF_INT, OIF_FLOAT64, OIF_ARRAY_F64, OIF_STR, OIF_CALLBACK, OIF_USER_DATA, OIF_CONFIG_DICT | ||
|
||
@enum OIFArgType begin | ||
OIF_INT = 1 | ||
# OIF_FLOAT32 = 2 | ||
OIF_FLOAT64 = 3 | ||
# OIF_FLOAT32_P = 4 | ||
OIF_ARRAY_F64 = 5 | ||
OIF_STR = 6 | ||
OIF_CALLBACK = 7 | ||
OIF_USER_DATA = 8 | ||
OIF_CONFIG_DICT = 9 | ||
end | ||
|
||
struct OIFArrayF64 | ||
nd::Int32 | ||
dimensions::Ptr{Int64} | ||
data::Ptr{Float64} | ||
end | ||
|
||
struct OIFArgs | ||
num_args::Int64 | ||
arg_types::Ptr{OIFArgType} | ||
arg_values::Ptr{Ptr{Cvoid}} | ||
end | ||
|
||
end # module OpenInterfaces |