Oyranos Colour Management System API
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Public Member Functions
oyObject_s Struct Reference

Oyranos structure baseThe base object of Oyranos object system is self contained. It can be handled by the belonging function set. Complex objects for user interaction should almost all be derived from this struct.
The memory management can be controlled by the user and will affect internal and derived data. More...

#include <oyObject_s_.h>

Collaboration diagram for oyObject_s:
Collaboration graph

Public Member Functions

oyObject_s oyObject_New (void)
 object management More...
 
oyObject_s oyObject_NewWithAllocators (oyAlloc_f allocateFunc, oyDeAlloc_f deallocateFunc)
 object management More...
 
oyObject_s oyObject_NewFrom (oyObject_s object)
 object management More...
 
oyObject_s oyObject_Copy (oyObject_s object)
 object management More...
 
int oyObject_Release (oyObject_s *obj)
 release an Oyranos object More...
 
oyObject_s oyObject_SetParent (oyObject_s o, oyOBJECT_e type, oyPointer parent)
 custom object memory managers More...
 
int oyObject_SetName (oyObject_s object, const char *text, oyNAME_e type)
 object naming More...
 
int oyObject_SetNames (oyObject_s object, const char *nick, const char *name, const char *description)
 object naming More...
 
int oyObject_CopyNames (oyObject_s dest, oyObject_s src)
 object naming More...
 
const oyChar * oyObject_GetName (const oyObject_s obj, oyNAME_e type)
 object get names More...
 
int oyObject_Lock (oyObject_s object, const char *marker, int line)
 Lock a object. More...
 
int oyObject_UnLock (oyObject_s object, const char *marker, int line)
 Unlock a object. More...
 
int oyObject_UnSetLocking (oyObject_s object, const char *marker, int line)
 remove a object's lock pointer More...
 
int oyObject_GetRefCount (oyObject_s obj)
 get the identification number of a object More...
 
int oyObject_UnRef (oyObject_s obj)
 decrease the ref counter and return the above zero ref value More...
 
int oyObject_GetId (oyObject_s object)
 get the identification number of a object More...
 

Detailed Description

Oyranos structure base

The base object of Oyranos object system is self contained. It can be handled by the belonging function set. Complex objects for user interaction should almost all be derived from this struct.
The memory management can be controlled by the user and will affect internal and derived data.

Note
New templates will not be created automaticly [notemplates]
Version
Oyranos: 0.1.10
Since
2007/10/00 (Oyranos: 0.1.8)
Date
2009/03/01

Member Function Documentation

oyObject_s oyObject_Copy ( oyObject_s  object)

object management

Parameters
[in]objectthe object
Since
Oyranos: version 0.1.8
Date
november 2007 (API 0.1.8)

Referenced by oyObject_NewWithAllocators(), and oyProfile_s::oyProfile_SetChannelNames().

int oyObject_CopyNames ( oyObject_s  dest,
oyObject_s  src 
)

object naming

Parameters
[in]destthe object to modify
[in]srcthe object to take names from
Version
Oyranos: 0.3.0
Since
2011/01/31 (Oyranos: 0.3.0)
Date
2011/01/31

References oyNAME_DESCRIPTION, oyNAME_NAME, oyNAME_NICK, oyObject_GetName(), oyOBJECT_OBJECT_S, and oyObject_SetNames().

Referenced by oyConnector_s::oyConnector_Copy__Members().

int oyObject_GetId ( oyObject_s  object)
const oyChar * oyObject_GetName ( const oyObject_s  obj,
oyNAME_e  type 
)
int oyObject_GetRefCount ( oyObject_s  obj)

get the identification number of a object

Function oyObject_GetRefCount

Version
Oyranos: 0.1.10
Since
2009/02/19 (Oyranos: 0.1.10)
Date
2009/02/19

References oyOBJECT_OBJECT_S.

int oyObject_Lock ( oyObject_s  object,
const char *  marker,
int  line 
)
oyObject_s oyObject_New ( void  )

object management

Version
Oyranos: 0.1.10
Since
2007/11/00 (Oyranos: 0.1.8)
Date
2009/06/02

References oyObject_NewWithAllocators().

Referenced by oyFilterNode_s::oyFilterNode_ShowConnector(), and oyObject_NewFrom().

oyObject_s oyObject_NewFrom ( oyObject_s  object)

object management

Parameters
[in]objectthe object
Since
Oyranos: version 0.1.8
Date
17 december 2007 (API 0.1.8)

References oyObject_New(), oyObject_NewWithAllocators(), oyOBJECT_OBJECT_S, and oyObject_SetNames().

Referenced by oyImage_s::oyImage_Create(), and oyProfile_s::oyProfile_GetChannelNames().

oyObject_s oyObject_NewWithAllocators ( oyAlloc_f  allocateFunc,
oyDeAlloc_f  deallocateFunc 
)

object management

Version
Oyranos: 0.1.10
Since
2007/11/00 (Oyranos: 0.1.8)
Date
2009/06/02

References oyObject_Copy(), oyOBJECT_OBJECT_S, oyObject_Release(), and oyVersion().

Referenced by oyObject_New(), and oyObject_NewFrom().

int oyObject_Release ( oyObject_s obj)

release an Oyranos object

Since
Oyranos: version 0.1.8
Date
november 2007 (API 0.1.8)

References oyOBJECT_OBJECT_S, and oyObject_UnRef().

Referenced by oyFilterNode_s::oyFilterNode_ShowConnector(), and oyObject_NewWithAllocators().

int oyObject_SetName ( oyObject_s  object,
const char *  text,
oyNAME_e  type 
)
int oyObject_SetNames ( oyObject_s  object,
const char *  nick,
const char *  name,
const char *  description 
)

object naming

Parameters
[in]objectthe object
[in]nickshort name, about 1-4 letters
[in]namethe name should fit into usual labels
[in]descriptionthe description
Since
Oyranos: version 0.1.8
Date
november 2007 (API 0.1.8)

References oyNAME_DESCRIPTION, oyNAME_NAME, oyNAME_NICK, oyOBJECT_OBJECT_S, and oyObject_SetName().

Referenced by oyObject_CopyNames(), oyObject_NewFrom(), oyProfile_s::oyProfile_GetChannelNames(), and oyProfile_s::oyProfile_GetMem().

oyObject_s oyObject_SetParent ( oyObject_s  o,
oyOBJECT_e  type,
oyPointer  parent 
)

custom object memory managers

Normally a sub object should not know about its parent structure, but follow a hierarchical design. We break this here to allow the observation of all objects including the parents structures as a feature in oyObject_s. Then we just need a list of all oyObject_s objects and have an overview. This facility is intented to work even without debugging tools.

Each inheritent initialiser should call this function separately during normal object allocation and class initialisation.

Parameters
[in]othe object to modify
[in]typethe parents struct type
[in]parenta pointer to the parent struct
Version
Oyranos: 0.3.0 2011/02/02
Since
2007/11/00 (API 0.1.8)

Referenced by oyImage_s::oyImage_Create().

int oyObject_UnLock ( oyObject_s  object,
const char *  marker,
int  line 
)
int oyObject_UnRef ( oyObject_s  obj)

decrease the ref counter and return the above zero ref value

Function oyObject_UnRef

Version
Oyranos: 0.1.8
Date
2008/02/07
Since
2008/02/07 (Oyranos: 0.1.8)

References oyObject_Lock(), oyOBJECT_NAMED_COLOURS_S, oyOBJECT_OBJECT_S, oyObject_UnLock(), oyStruct_GetInfo(), and oyStructTypeToText().

Referenced by oyFilterSocket_s::oyFilterSocket_Release__Members(), and oyObject_Release().

int oyObject_UnSetLocking ( oyObject_s  object,
const char *  marker,
int  line 
)

remove a object's lock pointer

Function oyObject_UnSetLocking

See Also
oyThreadLockingSet
Parameters
[in]objectthe object
[in]markerdebug hints, e.g. FILE
[in]linesource line number, e.g. LINE
Returns
error
Since
Oyranos: version 0.1.8
Date
2008/01/22 (API 0.1.8)

References oyOBJECT_OBJECT_S.