copy_dictT_copy_dictCopyDictCopyDict (Operator)

Name

copy_dictT_copy_dictCopyDictCopyDict — Copy a dictionary.

Signature

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   (Windows only)

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)

Description

copy_dictcopy_dictCopyDictCopyDictCopyDict creates a deep copy (i.e., all contained handles and iconic objects are deep copied) of the dictionary DictHandleDictHandleDictHandleDictHandledictHandle in the dictionary CopiedDictHandleCopiedDictHandleCopiedDictHandleCopiedDictHandlecopiedDictHandle.

If DictHandleDictHandleDictHandleDictHandledictHandle contains a handle that can not be copied or that has been freed already, an exception is raised per default. This behavior is controlled by GenParamNameGenParamNameGenParamNameGenParamNamegenParamName '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", and the corresponding GenParamValueGenParamValueGenParamValueGenParamValuegenParamValue can take the following values:

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

The default: Errors are raised and the copy process aborted.

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

Only low level errors are raised. Instead of the handle concerned an empty handle is copied in CopiedDictHandleCopiedDictHandleCopiedDictHandleCopiedDictHandlecopiedDictHandle and the copy process will be continued. The behavior regarding HALCON low level errors is determined by do_low_errordo_low_errordo_low_errordo_low_errordoLowError in set_systemset_systemSetSystemSetSystemSetSystem.

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

The errors are suppressed. Instead of the handle concerned an empty handle is copied in CopiedDictHandleCopiedDictHandleCopiedDictHandleCopiedDictHandlecopiedDictHandle and the copy process will be continued.

Execution Information

Parameters

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

Dictionary handle.

Number of elements: DictHandle == 1

GenParamNameGenParamNameGenParamNameGenParamNamegenParamName (input_control)  attribute.name(-array) HTupleHTupleHtuple (string) (string) (HString) (char*)

Name of the generic parameter.

Default value: []

List of values: '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)

Value of the generic parameter.

Default value: []

Suggested values: '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)

Copied dictionary handle.

Number of elements: CopiedDictHandle == 1

Result

If the parameters are valid, the operator copy_dictcopy_dictCopyDictCopyDictCopyDict returns the value 2 (H_MSG_TRUE). If necessary an exception is raised.

Possible Predecessors

read_dictread_dictReadDictReadDictReadDict, deserialize_handledeserialize_handleDeserializeHandleDeserializeHandleDeserializeHandle, create_dictcreate_dictCreateDictCreateDictCreateDict

Possible Successors

write_dictwrite_dictWriteDictWriteDictWriteDict

See also

read_dictread_dictReadDictReadDictReadDict, write_dictwrite_dictWriteDictWriteDictWriteDict, serialize_handleserialize_handleSerializeHandleSerializeHandleSerializeHandle, deserialize_handledeserialize_handleDeserializeHandleDeserializeHandleDeserializeHandle

Module

Foundation