![]() |
Oyranos
git-devel
Oyranos is a full featured Color Management System
|
Basic objects to make all higher level object types happy. More...
![]() |
Data Structures | |
struct | oyHash_s |
A cache entry. More... | |
struct | oyList_s |
a pointer list More... | |
struct | oyName_s |
Oyranos Name structure. More... | |
struct | oyObject_s |
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... | |
struct | oyObserver_s |
Oyranos object observers. More... | |
struct | oyPointer_s |
custom pointer More... | |
struct | oyStruct_s |
Oyranos base structure. More... | |
struct | oyStructList_s |
a pointer list More... | |
Macros | |
#define | oyOBJECT_MAX_CUSTOM 1024 |
#define | oyOBJECT_MAX_STRUCT 300 |
Typedefs | |
typedef struct oyObject_s_ * | oyObject_s |
Functions | |
oyObject_s | oyObject_New (const char *name) |
object management More... | |
oyObject_s | oyObject_NewWithAllocators (oyAlloc_f allocateFunc, oyDeAlloc_f deallocateFunc, const char *name) |
object management More... | |
oyObject_s | oyObject_NewFrom (oyObject_s object, const char *name) |
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 managersNormally 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. 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... | |
OYAPI oyAlloc_f OYEXPORT | oyObject_GetAlloc (oyObject_s object) |
get objects allocator More... | |
OYAPI oyDeAlloc_f OYEXPORT | oyObject_GetDeAlloc (oyObject_s object) |
get objects deallocator More... | |
int | oyObject_GetId (oyObject_s object) |
get the identification number of a object More... | |
OYAPI const char *OYEXPORT | oyObject_Show (oyObject_s object) |
Print object informations. More... | |
void | oyObjectTreePrint (int flags, const char *comment) |
Print the current object trees to stderr.Probably the most simple and still useful function from the Object tree debug APIs. It prints to stderr with OY_DEBUG_OBJECTS/oy_debug_objects set. More... | |
Basic objects to make all higher level object types happy.
#define oyOBJECT_MAX_CUSTOM 1024 |
keep a custom object type below this number
#define oyOBJECT_MAX_STRUCT 300 |
keep a custom object type below this number
typedef struct oyObject_s_* oyObject_s |
Declare oyObject_s Globally
enum oyNAME_e |
Information levelMessages consist of text, which contains information depending on the purpose. The information provider obtains with this enum a brief request, what to put into a information request.
enum oyOBJECT_e |
Oyranos structure type.
Enumerator | |
---|---|
oyOBJECT_OBJECT_S | |
oyOBJECT_MONITOR_S | oyMonitor_s |
oyOBJECT_NAMED_COLOR_S | |
oyOBJECT_NAMED_COLORS_S | |
oyOBJECT_PROFILE_S | |
oyOBJECT_PROFILE_TAG_S | |
oyOBJECT_PROFILES_S | |
oyOBJECT_OPTION_S | |
oyOBJECT_OPTIONS_S | |
oyOBJECT_RECTANGLE_S | |
oyOBJECT_IMAGE_S | |
oyOBJECT_ARRAY2D_S | |
oyOBJECT_CONNECTOR_S | |
oyOBJECT_CONNECTOR_IMAGING_S | |
oyOBJECT_CONNECTOR_MAX_S | not defined |
oyOBJECT_FILTER_PLUG_S | |
oyOBJECT_FILTER_PLUGS_S | |
oyOBJECT_FILTER_SOCKET_S | |
oyOBJECT_FILTER_CORE_S | |
oyOBJECT_FILTER_CORES_S | oyFilterCores_s |
oyOBJECT_FILTER_NODE_S | |
oyOBJECT_FILTER_NODES_S | |
oyOBJECT_FILTER_GRAPH_S | |
oyOBJECT_PIXEL_ACCESS_S | |
oyOBJECT_CONVERSION_S | |
oyOBJECT_CMM_HANDLE_S | oyCMMhandle_s |
oyOBJECT_POINTER_S | |
oyOBJECT_CMM_INFO_S | |
oyOBJECT_CMM_API_S | |
oyOBJECT_CMM_APIS_S | |
oyOBJECT_CMM_API_FILTER_S | |
oyOBJECT_CMM_API1_S | oyCMMapi1_s |
oyOBJECT_CMM_API2_S | oyCMMapi2_s |
oyOBJECT_CMM_API3_S | |
oyOBJECT_CMM_API4_S | |
oyOBJECT_CMM_API5_S | |
oyOBJECT_CMM_API6_S | |
oyOBJECT_CMM_API7_S | |
oyOBJECT_CMM_DATA_TYPES_S | oyCMMDataTypes_s |
oyOBJECT_CMM_API8_S | |
oyOBJECT_CMM_API9_S | |
oyOBJECT_CMM_API10_S | |
oyOBJECT_CMM_UI_S | |
oyOBJECT_CMM_OBJECT_TYPE_S | |
oyOBJECT_CMM_API_FILTERS_S | |
oyOBJECT_CMM_API_MAX | not defined |
oyOBJECT_ICON_S | |
oyOBJECT_MODULE_S | oyModule_s |
oyOBJECT_EXTERNFUNC_S | oyExternFunc_s |
oyOBJECT_NAME_S | |
oyOBJECT_COMP_S_ | oyComp_s_ |
oyOBJECT_FILE_LIST_S_ | oyFileList_s_ |
oyOBJECT_HASH_S | |
oyOBJECT_STRUCT_LIST_S | |
oyOBJECT_BLOB_S | |
oyOBJECT_CONFIG_S | |
oyOBJECT_CONFIGS_S | |
oyOBJECT_UI_HANDLER_S | oyUiHandler_s |
oyOBJECT_FORMS_ARGS_S | |
oyOBJECT_CALLBACK_S | oyCallback_s |
oyOBJECT_OBSERVER_S | |
oyOBJECT_CONF_DOMAIN_S | |
oyOBJECT_INFO_STATIC_S | |
oyOBJECT_LIST_S | |
oyOBJECT_LIS_S | oyLis_s dummy |
oyOBJECT_JOB_S | oyJob_s dummy |
oyOBJECT_DB_API_S | oyDbAPI_s |
oyOBJECT_MONITOR_HOOKS_S | oyMonitorHooks_s |
oyOBJECT_MONITOR_HOOKS2_S | oyMonitorHooks2_s |
oyOBJECT_MONITOR_HOOKS3_S |
enum oySIGNAL_e |
observer signalsThe signal types are similiar to the graph event enum oyCONNECTOR_EVENT_e.
oyObject_s oyObject_Copy | ( | oyObject_s | object | ) |
object management
[in] | object | the object |
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().
OYAPI oyAlloc_f OYEXPORT oyObject_GetAlloc | ( | oyObject_s | object | ) |
get objects allocator
Function oyObject_GetAlloc
object | the object |
Referenced by oyPixelAccess_s::oyPixelAccess_Show().
OYAPI oyDeAlloc_f OYEXPORT oyObject_GetDeAlloc | ( | oyObject_s | object | ) |
get objects deallocator
Function oyObject_GetDeAlloc
object | the object |
Referenced by oyPixelAccess_s::oyPixelAccess_Show().
int oyObject_GetId | ( | oyObject_s | object | ) |
get the identification number of a object
Function oyObject_GetId
References oy_debug_objects, OY_DEBUG_OBJECTS, oyObject_Show(), oyStruct_s::oyStructTypeToText(), and oyStruct_s::type_.
Referenced by oyObject_UnRef().
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 oyObject_CopyNames(), oyPointer_s::oyPointer_LookUpFromObject(), and oyStructList_s::oyStructList_GetName().
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 oyObject_UnRef().
oyObject_s oyObject_New | ( | const char * | name | ) |
object management
name | initial track ID passed to oyObject_Track() |
References oyObject_NewWithAllocators().
oyObject_s oyObject_NewFrom | ( | oyObject_s | object, |
const char * | name | ||
) |
object management
[in] | object | the object |
[in] | name | a debug string containing the parent class |
References oyOBJECT_OBJECT_S.
Referenced by oyFormsArgs_s::oyFormsArgs_New().
oyObject_s oyObject_NewWithAllocators | ( | oyAlloc_f | allocateFunc, |
oyDeAlloc_f | deallocateFunc, | ||
const char * | name | ||
) |
object management
Referenced by oyObject_New().
int oyObject_Release | ( | oyObject_s * | obj | ) |
release an Oyranos object
References oyOBJECT_OBJECT_S.
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, and oyOBJECT_OBJECT_S.
Referenced by oyObject_SetNames(), and oyStructList_s::oyStructList_AddName().
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 oyObject_CopyNames().
oyObject_s oyObject_SetParent | ( | oyObject_s | o, |
oyOBJECT_e | type, | ||
oyPointer | parent | ||
) |
custom object memory managersNormally 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 |
OYAPI const char* OYEXPORT oyObject_Show | ( | oyObject_s | object | ) |
Print object informations.
Function oyObject_Show
Referenced by oyObject_GetId().
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.
int oyObject_UnRef | ( | oyObject_s | obj | ) |
decrease the ref counter and return the above zero ref value
Function oyObject_UnRef
References oy_debug, oy_debug_objects, oyObject_GetId(), oyObject_Lock(), oyOBJECT_OBJECT_S, and oyStruct_s::oyStructTypeToText().
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.
void oyObjectTreePrint | ( | int | flags, |
const char * | comment | ||
) |
Print the current object trees to stderr.Probably the most simple and still useful function from the Object tree debug APIs. It prints to stderr with OY_DEBUG_OBJECTS/oy_debug_objects set.
flags | use 15 for all flags
|
comment | a title comment for the graph; optional |
References oy_debug_objects.