Oyranos  git-devel
Oyranos is a full featured Color Management System
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 More...
 
OYAPI oyHash_s *OYEXPORT oyHash_Copy (oyHash_s *hash, oyObject_s object)
 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_soyHash_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_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 More...
 
const char * oyStruct_GetText (oyStruct_s *obj, oyNAME_e name_type, uint32_t flags)
 Get a text dump. More...
 
int oyStruct_RegisterStaticMessageFunc (int type, oyStruct_RegisterStaticMessageFunc_f msg, oyStruct_RegisterStaticFreeFunc_f free_func)
 register a function for verbosity More...
 
const char * oyStruct_GetInfo (oyPointer context_object, oyNAME_e type, int flags)
 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()

OYAPI oyHash_s *OYEXPORT oyHash_Copy ( oyHash_s hash,
oyObject_s  object 
)

Copy or Reference a Hash object.

Function oyHash_Copy

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

◆ 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)

◆ 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

◆ oyHash_Release()

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

◆ oyHash_SetPointer()

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

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.