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

Data processing node. More...

#include <oyCMMapi7_s.h>

Inheritance diagram for oyCMMapi7_s:
Inheritance graph
Collaboration diagram for oyCMMapi7_s:
Collaboration graph

Public Types

typedef int(* oyCMMFilterPlug_Run_f) (oyFilterPlug_s *plug, oyPixelAccess_s *pixel_access)
 get a pixel or channel from the previous filter More...
 
- Public Types inherited from oyCMMapi_s
typedef int(* oyCMMInit_f) (oyStruct_s *filter)
 optional CMM init function More...
 
typedef int(* oyCMMMessageFuncSet_f) (oyMessage_f message_func)
 optionaly sets a CMM message function More...
 
typedef int(* oyCMMCanHandle_f) (oyCMMQUERY_e type, uint32_t value)
 CMM feature declaration function. More...
 
typedef const char *(* oyCMMGetText_f) (const char *select, oyNAME_e type, oyStruct_s *context)
 get strings from a CMM More...
 

Public Member Functions

OYAPI oyCMMapi7_s *OYEXPORT oyCMMapi7_New (oyObject_s object)
 allocate a new CMMapi7 object More...
 
OYAPI oyCMMapi7_s *OYEXPORT oyCMMapi7_Copy (oyCMMapi7_s *cmmapi7, oyObject_s object)
 copy or reference a CMMapi7 object More...
 
OYAPI int OYEXPORT oyCMMapi7_Release (oyCMMapi7_s **cmmapi7)
 release and possibly deallocate a oyCMMapi7_s object More...
 
OYAPI int OYEXPORT oyCMMapi7_SetBackendContext (oyCMMapi7_s *api, oyPointer_s *ptr)
 set filter type specific runtime data More...
 
OYAPI oyPointer_s *OYEXPORT oyCMMapi7_GetBackendContext (oyCMMapi7_s *api)
 get filter type specific runtime data More...
 
OYAPI oyCMMapi7_s *OYEXPORT oyCMMapi7_Create (oyCMMInit_f init, oyCMMMessageFuncSet_f msg_set, const char *registration, int32_t version[3], int32_t module_api[3], const char *context_type, oyCMMFilterPlug_Run_f run, oyConnector_s **plugs, uint32_t plugs_n, uint32_t plugs_last_add, oyConnector_s **sockets, uint32_t sockets_n, uint32_t sockets_last_add, const char **properties, oyObject_s object)
 Create a oyCMMapi7_s filter object. More...
 
- Public Member Functions inherited from oyCMMapiFilter_s
OYAPI oyCMMapiFilter_s *OYEXPORT oyCMMapiFilter_New (oyObject_s object)
 allocate a new CMMapiFilter object More...
 
OYAPI oyCMMapiFilter_s *OYEXPORT oyCMMapiFilter_Copy (oyCMMapiFilter_s *cmmapifilter, oyObject_s object)
 copy or reference a CMMapiFilter object More...
 
OYAPI int OYEXPORT oyCMMapiFilter_Release (oyCMMapiFilter_s **cmmapifilter)
 release and possibly deallocate a oyCMMapiFilter_s object More...
 
OYAPI int OYEXPORT oyCMMapiFilter_SetBackendContext (oyCMMapiFilter_s *api, oyPointer_s *ptr)
 set filter type specific runtime data More...
 
OYAPI oyPointer_s *OYEXPORT oyCMMapiFilter_GetBackendContext (oyCMMapiFilter_s *api)
 get filter type specific runtime data More...
 
- Public Member Functions inherited from oyCMMapi_s
OYAPI oyCMMapi_s *OYEXPORT oyCMMapi_New (oyObject_s object)
 allocate a new CMMapi object More...
 
OYAPI oyCMMapi_s *OYEXPORT oyCMMapi_Copy (oyCMMapi_s *cmmapi, oyObject_s object)
 copy or reference a CMMapi object More...
 
OYAPI int OYEXPORT oyCMMapi_Release (oyCMMapi_s **cmmapi)
 release and possibly deallocate a oyCMMapi_s object More...
 
void oyCMMapi_Set (oyCMMapi_s *api, oyCMMInit_f init, oyCMMMessageFuncSet_f msg_set, const char *registration, int32_t version[3], int32_t module_api[3])
 CMMapi member setter. More...
 
void oyCMMapi_SetNext (oyCMMapi_s *api, oyCMMapi_s *next)
 chain CMMapi's More...
 
oyCMMapi_soyCMMapi_GetNext (oyCMMapi_s *api)
 get next CMMapi 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 oyCMMapiFilter_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...
 
- Data Fields inherited from oyCMMapi_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...
 
- 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

Data processing node.

The structure forms a node element in a directed acyclic graph. It's connectors allow to communicate cababilities and semantics. This node type acts mostly on data processing.

It is possible to delegate parameter or context creation to other specialised filter types. The filter context can be stored in oyFilterNode_s::backend_data if the oyCMMapi7_s::context_type is filled with a understood format hint. The registration should provide keywords to select the processing function.

(in CM jargon - interpolator)

Version
Oyranos: 0.1.10
Since
2008/12/15 (Oyranos: 0.1.9)
Date
2008/12/27

Member Typedef Documentation

◆ oyCMMFilterPlug_Run_f

typedef int(* oyCMMFilterPlug_Run_f) (oyFilterPlug_s *plug, oyPixelAccess_s *pixel_access)

get a pixel or channel from the previous filter

typedef oyCMMFilterPlug_Run_f

You have to call oyCMMFilter_CreateContext_t or oyCMMFilter_ContextFromMem_t first. The API provides flexible pixel access and cache configuration by the passed oyPixelAccess_s object. The filters internal precalculated data are passed by the filter object.

while (
error = oyCMMFilterSocket_GetNext( filter_plug, pixel_access ) == 0
) {}; 
Parameters
[in]plugincluding the CMM's private data, connector is the requesting plug to obtain a handle for calling back
[in]pixel_accessprocessing order instructions
Returns
-1 end; 0 on success; error > 1

A requested context will be stored in oyFilterNode_s::backend_data.

Version
Oyranos: 0.1.8
Since
2008/07/03 (Oyranos: 0.1.8)
Date
2008/07/28

Member Function Documentation

◆ oyCMMapi7_Copy()

OYAPI oyCMMapi7_s *OYEXPORT oyCMMapi7_Copy ( oyCMMapi7_s cmmapi7,
oyObject_s  object 
)

copy or reference a CMMapi7 object

Function oyCMMapi7_Copy

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

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

References oyOBJECT_CMM_API7_S.

◆ oyCMMapi7_Create()

OYAPI oyCMMapi7_s *OYEXPORT oyCMMapi7_Create ( oyCMMInit_f  init,
oyCMMMessageFuncSet_f  msg_set,
const char *  registration,
int32_t  version[3],
int32_t  module_api[3],
const char *  context_type,
oyCMMFilterPlug_Run_f  run,
oyConnector_s **  plugs,
uint32_t  plugs_n,
uint32_t  plugs_last_add,
oyConnector_s **  sockets,
uint32_t  sockets_n,
uint32_t  sockets_last_add,
const char **  properties,
oyObject_s  object 
)

Create a oyCMMapi7_s filter object.

Function oyCMMapi7_Create

Parameters
initcustom initialisation
msg_setmessage function setter
registrationthe modules registration string,
versionmodule version
  • 0: major - should be stable for the live time of a filter
  • 1: minor - mark new features
  • 2: patch version - correct errors
module_apitell compatibility with Oyranos API
  • 0: last major Oyranos version during development time, e.g. 0
  • 1: last minor Oyranos version during development time, e.g. 9
  • 2: last Oyranos patch version during development time, e.g. 5
context_typefour byte identifier if a context is needed A additional oyCMMapi6_s module can, then be provided to convert between context formats, registred by this identifier.
runthe filter function
plugsa zero terminated list of connectors
plugs_nthe number of plugs in 'plugs'
plugs_last_addthe number of accepted repeats of the last plug
socketsa zero terminated list of connectors
sockets_nthe number of sockets in 'sockets'
sockets_last_addthe number of accepted repeats of the last socket
propertiesA zero terminated list of strings. The semantics are plugin defined. e.g.: {"key1=value1","key2=value2",0}
objectOyranos object (optional)
See also
oyCMMapi_s::oyCMMapi_Set()
Version
Oyranos: 0.9.5
Since
2013/07/11 (Oyranos: 0.9.5)
Date
2013/07/11

References oyCMMapi_s::oy_, oyCMMapi7_New(), oyCMMapi_s::oyCMMapi_Set(), oyObject_GetAlloc(), and oyObject_GetDeAlloc().

◆ oyCMMapi7_GetBackendContext()

OYAPI oyPointer_s *OYEXPORT oyCMMapi7_GetBackendContext ( oyCMMapi7_s api)

get filter type specific runtime data

Runtime data can be used as context by a backend during execution.

That data is apart from a filter object, which can have lifetime data associated through a oyFilterNode_GetContext(). A filter connector can have its processing data associated through oyFilterNode_SetData().

Parameters
[in]apiapi object
Returns
the context needed to run the filter type
Version
Oyranos: 0.9.5
Date
2013/12/19
Since
2013/12/19 (Oyranos: 0.9.5)

References oyOBJECT_CMM_API7_S, oyOBJECT_CMM_API_MAX, and oyPointer_s::oyPointer_Copy().

Referenced by oyFilterNode_s::oyFilterNode_GetBackendContext().

◆ oyCMMapi7_New()

OYAPI oyCMMapi7_s *OYEXPORT oyCMMapi7_New ( oyObject_s  object)

allocate a new CMMapi7 object

Function oyCMMapi7_New

References oyOBJECT_OBJECT_S.

Referenced by oyCMMapi7_Create().

◆ oyCMMapi7_Release()

OYAPI int OYEXPORT oyCMMapi7_Release ( oyCMMapi7_s **  cmmapi7)

release and possibly deallocate a oyCMMapi7_s object

Function oyCMMapi7_Release

Parameters
[in,out]cmmapi7CMMapi7 struct object

References oyOBJECT_CMM_API7_S.

◆ oyCMMapi7_SetBackendContext()

OYAPI int OYEXPORT oyCMMapi7_SetBackendContext ( oyCMMapi7_s api,
oyPointer_s ptr 
)

set filter type specific runtime data

Runtime data can be used as context by a backend during execution. The data is typical set during backend load.

That data is apart from a filter object, which can have lifetime data associated through a oyFilterNode_GetContext(). A filter connector can have its processing data associated through oyFilterNode_SetData().

Parameters
[in,out]apiapi object
[in]ptrthe data needed to run the filter type
Returns
error
Version
Oyranos: 0.9.5
Date
2013/12/19
Since
2013/12/19 (Oyranos: 0.9.5)

References oyOBJECT_CMM_API7_S, oyOBJECT_CMM_API_MAX, oyPointer_s::oyPointer_Copy(), and oyPointer_s::oyPointer_Release().

Referenced by oyFilterNode_s::oyFilterNode_SetBackendContext().

Field Documentation

◆ copy

oyStruct_Copy_f oyCMMapi7_s::copy

Copy function.

◆ oy_

oyObject_s oyCMMapi7_s::oy_

Oyranos internal object.

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

◆ release

oyStruct_Release_f oyCMMapi7_s::release

Release function.

◆ type_

const oyOBJECT_e oyCMMapi7_s::type_

Type of object.

The struct type tells Oyranos how to interprete hidden fields.