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

Custom object handler. More...

#include <oyCMMobjectType_s.h>

Inheritance diagram for oyCMMobjectType_s:
Inheritance graph
Collaboration diagram for oyCMMobjectType_s:
Collaboration graph

Public Types

typedef const char *(* oyCMMobjectGetText_f) (oyStruct_s *object, oyNAME_e type, int flags)
 build a text string from a given object More...
 
typedef oyStruct_s *(* oyCMMobjectLoadFromMem_f) (size_t buf_size, const oyPointer buf, uint32_t flags, oyObject_s object)
 load a filter object from a in memory data blob More...
 
typedef int(* oyCMMobjectScan_f) (oyPointer data, size_t size, char **registration, char **name, oyAlloc_f allocateFunc)
 load a filter object from a in memory data blob More...
 

Public Member Functions

OYAPI oyCMMobjectType_s *OYEXPORT oyCMMobjectType_New (oyObject_s object)
 allocate a new CMMobjectType object More...
 
OYAPI oyCMMobjectType_s *OYEXPORT oyCMMobjectType_Copy (oyCMMobjectType_s *cmmobjecttype, oyObject_s object)
 copy or reference a CMMobjectType object More...
 
OYAPI int OYEXPORT oyCMMobjectType_Release (oyCMMobjectType_s **cmmobjecttype)
 release and possibly deallocate a oyCMMobjectType_s object More...
 
void oyCMMobjectType_Release__Members (oyCMMobjectType_s_ *cmmobjecttype)
 Custom CMMobjectType destructor. More...
 
int oyCMMobjectType_Init__Members (oyCMMobjectType_s_ *cmmobjecttype)
 Custom CMMobjectType constructor. More...
 
int oyCMMobjectType_Copy__Members (oyCMMobjectType_s_ *dst, oyCMMobjectType_s_ *src)
 Custom CMMobjectType copy constructor. 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 object handler.

Member Typedef Documentation

typedef const char*(* oyCMMobjectGetText_f) (oyStruct_s *object, oyNAME_e type, int flags)

build a text string from a given object

typedef oyCMMobjectGetText_f

Serialise a object into:

  • oyNAME_NICK: XML ID
  • oyNAME_NAME: XML
  • oyNAME_DESCRIPTION: ??

For type information the object argument is omitted. Then the function shall programatically tell in oyNAME_NICK about the object type, e.g. "oyProfile_s", in oyNAME_NAME translated about its intented usage, e.g. i18n("ICC profile") and give with oyNAME_DESCRIPTION some further long informations.

Note: Dynamically generated informations can be stored in the oyStruct_s::oy::name_ member and then returned by the function. Oyranos will typical look first at that oyObject_s member and then ask this function to get the information.

See also
oyObject_SetName()
Parameters
[in]objectthe object, omit to get a general text
[out]typethe string type
[in]flagsfor future use
Returns
0 on success; error >= 1; unknown < 0
Version
Oyranos: 0.1.10
Since
2008/12/24 (Oyranos: 0.1.10)
Date
2009/09/14
typedef oyStruct_s*(* oyCMMobjectLoadFromMem_f) (size_t buf_size, const oyPointer buf, uint32_t flags, oyObject_s object)

load a filter object from a in memory data blob

typedef oyCMMobjectLoadFromMem_f

Parameters
[in]buf_sizedata size
[in]bufdata blob
[in]flagsfor future use
[in]objectthe optional base
Returns
the object
Version
Oyranos: 0.1.10
Since
2008/11/22 (Oyranos: 0.1.9)
Date
2009/09/14
typedef int(* oyCMMobjectScan_f) (oyPointer data, size_t size, char **registration, char **name, oyAlloc_f allocateFunc)

load a filter object from a in memory data blob

typedef oyCMMobjectScan_f

Parameters
[in]datadata blob
[in]sizedata size
[out]registrationfilter registration string
[out]namefilter name
[in]allocateFunce.g. malloc
Returns
0 on success; error >= 1; unknown < 0
Version
Oyranos: 0.1.10
Since
2008/11/22 (Oyranos: 0.1.9)
Date
2009/09/14

Member Function Documentation

OYAPI oyCMMobjectType_s *OYEXPORT oyCMMobjectType_Copy ( oyCMMobjectType_s cmmobjecttype,
oyObject_s  object 
)

copy or reference a CMMobjectType object

Function oyCMMobjectType_Copy

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

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

References oyOBJECT_CMM_OBJECT_TYPE_S.

Referenced by oyCMMobjectType_Copy__Members().

int oyCMMobjectType_Copy__Members ( oyCMMobjectType_s_ *  dst,
oyCMMobjectType_s_ *  src 
)
int oyCMMobjectType_Init__Members ( oyCMMobjectType_s_ *  cmmobjecttype)

Custom CMMobjectType constructor.

Function oyCMMobjectType_Init__Members

Referenced by oyCMMobjectType_Copy__Members().

OYAPI oyCMMobjectType_s *OYEXPORT oyCMMobjectType_New ( oyObject_s  object)

allocate a new CMMobjectType object

Function oyCMMobjectType_New

References oyOBJECT_OBJECT_S.

Referenced by oyCMMobjectType_Copy__Members().

OYAPI int OYEXPORT oyCMMobjectType_Release ( oyCMMobjectType_s **  cmmobjecttype)

release and possibly deallocate a oyCMMobjectType_s object

Function oyCMMobjectType_Release

Parameters
[in,out]cmmobjecttypeCMMobjectType struct object

References oyOBJECT_CMM_OBJECT_TYPE_S.

Referenced by oyCMMobjectType_Copy__Members().

void oyCMMobjectType_Release__Members ( oyCMMobjectType_s_ *  cmmobjecttype)

Custom CMMobjectType destructor.

Function oyCMMobjectType_Release__Members

Referenced by oyCMMobjectType_Copy__Members().

Field Documentation

oyStruct_Copy_f oyCMMobjectType_s::copy

Copy function.

oyObject_s oyCMMobjectType_s::oy_

Oyranos internal object.

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

oyStruct_Release_f oyCMMobjectType_s::release

Release function.

Referenced by oyCMMobjectType_Copy__Members().

const oyOBJECT_e oyCMMobjectType_s::type_

Type of object.

The struct type tells Oyranos how to interprete hidden fields.