Oyranos Color Management System API
Public Member Functions | Data Fields
oyPointer_s Struct Reference

custom pointer More...

#include <oyPointer_s.h>

Inheritance diagram for oyPointer_s:
Inheritance graph
Collaboration diagram for oyPointer_s:
Collaboration graph

Public Member Functions

OYAPI oyPointer_s *OYEXPORT oyPointer_New (oyObject_s object)
 allocate a new Pointer object More...
 
OYAPI oyPointer_s *OYEXPORT oyPointer_Copy (oyPointer_s *pointer, oyObject_s object)
 copy or reference a Pointer object More...
 
OYAPI int OYEXPORT oyPointer_Release (oyPointer_s **pointer)
 release and possibly deallocate a oyPointer_s object More...
 
int oyPointer_Set (oyPointer_s *cmm_ptr, const char *lib_name, const char *resource, oyPointer ptr, const char *func_name, oyPointer_release_f ptrRelease)
 set a oyPointer_s More...
 
oyPointer_soyPointer_LookUpFromObject (oyStruct_s *data, const char *data_type)
 Get a module specific pointer from cache. More...
 
oyPointer_soyPointer_LookUpFromText (const char *text, const char *data_type)
 Get a module specific pointer from cache. More...
 
- 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...
 

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

custom pointer

Member Function Documentation

◆ oyPointer_Copy()

OYAPI oyPointer_s *OYEXPORT oyPointer_Copy ( oyPointer_s pointer,
oyObject_s  object 
)

copy or reference a Pointer object

Function oyPointer_Copy

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

Parameters
[in]pointerPointer struct object
objectNULL - means reference, the optional object triggers a real copy

References oyOBJECT_POINTER_S.

Referenced by oyCMMapi4_s::oyCMMapi4_GetBackendContext(), oyCMMapi4_s::oyCMMapi4_SetBackendContext(), oyCMMapi7_s::oyCMMapi7_GetBackendContext(), oyCMMapi7_s::oyCMMapi7_SetBackendContext(), oyCMMapiFilter_s::oyCMMapiFilter_GetBackendContext(), oyCMMapiFilter_s::oyCMMapiFilter_SetBackendContext(), oyFilterNode_s::oyFilterNode_GetContext(), and oyFilterNode_s::oyFilterNode_SetContext().

◆ oyPointer_LookUpFromObject()

oyPointer_s * oyPointer_LookUpFromObject ( oyStruct_s data,
const char *  data_type 
)

Get a module specific pointer from cache.

The returned oyPointer_s has to be released after using by the module with oyPointer_Release(). In case the the oyPointer_s::ptr member is empty, it should be set by the requesting module.

See also
oyPointer_LookUpFromText()
Parameters
[in]dataobject to look up
[in]data_typefour byte module type for this object type; The data_type shall enshure the returned oyPointer_s is specific to the calling module.
Returns
the CMM specific oyPointer_s; It is owned by the CMM.
Version
Oyranos: 0.1.10
Since
2008/12/28 (Oyranos: 0.1.10)
Date
2009/11/05

◆ oyPointer_LookUpFromText()

oyPointer_s * oyPointer_LookUpFromText ( const char *  text,
const char *  data_type 
)

Get a module specific pointer from cache.

The returned oyPointer_s has to be released after using by the module with oyPointer_Release(). In case the the oyPointer_s::ptr member is empty, it should be set by the requesting module.

See also
e.g. lcmsCMMData_Open()
Parameters
[in]texthash text to look up
[in]data_typefour byte module type for this object type; The data_type shall enshure the returned oyPointer_s is specific to the calling module.
Returns
the CMM specific oyPointer_s; It is owned by the CMM.
Version
Oyranos: 0.1.10
Since
2009/11/05 (Oyranos: 0.1.10)
Date
2009/11/05

Cache Search

  1. hash from input
  2. query for hash in cache
  3. check
    3a. eighter take cache entry or
    3b. update cache entry

◆ oyPointer_New()

OYAPI oyPointer_s *OYEXPORT oyPointer_New ( oyObject_s  object)

allocate a new Pointer object

Function oyPointer_New

References oyOBJECT_OBJECT_S.

◆ oyPointer_Release()

OYAPI int OYEXPORT oyPointer_Release ( oyPointer_s **  pointer)

release and possibly deallocate a oyPointer_s object

Function oyPointer_Release

Parameters
[in,out]pointerPointer struct object

References oyOBJECT_POINTER_S.

Referenced by oyCMMapi4_s::oyCMMapi4_SetBackendContext(), oyCMMapi7_s::oyCMMapi7_SetBackendContext(), oyCMMapiFilter_s::oyCMMapiFilter_SetBackendContext(), and oyFilterNode_s::oyFilterNode_SetContext().

◆ oyPointer_Set()

int oyPointer_Set ( oyPointer_s cmm_ptr,
const char *  lib_name,
const char *  resource,
oyPointer  ptr,
const char *  func_name,
oyPointer_release_f  ptrRelease 
)

set a oyPointer_s

Function oyPointer_Set

Use for initialising.

Version
Oyranos: 0.1.10
Since
2009/07/22 (Oyranos: 0.1.10)
Date
2009/08/16

Field Documentation

◆ copy

oyStruct_Copy_f oyPointer_s::copy

Copy function.

◆ oy_

oyObject_s oyPointer_s::oy_

Oyranos internal object.

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

◆ release

oyStruct_Release_f oyPointer_s::release

Release function.

◆ type_

const oyOBJECT_e oyPointer_s::type_

Type of object.

The struct type tells Oyranos how to interprete hidden fields.