From ea32085ad833306254cda40758860b626f7becd0 Mon Sep 17 00:00:00 2001 From: sdixon Date: Thu, 25 Jan 2024 09:28:32 +0000 Subject: [PATCH] removing references to client flags in client wrappers --- source/wrappers/c++/client.cpp | 38 +++++++++---------- .../wrappers/python/pyuda/cpyuda/client.pyx | 10 ++--- 2 files changed, 22 insertions(+), 26 deletions(-) diff --git a/source/wrappers/c++/client.cpp b/source/wrappers/c++/client.cpp index 18ce8ad92..a69ee85b9 100644 --- a/source/wrappers/c++/client.cpp +++ b/source/wrappers/c++/client.cpp @@ -74,8 +74,7 @@ void uda::Client::setProperty(Property prop, bool value) throw UDAException("Unknown property"); } - CLIENT_FLAGS* client_flags = udaClientFlags(); - value ? udaSetProperty(name.c_str(), client_flags) : reudaSetProperty(name.c_str(), client_flags); + value ? udaSetProperty(name.c_str()) : reudaSetProperty(name.c_str()); } void uda::Client::setProperty(Property prop, int value) @@ -121,42 +120,41 @@ void uda::Client::close() int uda::Client::property(Property prop) { - auto client_flags = udaClientFlags(); switch (prop) { case PROP_DATADBLE: - return udaGetProperty("get_datadble", client_flags); + return udaGetProperty("get_datadble"); case PROP_DIMDBLE: - return udaGetProperty("get_dimdble", client_flags); + return udaGetProperty("get_dimdble"); case PROP_TIMEDBLE: - return udaGetProperty("get_timedble", client_flags); + return udaGetProperty("get_timedble"); case PROP_BYTES: - return udaGetProperty("get_bytes", client_flags); + return udaGetProperty("get_bytes"); case PROP_BAD: - return udaGetProperty("get_bad", client_flags); + return udaGetProperty("get_bad"); case PROP_META: - return udaGetProperty("get_meta", client_flags); + return udaGetProperty("get_meta"); case PROP_ASIS: - return udaGetProperty("get_asis", client_flags); + return udaGetProperty("get_asis"); case PROP_UNCAL: - return udaGetProperty("get_uncal", client_flags); + return udaGetProperty("get_uncal"); case PROP_NOTOFF: - return udaGetProperty("get_notoff", client_flags); + return udaGetProperty("get_notoff"); case PROP_SYNTHETIC: - return udaGetProperty("get_synthetic", client_flags); + return udaGetProperty("get_synthetic"); case PROP_SCALAR: - return udaGetProperty("get_scalar", client_flags); + return udaGetProperty("get_scalar"); case PROP_NODIMDATA: - return udaGetProperty("get_nodimdata", client_flags); + return udaGetProperty("get_nodimdata"); case PROP_VERBOSE: - return udaGetProperty("verbose", client_flags); + return udaGetProperty("verbose"); case PROP_DEBUG: - return udaGetProperty("debug", client_flags); + return udaGetProperty("debug"); case PROP_ALTDATA: - return udaGetProperty("altdata", client_flags); + return udaGetProperty("altdata"); case PROP_TIMEOUT: - return udaGetProperty("timeout", client_flags); + return udaGetProperty("timeout"); case PROP_ALTRANK: - return udaGetProperty("altrank", client_flags); + return udaGetProperty("altrank"); default: throw UDAException("Unknown property"); diff --git a/source/wrappers/python/pyuda/cpyuda/client.pyx b/source/wrappers/python/pyuda/cpyuda/client.pyx index c890a9ca4..098f96592 100644 --- a/source/wrappers/python/pyuda/cpyuda/client.pyx +++ b/source/wrappers/python/pyuda/cpyuda/client.pyx @@ -40,21 +40,19 @@ else: def set_property(prop_name, value): if prop_name.lower() not in _properties: raise ValueError('invalid property ' + prop_name) - cdef uda.CLIENT_FLAGS* client_flags = uda.udaClientFlags() if _properties[prop_name][1]: prop_string = prop_name + '=' + str(value) - uda.setIdamProperty(prop_string.encode(), client_flags) + uda.setIdamProperty(prop_string.encode()) elif value: - uda.setIdamProperty(prop_name.encode(), client_flags) + uda.setIdamProperty(prop_name.encode()) else: - uda.resetIdamProperty(prop_name.encode(), client_flags) + uda.resetIdamProperty(prop_name.encode()) def get_property(prop_name): if prop_name.lower() not in _properties: raise ValueError('invalid property ' + prop_name) - cdef uda.CLIENT_FLAGS* client_flags = uda.udaClientFlags() - prop = uda.getIdamProperty(prop_name.encode(), client_flags) + prop = uda.getIdamProperty(prop_name.encode()) if _properties[prop_name][1]: return prop else: