![]() |
Oyranos Color Management System API |
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>
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... | |
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.
oyObject_s oyObject_Copy | ( | oyObject_s | object | ) |
object management
[in] | object | the object |
Referenced by oyObject_NewWithAllocators(), and oyProfile_s::oyProfile_SetChannelNames().
int oyObject_CopyNames | ( | oyObject_s | dest, |
oyObject_s | src | ||
) |
object naming
[in] | dest | the object to modify |
[in] | src | the object to take names from |
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 | ) |
get the identification number of a object
Function oyObject_GetId
Referenced by oyArray2d_s::oyArray2d_ToPPM_(), oyConversion_s::oyConversion_RunPixels(), oyFilterGraph_s::oyFilterGraph_ToText(), oyFilterNode_s::oyFilterNode_Connect(), oyFilterNode_s::oyFilterNode_Create(), oyFilterNode_s::oyFilterNode_GetId(), oyFilterPlug_s::oyFilterPlug_Callback(), oyFilterPlug_s::oyFilterPlug_ConnectIntoSocket(), oyFilterSocket_s::oyFilterSocket_Callback(), oyFilterSocket_s::oyFilterSocket_SignalToGraph(), oyImage_s::oyImage_CreateForDisplay(), oyImage_s::oyImage_ReadArray(), oyArray2d_s::oyImage_WritePPM(), oyMessageFormat(), oyObserver_s::oyStruct_EnableSignalSend(), oyObserver_s::oyStruct_ObserverCopyModel(), oyObserver_s::oyStruct_ObserverCopyObserver(), oyObserver_s::oyStruct_ObserverSignal(), and oyObserver_s::oyStructSignalForward_().
const oyChar * oyObject_GetName | ( | const oyObject_s | obj, |
oyNAME_e | type | ||
) |
object get names
Function oyObject_GetName
[in] | obj | the object |
[in] | type | name type |
References oyNAME_DESCRIPTION, oyName_get_(), oyOBJECT_OBJECT_S, and oyOptions_s::oyOptions_FindString().
Referenced by oyContextCollectData_(), oyFilterCore_s::oyFilterCore_GetText(), oyFilterGraph_s::oyFilterGraph_ToText(), oyFilterNode_s::oyFilterNode_GetText(), oyNamedColor_s::oyNamedColor_GetName(), oyNamedColors_s::oyNamedColors_GetColorName(), oyObject_CopyNames(), oyOption_s::oyOption_GetText(), oyOptions_s::oyOptions_GetText(), oyPointer_s::oyPointer_LookUpFromObject(), oyProfile_s::oyProfile_GetChannelName(), oyProfile_s::oyProfile_GetID(), oyProfile_s::oyProfile_GetText(), oyStruct_s::oyStruct_GetText(), oyStruct_s::oyStruct_GetTextFromModule(), oyStructList_s::oyStructList_GetID(), and oyStructList_s::oyStructList_GetText().
int oyObject_GetRefCount | ( | oyObject_s | obj | ) |
get the identification number of a object
Function oyObject_GetRefCount
References oyOBJECT_OBJECT_S.
int oyObject_Lock | ( | oyObject_s | object, |
const char * | marker, | ||
int | line | ||
) |
Lock a object.
Function oyObject_Lock
[in] | object | the object |
[in] | marker | debug hints, e.g. FILE |
[in] | line | source line number, e.g. LINE |
References oyOBJECT_OBJECT_S.
Referenced by oyFilterCore_s::oyFilterCore_SetCMMapi4_(), oyObject_UnRef(), oyProfile_s::oyProfile_GetMem(), oyProfile_s::oyProfile_GetTagById(), oyProfile_s::oyProfile_GetTagByPos(), oyProfile_s::oyProfile_GetTagCount(), oyProfile_s::oyProfile_TagMoveIn(), oyProfile_s::oyProfile_TagReleaseAt(), oyStructList_s::oyStructList_GetRef(), oyStructList_s::oyStructList_MoveIn(), oyStructList_s::oyStructList_ReleaseAt(), and oyStructList_s::oyStructList_Sort().
oyObject_s oyObject_New | ( | void | ) |
object management
References oyObject_NewWithAllocators().
Referenced by oyFilterNode_s::oyFilterNode_ShowConnector(), and oyObject_NewFrom().
oyObject_s oyObject_NewFrom | ( | oyObject_s | object | ) |
object management
[in] | object | the object |
References oyObject_New(), oyObject_NewWithAllocators(), oyOBJECT_OBJECT_S, and oyObject_SetNames().
Referenced by oyImage_s::oyImage_Create(), oyNamedColor_s::oyNamedColor_CreateWithName(), and oyProfile_s::oyProfile_GetChannelNames().
oyObject_s oyObject_NewWithAllocators | ( | oyAlloc_f | allocateFunc, |
oyDeAlloc_f | deallocateFunc | ||
) |
object management
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
References oyOBJECT_OBJECT_S, and oyObject_UnRef().
Referenced by oyFilterNode_s::oyFilterNode_ShowConnector(), oyNamedColor_s::oyNamedColor_CreateWithName(), and oyObject_NewWithAllocators().
int oyObject_SetName | ( | oyObject_s | object, |
const char * | text, | ||
oyNAME_e | type | ||
) |
object naming
[in] | object | the object |
[in] | text | the name to set |
[in] | type | the kind of name |
References oyNAME_DESCRIPTION, oyNAME_NAME, oyOBJECT_OBJECT_S, and oyOptions_s::oyOptions_SetFromText().
Referenced by oyConfigs_s::oyConfigs_FromDeviceClass(), oyContextCollectData_(), oyFilterCore_s::oyFilterCore_GetText(), oyFilterNode_s::oyFilterNode_GetText(), oyNamedColor_s::oyNamedColor_GetName(), oyNamedColors_s::oyNamedColors_GetColorName(), oyObject_SetNames(), oyOption_s::oyOption_GetText(), oyOptions_s::oyOptions_GetText(), oyProfile_s::oyProfile_GetID(), oyProfile_s::oyProfile_GetText(), and oyStructList_s::oyStructList_GetText().
int oyObject_SetNames | ( | oyObject_s | object, |
const char * | nick, | ||
const char * | name, | ||
const char * | description | ||
) |
object naming
[in] | object | the object |
[in] | nick | short name, about 1-4 letters |
[in] | name | the name should fit into usual labels |
[in] | description | the description |
References oyNAME_DESCRIPTION, oyNAME_NAME, oyNAME_NICK, oyOBJECT_OBJECT_S, and oyObject_SetName().
Referenced by oyNamedColor_s::oyNamedColor_CreateWithName(), 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.
[in] | o | the object to modify |
[in] | type | the parents struct type |
[in] | parent | a pointer to the parent struct |
Referenced by oyImage_s::oyImage_Create().
int oyObject_UnLock | ( | oyObject_s | object, |
const char * | marker, | ||
int | line | ||
) |
Unlock a object.
Function oyObject_UnLock
[in] | object | the object |
[in] | marker | debug hints, e.g. FILE |
[in] | line | source line number, e.g. LINE |
References oyOBJECT_OBJECT_S.
Referenced by oyFilterCore_s::oyFilterCore_SetCMMapi4_(), oyObject_UnRef(), oyProfile_s::oyProfile_GetMem(), oyProfile_s::oyProfile_GetTagById(), oyProfile_s::oyProfile_GetTagByPos(), oyProfile_s::oyProfile_GetTagCount(), oyProfile_s::oyProfile_TagMoveIn(), oyProfile_s::oyProfile_TagReleaseAt(), oyStructList_s::oyStructList_GetRef(), oyStructList_s::oyStructList_MoveIn(), oyStructList_s::oyStructList_ReleaseAt(), and oyStructList_s::oyStructList_Sort().
int oyObject_UnRef | ( | oyObject_s | obj | ) |
decrease the ref counter and return the above zero ref value
Function oyObject_UnRef
References oyObject_Lock(), oyOBJECT_NAMED_COLORS_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
[in] | object | the object |
[in] | marker | debug hints, e.g. FILE |
[in] | line | source line number, e.g. LINE |
References oyOBJECT_OBJECT_S.