oyHash_s Struct Reference
Description: C source code API documentation for the Oyranos project.
Keywords: Oyranos,Color Management,Color Management,ICC,CMS,C,doxygen,API,documentation

| Oyranos Color Management System API - Version 0.9.6

Public Member Functions | Data Fields
oyHash_s Struct Reference
Miscellaneous » Generic Objects

A cache entry. More...

`#include <oyHash_s.h>`

Inheritance diagram for oyHash_s:
Collaboration diagram for oyHash_s:

## Public Member Functions
OYAPI oyHash_s *OYEXPORT | oyHash_New (oyObject_s object)
| allocate a new Hash object More...
| oyHash_Copy
| Copy or Reference a Hash object. More...
OYAPI int OYEXPORT | oyHash_Release (oyHash_s **hash)
| release and possibly deallocate a oyHash_s object More...
oyHash_s * | oyHash_Create (const char *hash_text, oyObject_s object)
| Create a new Oyranos cache entry. More...
oyOBJECT_e | oyHash_GetType (oyHash_s *hash)
| get Hash entries type More...
int | oyHash_IsOf (oyHash_s *hash, oyOBJECT_e type)
| Hash is of type. More...
int | oyHash_SetPointer (oyHash_s *hash, oyStruct_s *obj)
oyStruct_s * | oyHash_GetPointer (oyHash_s *hash, oyOBJECT_e type)
Public Member Functions inherited from oyStruct_s
const char * | oyStruct_GetTextFromModule (oyStruct_s *obj, oyNAME_e name_type, uint32_t flags)
| get object infos from a module More...
const char * | oyStruct_GetText (oyStruct_s *obj, oyNAME_e name_type, uint32_t flags)
| Get a text dump. More...
| oyStruct_RegisterStaticMessageFunc
| register a function for verbosity More...
| oyStruct_GetInfo
| get a additional string from a object More...
const char * | oyStructTypeToText (oyOBJECT_e type)
| Objects type to small string. More...

## Data Fields
const oyOBJECT_e | type_
| Type of object. More...
oyStruct_Copy_f | copy
| Copy function. More...
oyStruct_Release_f | release
| Release function. More...
oyObject_s | oy_
| Oyranos internal object. More...
Data Fields inherited from oyStruct_s
const oyOBJECT_e | type_
| Type of object. More...
oyStruct_Copy_f | copy
| Copy function. More...
oyStruct_Release_f | release
| Release function. More...
oyObject_s | oy_
| Oyranos internal object. More...

## Detailed Description

A cache entry.

Combine hash, description and oyPointer to one searchable struct. The struct can be used in a oyStructList_s for a hash map or searchable cache. Memory management is done by Oyranos' oyAllocateFunc_ and oyDeallocateFunc_.

Since
  Oyranos: version 0.1.8

Date
  24 november 2007 (API 0.1.8)

## Member Function Documentation

## ◆ oyHash_Copy()

oyHash_Copy

Copy or Reference a Hash object.

The function is for copying and for referencing. The reference is the most often used way, which saves resourcs and time.

Parameters

  [in] | hash | Hash struct object
  | object | NULL - means reference, the optional object triggers a real copy

## ◆ oyHash_Create()

oyHash_s * oyHash_Create | ( | const char * | hash_text,
|  | oyObject_s | object
| ) |  |

Create a new Oyranos cache entry.

Function oyHash_Create

Version
  Oyranos: 0.9.0

Date
  2012/10/17

Since
  2007/11/24 (Oyranos: 0.1.8)

## ◆ oyHash_GetPointer()

oyStruct_s * oyHash_GetPointer | ( | oyHash_s * | hash,
|  | oyOBJECT_e | type
| ) |  |

Function oyHash_GetPointer

Version
  Oyranos: 0.3.0

Since
  2011/01/05 (Oyranos: 0.3.0)

## ◆ oyHash_GetType()

oyOBJECT_e oyHash_GetType | ( | oyHash_s * | hash | ) |

get Hash entries type

Function oyHash_GetType

Since
  Oyranos: version 0.3.0

Version
  (API 0.3.0)

References type_.

## ◆ oyHash_IsOf()

int oyHash_IsOf | ( | oyHash_s * | hash,
|  | oyOBJECT_e | type
| ) |  |

Hash is of type.

Function oyHash_IsOf

Since
  Oyranos: version 0.3.0

Date
  3 december 2007 (API 0.1.8)

## ◆ oyHash_New()

OYAPI oyHash_s *OYEXPORT oyHash_New | ( | oyObject_s | object | ) |

allocate a new Hash object

Function oyHash_New

References oyOBJECT_OBJECT_S.

## ◆ oyHash_Release()

OYAPI int OYEXPORT oyHash_Release | ( | oyHash_s ** | hash | ) |

release and possibly deallocate a oyHash_s object

Function oyHash_Release

Parameters

  [in,out] | hash | Hash struct object

References oyOBJECT_HASH_S.

## ◆ oyHash_SetPointer()

int oyHash_SetPointer | ( | oyHash_s * | hash,
|  | oyStruct_s * | obj
| ) |  |

Function oyHash_SetPointer

Parameters

  [in,out] | hash | the to be set hash
  [in,out] | obj | the to be referenced object

Returns
  0 - good; >= 1 - error; < 0 issue

Version
  Oyranos: 0.3.0

Since
  2007/12/03 (Oyranos: 0.3.0)

Date
  2011/01/05

## Field Documentation

## ◆ copy

oyStruct_Copy_f oyHash_s::copy

Copy function.

## ◆ oy_

oyObject_s oyHash_s::oy_

Oyranos internal object.

Features name and hash. Do not change during object life time.

## ◆ release

oyStruct_Release_f oyHash_s::release

Release function.

## ◆ type_

const oyOBJECT_e oyHash_s::type_

Type of object.

The struct type tells Oyranos how to interprete hidden fields.

Referenced by oyHash_GetType().