copy_dictT_copy_dictCopyDictCopyDictcopy_dict (Operator)

Name

copy_dictT_copy_dictCopyDictCopyDictcopy_dict — Kopieren eines Dictionaries.

Signatur

copy_dict( : : DictHandle, GenParamName, GenParamValue : CopiedDictHandle)

Herror T_copy_dict(const Htuple DictHandle, const Htuple GenParamName, const Htuple GenParamValue, Htuple* CopiedDictHandle)

void CopyDict(const HTuple& DictHandle, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* CopiedDictHandle)

HDict HDict::CopyDict(const HTuple& GenParamName, const HTuple& GenParamValue) const

HDict HDict::CopyDict(const HString& GenParamName, const HString& GenParamValue) const

HDict HDict::CopyDict(const char* GenParamName, const char* GenParamValue) const

HDict HDict::CopyDict(const wchar_t* GenParamName, const wchar_t* GenParamValue) const   (Nur Windows)

static void HOperatorSet.CopyDict(HTuple dictHandle, HTuple genParamName, HTuple genParamValue, out HTuple copiedDictHandle)

HDict HDict.CopyDict(HTuple genParamName, HTuple genParamValue)

HDict HDict.CopyDict(string genParamName, string genParamValue)

def copy_dict(dict_handle: HHandle, gen_param_name: MaybeSequence[str], gen_param_value: MaybeSequence[Union[int, float, str]]) -> HHandle

Beschreibung

copy_dictcopy_dictCopyDictCopyDictCopyDictcopy_dict erstellt eine tiefe Kopie (d.h. von allen im Dictionary enthaltenen Handles und ikonischen Objekten wird eine tiefe Kopie erstellt) des Dictionary DictHandleDictHandleDictHandleDictHandledictHandledict_handle und gibt diese als Dictionary in CopiedDictHandleCopiedDictHandleCopiedDictHandleCopiedDictHandlecopiedDictHandlecopied_dict_handle zurück.

Wenn DictHandleDictHandleDictHandleDictHandledictHandledict_handle ein Handle enthält, das nicht kopiert werden kann oder das schon freigegeben wurde, bricht copy_dictcopy_dictCopyDictCopyDictCopyDictcopy_dict standardmäßig mit einer Fehlermeldung ab. Dieses Verhalten kann durch Setzen von GenParamNameGenParamNameGenParamNameGenParamNamegenParamNamegen_param_name auf 'raise_error_if_content_not_serializable'"raise_error_if_content_not_serializable""raise_error_if_content_not_serializable""raise_error_if_content_not_serializable""raise_error_if_content_not_serializable""raise_error_if_content_not_serializable" verändert werden, der zugehörige GenParamValueGenParamValueGenParamValueGenParamValuegenParamValuegen_param_value kann folgende Werte annehmen:

'true'"true""true""true""true""true":

Der Default: Fehler werden geworfen und der Kopierprozess abgebrochen.

'low_level'"low_level""low_level""low_level""low_level""low_level":

Nur Low-Level-Fehler werden geworfen. Anstatt des betreffenden Handles wird ein leeres Handle in CopiedDictHandleCopiedDictHandleCopiedDictHandleCopiedDictHandlecopiedDictHandlecopied_dict_handle kopiert und der Kopierprozess weitergeführt. Der Umgang mit HALCON Low-Level-Fehlern wird durch 'do_low_error'"do_low_error""do_low_error""do_low_error""do_low_error""do_low_error" in set_systemset_systemSetSystemSetSystemSetSystemset_system bestimmt.

'false'"false""false""false""false""false":

Es werden keine Fehler geworfen. Anstatt des betreffenden Handles wird ein leeres Handle in CopiedDictHandleCopiedDictHandleCopiedDictHandleCopiedDictHandlecopiedDictHandlecopied_dict_handle kopiert und der Kopierprozess weitergeführt.

Ausführungsinformationen

Parameter

DictHandleDictHandleDictHandleDictHandledictHandledict_handle (input_control)  dict HDict, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Handle des Dictionaries.

Parameteranzahl: DictHandle == 1

GenParamNameGenParamNameGenParamNameGenParamNamegenParamNamegen_param_name (input_control)  attribute.name(-array) HTupleMaybeSequence[str]HTupleHtuple (string) (string) (HString) (char*)

Name des generischen Parameters.

Defaultwert: []

Werteliste: 'raise_error_if_content_not_serializable'"raise_error_if_content_not_serializable""raise_error_if_content_not_serializable""raise_error_if_content_not_serializable""raise_error_if_content_not_serializable""raise_error_if_content_not_serializable"

GenParamValueGenParamValueGenParamValueGenParamValuegenParamValuegen_param_value (input_control)  attribute.name(-array) HTupleMaybeSequence[Union[int, float, str]]HTupleHtuple (string / integer / real) (string / int / long / double) (HString / Hlong / double) (char* / Hlong / double)

Wert des generischen Parameters.

Defaultwert: []

Wertevorschläge: 'true'"true""true""true""true""true", 'false'"false""false""false""false""false", 'low_level'"low_level""low_level""low_level""low_level""low_level"

CopiedDictHandleCopiedDictHandleCopiedDictHandleCopiedDictHandlecopiedDictHandlecopied_dict_handle (output_control)  dict HDict, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Kopiertes Handle des Dictionaries.

Parameteranzahl: CopiedDictHandle == 1

Ergebnis

Sind die Parameterwerte korrekt, dann liefert copy_dictcopy_dictCopyDictCopyDictCopyDictcopy_dict den Wert 2 (H_MSG_TRUE). Gegebenenfalls wird eine Fehlerbehandlung durchgeführt.

Vorgänger

read_dictread_dictReadDictReadDictReadDictread_dict, deserialize_handledeserialize_handleDeserializeHandleDeserializeHandleDeserializeHandledeserialize_handle, create_dictcreate_dictCreateDictCreateDictCreateDictcreate_dict

Nachfolger

write_dictwrite_dictWriteDictWriteDictWriteDictwrite_dict

Siehe auch

read_dictread_dictReadDictReadDictReadDictread_dict, write_dictwrite_dictWriteDictWriteDictWriteDictwrite_dict, serialize_handleserialize_handleSerializeHandleSerializeHandleSerializeHandleserialize_handle, deserialize_handledeserialize_handleDeserializeHandleDeserializeHandleDeserializeHandledeserialize_handle

Modul

Foundation