copy_dictT_copy_dictCopyDictCopyDict (Operator)

Name

copy_dictT_copy_dictCopyDictCopyDict — 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)

Beschreibung

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

Wenn DictHandleDictHandleDictHandleDictHandledictHandle ein Handle enthält, das nicht kopiert werden kann oder das schon freigegeben wurde, bricht copy_dictcopy_dictCopyDictCopyDictCopyDict standardmäßig mit einer Fehlermeldung ab. Dieses Verhalten kann durch Setzen von GenParamNameGenParamNameGenParamNameGenParamNamegenParamName 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" verändert werden, der zugehörige GenParamValueGenParamValueGenParamValueGenParamValuegenParamValue kann folgende Werte annehmen:

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

Der Default: Fehler werden geworfen und der Kopierprozess abgebrochen.

'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 CopiedDictHandleCopiedDictHandleCopiedDictHandleCopiedDictHandlecopiedDictHandle kopiert und der Kopierprozess weitergeführt. Der Umgang mit HALCON Low-Level-Fehlern wird durch do_low_errordo_low_errordo_low_errordo_low_errordoLowError in set_systemset_systemSetSystemSetSystemSetSystem bestimmt.

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

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

Ausführungsinformationen

Parameter

DictHandleDictHandleDictHandleDictHandledictHandle (input_control)  dict HDict, HTupleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Handle des Dictionaries.

Parameteranzahl: DictHandle == 1

GenParamNameGenParamNameGenParamNameGenParamNamegenParamName (input_control)  attribute.name(-array) HTupleHTupleHtuple (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"

GenParamValueGenParamValueGenParamValueGenParamValuegenParamValue (input_control)  attribute.name(-array) HTupleHTupleHtuple (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", 'false'"false""false""false""false", 'low_level'"low_level""low_level""low_level""low_level"

CopiedDictHandleCopiedDictHandleCopiedDictHandleCopiedDictHandlecopiedDictHandle (output_control)  dict HDict, HTupleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Kopiertes Handle des Dictionaries.

Parameteranzahl: CopiedDictHandle == 1

Ergebnis

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

Vorgänger

read_dictread_dictReadDictReadDictReadDict, deserialize_handledeserialize_handleDeserializeHandleDeserializeHandleDeserializeHandle, create_dictcreate_dictCreateDictCreateDictCreateDict

Nachfolger

write_dictwrite_dictWriteDictWriteDictWriteDict

Siehe auch

read_dictread_dictReadDictReadDictReadDict, write_dictwrite_dictWriteDictWriteDictWriteDict, serialize_handleserialize_handleSerializeHandleSerializeHandleSerializeHandle, deserialize_handledeserialize_handleDeserializeHandleDeserializeHandleDeserializeHandle

Modul

Foundation