| Oyranos Colour Management System API

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- Data Structures
- Data Structure Index
- Class Hierarchy
- Data Fields

Public Member Functions | Data Fields
oyBlob_s Struct Reference
Values Handling

A data blob object. More...

`#include <oyBlob_s.h>`

Inheritance diagram for oyBlob_s:
Collaboration diagram for oyBlob_s:

## Public Member Functions

OYAPI oyBlob_s *OYEXPORT | oyBlob_New (oyObject_s object)
| allocate a new Blob object More...
OYAPI oyBlob_s *OYEXPORT | oyBlob_Copy (oyBlob_s *blob, oyObject_s object)
| copy or reference a Blob object More...
OYAPI int OYEXPORT | oyBlob_Release (oyBlob_s **blob)
| release and possibly deallocate a oyBlob_s object More...
int | oyBlob_SetFromData (oyBlob_s *blob, oyPointer ptr, size_t size, const char *type)
| set value from a data blob More...
int | oyBlob_SetFromStatic (oyBlob_s *blob, const oyPointer ptr, size_t size, const char *type)
| set value from a data blob More...
oyPointer | oyBlob_GetPointer (oyBlob_s *blob)
| get value from a data blob More...
size_t | oyBlob_GetSize (oyBlob_s *blob)
| get size from a data blob More...
const char * | oyBlob_GetType (oyBlob_s *blob)
| get type from a data blob More...
oyBlob_s * | oyFilterGraph_ToBlob (oyFilterGraph_s *graph, int node_pos, oyObject_s object)
| Node context to binary blob. More...
Public Member Functions inherited from oyStruct_s
const char * | oyStruct_GetText (oyStruct_s *obj, oyNAME_e name_type, uint32_t flags)
| get a text dump More...

## Data Fields

oyStruct_Copy_f | copy
oyStruct_Release_f | release
Data Fields inherited from oyStruct_s
oyStruct_Copy_f | copy
oyStruct_Release_f | release

## Detailed Description

A data blob object.

Version
  Oyranos: 0.2.1

Since
  2009/01/06 (Oyranos: 0.1.9)

Date
  2011/01/19

## Member Function Documentation

OYAPI oyBlob_s *OYEXPORT oyBlob_Copy | ( | oyBlob_s * | blob,
|  | oyObject_s | object
| ) |  |

copy or reference a Blob object

Function oyBlob_Copy

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

Parameters

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

References oyOBJECT_BLOB_S.

oyPointer oyBlob_GetPointer | ( | oyBlob_s * | blob | ) |

get value from a data blob

Function oyBlob_GetPointer

Parameters

  [in] | blob | the data blob

Returns
  the data pointer

Version
  Oyranos: 0.2.1

Since
  2011/01/17 (Oyranos: 0.2.1)

Date
  2011/01/17

References oyOBJECT_BLOB_S.

Referenced by oyProfileTag_s::oyProfileTag_GetText(), and oyValue_u::oyValueEqual().

size_t oyBlob_GetSize | ( | oyBlob_s * | blob | ) |

get size from a data blob

Function oyBlob_GetSize

Parameters

  [in] | blob | the data blob

Returns
  the data size

Version
  Oyranos: 0.2.1

Since
  2011/01/17 (Oyranos: 0.2.1)

Date
  2011/01/17

References oyOBJECT_BLOB_S.

Referenced by oyProfileTag_s::oyProfileTag_GetText().

const char * oyBlob_GetType | ( | oyBlob_s * | blob | ) |

get type from a data blob

Function oyBlob_GetType

Parameters

  [in] | blob | the data blob

Returns
  the data type

Version
  Oyranos: 0.2.1

Since
  2011/01/17 (Oyranos: 0.2.1)

Date
  2011/01/17

References oyOBJECT_BLOB_S.

OYAPI oyBlob_s *OYEXPORT oyBlob_New | ( | oyObject_s | object | ) |

allocate a new Blob object

Function oyBlob_New

References oyOBJECT_OBJECT_S.

Referenced by oyFilterGraph_ToBlob(), and oyOption_s::oyOption_SetFromData().

OYAPI int OYEXPORT oyBlob_Release | ( | oyBlob_s ** | blob | ) |

release and possibly deallocate a oyBlob_s object

Function oyBlob_Release

Parameters

  [in,out] | blob | Blob struct object

References oyOBJECT_BLOB_S.

int oyBlob_SetFromData | ( | oyBlob_s * | blob,
|  | oyPointer | ptr,
|  | size_t | size,
|  | const char * | type
| ) |  |

set value from a data blob

Function oyBlob_SetFromData

Parameters

  [in] | blob | the data blob
  [in] | ptr | copy the data into the blob object
  [in] | size | data size; 0 means the pointer is not owned by the object.
  [in] | type | data type; assuming 8 byte with typical 4 byte content

Returns
  0 - success, 1 - error

Version
  Oyranos: 0.1.10

Since
  2009/01/06 (Oyranos: 0.1.10)

Date
  2009/06/12

References oyOBJECT_BLOB_S.

Referenced by oyOption_s::oyOption_SetFromData().

int oyBlob_SetFromStatic | ( | oyBlob_s * | blob,
|  | const oyPointer | ptr,
|  | size_t | size,
|  | const char * | type
| ) |  |

set value from a data blob

Function oyBlob_SetFromStatic

Parameters

  [in] | blob | the data blob
  [in] | ptr | move the data into the blob object
  [in] | size | data size
  [in] | type | data type; assuming 8 byte with typical 4 byte content

Returns
  0 - success, 1 - error

Version
  Oyranos: 0.1.10

Since
  2009/07/26 (Oyranos: 0.1.10)

Date
  2009/07/26

References oyOBJECT_BLOB_S.

oyBlob_s * oyFilterGraph_ToBlob | ( | oyFilterGraph_s * | graph,
|  | int | node_pos,
|  | oyObject_s | object
| ) |  |

Node context to binary blob.

Function oyFilterGraph_ToBlob

Typical a context from a CMM will be returned.

Parameters

  graph | graph object
  node_pos | node position in the graph
  object | the optional object

Returns
  the data blob

Version
  Oyranos: 0.1.10

Since
  2009/06/12 (Oyranos: 0.1.10)

Date
  2009/06/12

References oyBlob_New(), oyFilterNode_s::oyFilterNode_Release(), oyFilterNodes_s::oyFilterNodes_Get(), and oyOBJECT_FILTER_GRAPH_S.

## Field Documentation

oyStruct_Copy_f oyBlob_s::copy

copy function

oyStruct_Release_f oyBlob_s::release

release function