Oyranos Color Management System API - Version 0.9.6
Public Member Functions | Data Fields
oyHash_s Struct Reference

A cache entry. More...

#include <oyHash_s.h>

Inheritance diagram for oyHash_s:
Inheritance graph
Collaboration diagram for oyHash_s:
Collaboration graph

Public Member Functions

OYAPI oyHash_s *OYEXPORT oyHash_New (oyObject_s object)
 allocate a new Hash object
 oyHash_Copy
 Copy or Reference a Hash object.
OYAPI int OYEXPORT oyHash_Release (oyHash_s **hash)
 release and possibly deallocate a oyHash_s object
oyHash_soyHash_Create (const char *hash_text, oyObject_s object)
 Create a new Oyranos cache entry.
oyOBJECT_e oyHash_GetType (oyHash_s *hash)
 get Hash entries type
int oyHash_IsOf (oyHash_s *hash, oyOBJECT_e type)
 Hash is of type.
int oyHash_SetPointer (oyHash_s *hash, oyStruct_s *obj)
oyStruct_soyHash_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
const char * oyStruct_GetText (oyStruct_s *obj, oyNAME_e name_type, uint32_t flags)
 Get a text dump.
 oyStruct_RegisterStaticMessageFunc
 register a function for verbosity
 oyStruct_GetInfo
 get a additional string from a object
const char * oyStructTypeToText (oyOBJECT_e type)
 Objects type to small string.

Data Fields

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

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

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]hashHash struct object
objectNULL - means reference, the optional object triggers a real copy

Referenced by oyCacheListGetEntry_().

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)

Referenced by oyCacheListGetEntry_().

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)

Referenced by oyPointer_s::oyPointer_LookUpFromText(), and oyStructList_s::oyStructList_GetHashStruct().

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_.

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)
OYAPI oyHash_s *OYEXPORT oyHash_New ( oyObject_s  object)

allocate a new Hash object

Function oyHash_New

References oyOBJECT_OBJECT_S.

OYAPI int OYEXPORT oyHash_Release ( oyHash_s **  hash)

release and possibly deallocate a oyHash_s object

Function oyHash_Release

Parameters
[in,out]hashHash struct object

References oyOBJECT_HASH_S.

Referenced by oyCacheListGetEntry_(), oyPointer_s::oyPointer_LookUpFromText(), and oyStructList_s::oyStructList_GetHashStruct().

int oyHash_SetPointer ( oyHash_s hash,
oyStruct_s obj 
)

Function oyHash_SetPointer

Parameters
[in,out]hashthe to be set hash
[in,out]objthe 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

Referenced by oyPointer_s::oyPointer_LookUpFromText().

Field Documentation

oyStruct_Copy_f oyHash_s::copy

Copy function.

oyObject_s oyHash_s::oy_

Oyranos internal object.

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

Referenced by oyCacheListGetEntry_().

oyStruct_Release_f oyHash_s::release

Release function.

const oyOBJECT_e oyHash_s::type_

Type of object.

The struct type tells Oyranos how to interprete hidden fields.

Referenced by oyHash_GetType().