Skip to content
Snippets Groups Projects

F get value

Merged Alexander Kreft requested to merge f-get-value into dev
All threads resolved!
2 files
+ 20
20
Compare changes
  • Side-by-side
  • Inline

Files

+ 18
18
@@ -771,11 +771,11 @@ function get_value(entity::Ref{_Entity})
if ent_datatype[1] in _caosdb_dtypes
if !is_list
if ent_datatype[1] == "INTEGER"
out = Ref{Cint}(0)
out = Ref{Clong}(0)
err_code = ccall(
(:caosdb_entity_entity_get_int_value, CaosDB.library_name),
Cint,
(Ref{_Entity}, Ref{Cint}),
(Ref{_Entity}, Ref{Clong}),
entity,
out,
)
@@ -815,7 +815,7 @@ function get_value(entity::Ref{_Entity})
else
list_length = get_property_list_length(entity)
if ent_datatype[1] == "INTEGER"
out = Vector{Cint}()
out = Vector{Clong}()
for i::Cint = 1:list_length
temp = get_int_list_value_at(entity, i)
append!(out, temp)
@@ -880,11 +880,11 @@ function get_value(property::Ref{_Property})
if prop_datatype[1] in _caosdb_dtypes
if !is_list
if prop_datatype[1] == "INTEGER"
out = Ref{Cint}(0)
out = Ref{Clong}(0)
err_code = ccall(
(:caosdb_entity_property_get_int_value, CaosDB.library_name),
Cint,
(Ref{_Property}, Ref{Cint}),
(Ref{_Property}, Ref{Clong}),
property,
out,
)
@@ -924,7 +924,7 @@ function get_value(property::Ref{_Property})
else
list_length = get_property_list_length(property)
if prop_datatype[1] == "INTEGER"
out = Vector{Cint}()
out = Vector{Clong}()
for i::Cint = 1:list_length
temp = get_int_list_value_at(property, i)
append!(out, temp)
@@ -1024,11 +1024,11 @@ end
Return the value of the INTEGER list of the given `property` at the position `index`.
"""
function get_int_list_value_at(property::Ref{_Property}, index::Cint)
out = Ref{Cint}(0)
out = Ref{Clong}(0)
err_code = ccall(
(:caosdb_entity_property_get_int_list_value_at, CaosDB.library_name),
Cint,
(Ref{_Property}, Ref{Cint}, Cint),
(Ref{_Property}, Ref{Clong}, Cint),
property,
out,
index - Cint(1),
@@ -1044,11 +1044,11 @@ end
Return the value of the INTEGER list of the given `entity` at the position `index`.
"""
function get_int_list_value_at(entity::Ref{_Entity}, index::Cint)
out = Ref{Cint}(0)
out = Ref{Clong}(0)
err_code = ccall(
(:caosdb_entity_entity_get_int_list_value_at, CaosDB.library_name),
Cint,
(Ref{_Entity}, Ref{Cint}, Cint),
(Ref{_Entity}, Ref{Clong}, Cint),
entity,
out,
index - Cint(1),
@@ -1655,7+1655,7 @@
CaosDB.Exceptions.evaluate_return_code(err_code)
return property
end
"""
@@ -1985,7+1985,7 @@
err_code = ccall(
(:caosdb_entity_entity_set_int_value, CaosDB.library_name),
Cint,
(Ref{_Entity}, Cint),
(Ref{_Entity}, Clong),
entity,
Cint(value),
Clong(value),
)
elseif in_type <: Number
err_code = ccall(
@@ -2022,9 +2022,9 @@ function set_value(
err_code = ccall(
(:caosdb_entity_entity_set_int_list_value, CaosDB.library_name),
Cint,
(Ref{_Entity}, Ptr{Cint}, Cint),
(Ref{_Entity}, Ptr{Clong}, Cint),
entity,
Vector{Cint}(value),
Vector{Clong}(value),
vec_length,
)
elseif in_type <: Vector{T} where {T<:Number}
@@ -2074,9 +2074,9 @@ function set_value(
err_code = ccall(
(:caosdb_entity_property_set_int_value, CaosDB.library_name),
Cint,
(Ref{_Property}, Cint),
(Ref{_Property}, Clong),
property,
Cint(value),
Clong(value),
)
elseif in_type <: Number
err_code = ccall(
@@ -2111,9 +2111,9 @@ function set_value(
err_code = ccall(
(:caosdb_entity_property_set_int_list_value, CaosDB.library_name),
Cint,
(Ref{_Property}, Ptr{Cint}, Cint),
(Ref{_Property}, Ptr{Clong}, Cint),
property,
Vector{Cint}(value),
Vector{Clong}(value),
vec_length,
)
elseif in_type <: Vector{T} where {T<:Number}
Loading