Oyranos  git-devel
Oyranos is a full featured Color Management System
Public Member Functions | Data Fields
oyBlob_s Struct Reference

A data blob object. More...

#include <oyBlob_s.h>

Inheritance diagram for oyBlob_s:
Inheritance graph
Collaboration diagram for oyBlob_s:
Collaboration graph

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...
 
- 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 data blob object.

Version
Oyranos: 0.2.1
Since
2009/01/06 (Oyranos: 0.1.9)
Date
2011/01/19
Examples:
image_display.cpp.

Member Function Documentation

◆ oyBlob_Copy()

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]blobBlob struct object
objectNULL - means reference, the optional object triggers a real copy

◆ oyBlob_GetPointer()

oyPointer oyBlob_GetPointer ( oyBlob_s blob)

get value from a data blob

Function oyBlob_GetPointer

Parameters
[in]blobthe data blob
Returns
the data pointer
Version
Oyranos: 0.2.1
Since
2011/01/17 (Oyranos: 0.2.1)
Date
2011/01/17

◆ oyBlob_GetSize()

size_t oyBlob_GetSize ( oyBlob_s blob)

get size from a data blob

Function oyBlob_GetSize

Parameters
[in]blobthe data blob
Returns
the data size
Version
Oyranos: 0.2.1
Since
2011/01/17 (Oyranos: 0.2.1)
Date
2011/01/17

◆ oyBlob_GetType()

const char * oyBlob_GetType ( oyBlob_s blob)

get type from a data blob

Function oyBlob_GetType

Parameters
[in]blobthe data blob
Returns
the data type
Version
Oyranos: 0.2.1
Since
2011/01/17 (Oyranos: 0.2.1)
Date
2011/01/17

◆ oyBlob_New()

OYAPI oyBlob_s *OYEXPORT oyBlob_New ( oyObject_s  object)

allocate a new Blob object

Function oyBlob_New

◆ oyBlob_Release()

OYAPI int OYEXPORT oyBlob_Release ( oyBlob_s **  blob)

release and possibly deallocate a oyBlob_s object

Function oyBlob_Release

Parameters
[in,out]blobBlob struct object

◆ oyBlob_SetFromData()

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]blobthe data blob
[in]ptrcopy the data into the blob object
[in]sizedata size; 0 means the pointer is not owned by the object.
[in]typedata 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

◆ oyBlob_SetFromStatic()

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]blobthe data blob
[in]ptrmove the data into the blob object
[in]sizedata size
[in]typedata 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

Field Documentation

◆ copy

oyStruct_Copy_f oyBlob_s::copy

Copy function.

◆ oy_

oyObject_s oyBlob_s::oy_

Oyranos internal object.

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

◆ release

oyStruct_Release_f oyBlob_s::release

Release function.

◆ type_

const oyOBJECT_e oyBlob_s::type_

Type of object.

The struct type tells Oyranos how to interprete hidden fields.