oyFilterGraph_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
oyFilterGraph_s Struct Reference
Conversion

A FilterGraph object. More...

`#include <oyFilterGraph_s.h>`

Inheritance diagram for oyFilterGraph_s:
Collaboration diagram for oyFilterGraph_s:

## Public Member Functions
OYAPI oyFilterGraph_s *OYEXPORT | oyFilterGraph_New (oyObject_s object)
| allocate a new FilterGraph object More...
| oyFilterGraph_Copy
| Copy or Reference a FilterGraph object. More...
OYAPI int OYEXPORT | oyFilterGraph_Release (oyFilterGraph_s **filtergraph)
| release and possibly deallocate a oyFilterGraph_s object More...
OYAPI oyFilterGraph_s *OYEXPORT | oyFilterGraph_FromNode (oyFilterNode_s *node, int flags)
| Get a graphs adjazency list. More...
OYAPI oyFilterNode_s *OYEXPORT | oyFilterGraph_GetNode (oyFilterGraph_s *graph, int pos, const char *registration, const char *mark)
| Select a node. More...
OYAPI int OYEXPORT | oyFilterGraph_CountNodes (oyFilterGraph_s *graph, const char *registration, const char *mark)
| Count nodes. More...
OYAPI oyFilterPlug_s *OYEXPORT | oyFilterGraph_GetEdge (oyFilterGraph_s *graph, int pos)
| Get edges. More...
OYAPI int OYEXPORT | oyFilterGraph_CountEdges (oyFilterGraph_s *graph)
| Count edges. More...
OYAPI int OYEXPORT | oyFilterGraph_PrepareContexts (oyFilterGraph_s *graph, int flags)
| Iterate over a filter graph and possibly prepare contexts. More...
OYAPI int OYEXPORT | oyFilterGraph_SetFromNode (oyFilterGraph_s *graph, oyFilterNode_s *node, const char *mark, int flags)
| Get a graphs adjazency list. More...
OYAPI oyOptions_s *OYEXPORT | oyFilterGraph_GetOptions (oyFilterGraph_s *graph)
| Get options. More...
OYAPI char *OYEXPORT | oyFilterGraph_ToText (oyFilterGraph_s *graph, oyFilterNode_s *input, oyFilterNode_s *output, const char *head_line, int reserved, oyAlloc_f allocateFunc)
| Text description of a graph. 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...
| 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 FilterGraph object.

Version
  Oyranos: 0.1.10

Since
  2009/02/28 (Oyranos: 0.1.10)

Date
  2009/02/28

Examples:
  image_display.cpp.

## Member Function Documentation

## ◆ oyFilterGraph_Copy()

oyFilterGraph_Copy

Copy or Reference a FilterGraph object.

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

Parameters

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

Referenced by oyPixelAccess_s::oyPixelAccess_GetGraph().

## ◆ oyFilterGraph_CountEdges()

OYAPI int OYEXPORT oyFilterGraph_CountEdges | ( | oyFilterGraph_s * | graph | ) |

Count edges.

Function oyFilterGraph_CountEdges

Parameters

  [in] | graph | a filter graph

Returns
  the edges count

Version
  Oyranos: 0.5.0

Date
  2012/09/24

Since
  2012/09/24 (Oyranos: 0.5.0)

References oyFilterPlugs_s::oyFilterPlugs_Count(), and oyOBJECT_FILTER_GRAPH_S.

## ◆ oyFilterGraph_CountNodes()

OYAPI int OYEXPORT oyFilterGraph_CountNodes | ( | oyFilterGraph_s * | graph,
|  | const char * | registration,
|  | const char * | mark
| ) |  |

Count nodes.

Function oyFilterGraph_CountNodes

Parameters

  [in] | graph | a filter graph
  [in] | registration | criterium to generate the matching list, or zero for no criterium
  [in] | mark | marking string to use as a selector

Returns
  the nodes count

See also
  Registration

Version
  Oyranos: 0.5.0

Date
  2012/09/24

Since
  2012/09/24 (Oyranos: 0.5.0)

References oyFilterNode_s::oyFilterNode_Release(), oyFilterNodes_s::oyFilterNodes_Count(), oyFilterNodes_s::oyFilterNodes_Get(), oyFilterRegistrationMatch(), oyOBJECT_FILTER_GRAPH_S, and oyOptions_s::oyOptions_FindString().

## ◆ oyFilterGraph_FromNode()

OYAPI oyFilterGraph_s *OYEXPORT oyFilterGraph_FromNode | ( | oyFilterNode_s * | node,
|  | int | flags
| ) |  |

Get a graphs adjazency list.

Function oyFilterGraph_FromNode

Parameters

  [in] | node | filter node
  [in] | flags | - OY_INPUT omit input direction OY_OUTPUT omit output direction

Returns
  the graph

Version
  Oyranos: 0.1.10

Since
  2009/02/25 (Oyranos: 0.1.10)

Date
  2009/10/28

References oyFilterGraph_New(), oyFilterGraph_SetFromNode(), and oyOBJECT_FILTER_NODE_S.

Referenced by oyConversion_s::oyConversion_GetGraph().

## ◆ oyFilterGraph_GetEdge()

OYAPI oyFilterPlug_s *OYEXPORT oyFilterGraph_GetEdge | ( | oyFilterGraph_s * | graph,
|  | int | pos
| ) |  |

Get edges.

Function oyFilterGraph_GetEdge

Parameters

  [in] | graph | a filter graph

Returns
  the edges count

Version
  Oyranos: 0.5.0

Date
  2012/09/24

Since
  2012/09/24 (Oyranos: 0.5.0)

References oyFilterPlugs_s::oyFilterPlugs_Get(), and oyOBJECT_FILTER_GRAPH_S.

## ◆ oyFilterGraph_GetNode()

OYAPI oyFilterNode_s *OYEXPORT oyFilterGraph_GetNode | ( | oyFilterGraph_s * | graph,
|  | int | pos,
|  | const char * | registration,
|  | const char * | mark
| ) |  |

Select a node.

Function oyFilterGraph_GetNode

Parameters

  [in] | graph | a filter graph
  [in] | pos | the position in a matching list, or -1 to select the first match
  [in] | registration | criterium to generate the matching list, or zero for no criterium
  [in] | mark | marking string to use as a selector

Returns
  the filter node

See also
  Registration

Version
  Oyranos: 0.1.10

Since
  2009/03/04 (Oyranos: 0.1.10)

Date
  2009/03/01

References oyFilterNode_s::oyFilterNode_Release(), oyFilterNodes_s::oyFilterNodes_Count(), oyFilterNodes_s::oyFilterNodes_Get(), oyFilterRegistrationMatch(), oyOBJECT_FILTER_GRAPH_S, and oyOptions_s::oyOptions_FindString().

## ◆ oyFilterGraph_GetOptions()

OYAPI oyOptions_s *OYEXPORT oyFilterGraph_GetOptions | ( | oyFilterGraph_s * | graph | ) |

Get options.

Function oyFilterGraph_GetOptions

Parameters

  [in] | graph | a filter graph

Returns
  the options

Version
  Oyranos: 0.5.0

Date
  2012/09/25

Since
  2012/09/25 (Oyranos: 0.5.0)

References oyOBJECT_FILTER_GRAPH_S, and oyOptions_s::oyOptions_Copy().

## ◆ oyFilterGraph_New()

OYAPI oyFilterGraph_s *OYEXPORT oyFilterGraph_New | ( | oyObject_s | object | ) |

allocate a new FilterGraph object

Function oyFilterGraph_New

References oyOBJECT_OBJECT_S.

Referenced by oyConversion_s::oyConversion_ToText(), and oyFilterGraph_FromNode().

## ◆ oyFilterGraph_PrepareContexts()

OYAPI int OYEXPORT oyFilterGraph_PrepareContexts | ( | oyFilterGraph_s * | graph,
|  | int | flags
| ) |  |

Iterate over a filter graph and possibly prepare contexts.

Function oyFilterGraph_PrepareContexts

Parameters

  [in,out] | graph | a filter graph
  [in] | flags | 1 - enforce a context preparation

Returns
  0 on success, else error

Version
  Oyranos: 0.1.10

Since
  2009/02/28 (Oyranos: 0.1.10)

Date
  2009/03/01

References oyFilterNode_s::oyFilterNode_Release(), oyFilterNodes_s::oyFilterNodes_Count(), oyFilterNodes_s::oyFilterNodes_Get(), oyNAME_PATTERN, oyOBJECT_FILTER_GRAPH_S, oyOption_s::oyOption_SetFromText(), and oyOptions_s::oyOptions_Find().

## ◆ oyFilterGraph_Release()

OYAPI int OYEXPORT oyFilterGraph_Release | ( | oyFilterGraph_s ** | filtergraph | ) |

release and possibly deallocate a oyFilterGraph_s object

Function oyFilterGraph_Release

Parameters

  [in,out] | filtergraph | FilterGraph struct object

References oyOBJECT_FILTER_GRAPH_S.

Referenced by oyConversion_s::oyConversion_ToText().

## ◆ oyFilterGraph_SetFromNode()

OYAPI int OYEXPORT oyFilterGraph_SetFromNode | ( | oyFilterGraph_s * | graph,
|  | oyFilterNode_s * | node,
|  | const char * | mark,
|  | int | flags
| ) |  |

Get a graphs adjazency list.

Function oyFilterGraph_SetFromNode

Parameters

  [in] | graph | a graph object
  [in] | node | filter node
  [in] | mark | a selection
  [in] | flags | - OY_INPUT omit input direction OY_OUTPUT omit output direction

Returns
  the graph

Version
  Oyranos: 0.1.10

Since
  2009/03/04 (Oyranos: 0.1.10)

Date
  2009/03/04

References oyFilterNodes_s::oyFilterNodes_New(), oyFilterNodes_s::oyFilterNodes_Release(), oyFilterPlugs_s::oyFilterPlugs_New(), oyFilterPlugs_s::oyFilterPlugs_Release(), and oyOBJECT_FILTER_GRAPH_S.

Referenced by oyConversion_s::oyConversion_ToText(), and oyFilterGraph_FromNode().

## ◆ oyFilterGraph_ToText()

OYAPI char *OYEXPORT oyFilterGraph_ToText | ( | oyFilterGraph_s * | graph,
|  | oyFilterNode_s * | input,
|  | oyFilterNode_s * | output,
|  | const char * | head_line,
|  | int | reserved,
|  | oyAlloc_f | allocateFunc
| ) |  |

Text description of a graph.

Function oyFilterGraph_ToText

Todo:
  Should this function generate XFORMS compatible output? How?

Parameters

  [in] | graph | graphy object
  [in] | input | start node of a oyConversion_s
  [in] | output | end node and if present a switch to interprete input and output as start and end node of a oyConversion_s
  [in] | head_line | text for inclusion
  [in] | reserved | future format selector (dot, xml ...)
  [in] | allocateFunc | allocation function

Returns
  the graph description

Version
  Oyranos: 0.9.5

Date
  2013/03/12

Since
  2008/10/04 (Oyranos: 0.1.8)

The function is more verbose with the oy_debug variable set.

References oyStruct_s::oy_, oy_debug, OY_FILTEREDGE_CONNECTED, OY_SLASH_C, oyFilterNode_s::oyFilterNode_EdgeCount(), oyFilterNode_s::oyFilterNode_GetCore(), oyFilterNode_s::oyFilterNode_GetSocket(), oyFilterNodes_s::oyFilterNodes_Count(), oyFilterNodes_s::oyFilterNodes_Get(), oyFilterSocket_s::oyFilterSocket_GetData(), oyOBJECT_FILTER_GRAPH_S, and oyObject_GetName().

Referenced by oyConversion_s::oyConversion_ToText().

## Field Documentation

## ◆ copy

oyStruct_Copy_f oyFilterGraph_s::copy

Copy function.

## ◆ oy_

oyObject_s oyFilterGraph_s::oy_

Oyranos internal object.

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

## ◆ release

oyStruct_Release_f oyFilterGraph_s::release

Release function.

## ◆ type_

const oyOBJECT_e oyFilterGraph_s::type_

Type of object.

The struct type tells Oyranos how to interprete hidden fields.