Generic Objects
[Miscellaneous]

Collaboration diagram for Generic Objects:

Data Structures

struct  oyStruct_s
 Oyranos base structure

All Oyranos structures should be castable to this basic one. More...

struct  oyName_s
 Oyranos name structure. More...
struct  oyObject_s
 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. More...


Enumerations

enum  oyOBJECT_e { ,
  oyOBJECT_OBJECT_S, oyOBJECT_MONITOR_S, oyOBJECT_NAMED_COLOUR_S, oyOBJECT_NAMED_COLOURS_S,
  oyOBJECT_PROFILE_S, oyOBJECT_PROFILE_TAG_S, oyOBJECT_PROFILES_S, oyOBJECT_OPTION_S,
  oyOBJECT_OPTIONS_S, oyOBJECT_REGION_S, oyOBJECT_IMAGE_S, oyOBJECT_ARRAY2D_S,
  oyOBJECT_COLOUR_CONVERSION_S, oyOBJECT_CONNECTOR_S, oyOBJECT_FILTER_PLUG_S, oyOBJECT_FILTER_PLUGS_S,
  oyOBJECT_FILTER_SOCKET_S, oyOBJECT_FILTER_S, oyOBJECT_FILTERS_S, oyOBJECT_FILTER_NODE_S,
  oyOBJECT_PIXEL_ACCESS_S, oyOBJECT_CONVERSION_S, oyOBJECT_CMM_HANDLE_S = 50, oyOBJECT_CMM_POINTER_S,
  oyOBJECT_CMM_INFO_S, oyOBJECT_CMM_API_S, oyOBJECT_CMM_API1_S, oyOBJECT_CMM_API2_S,
  oyOBJECT_CMM_API3_S, oyOBJECT_CMM_API4_S, oyOBJECT_CMM_API5_S, oyOBJECT_CMM_DATA_TYPES_S,
  oyOBJECT_CMM_API_MAX, oyOBJECT_ICON_S = 80, oyOBJECT_MODULE_S, oyOBJECT_EXTERNFUNC_S,
  oyOBJECT_NAME_S, oyOBJECT_COMP_S_, oyOBJECT_FILE_LIST_S_, oyOBJECT_HASH_S,
  oyOBJECT_HANDLE_S, oyOBJECT_STRUCT_LIST_S
}
 Oyranos structure type. More...
enum  oyNAME_e { oyNAME_NAME, oyNAME_NICK, oyNAME_DESCRIPTION }
 describe the base types of a oyObject_s name More...

Functions

const char * oyStruct_TypeToText (const oyStruct_s *oy_struct)
 Objects type to small string.
oyName_soyName_new (oyObject_s object)
 oyName_s new
oyName_soyName_copy (oyName_s *obj, oyObject_s object)
 oyName_s copy
int oyName_release (oyName_s **obj)
 oyName_s deallocation
int oyTextboolean_ (const char *text_a, const char *text_b, oyBOOLEAN_e type)
 test a boolean operator
int oyName_boolean (oyName_s *name_a, oyName_s *name_b, oyNAME_e name_type, oyBOOLEAN_e type)
 test a boolean operator
oyStruct_soyStructList_GetRefType (oyStructList_s *list, int pos, oyOBJECT_e type)
 oyStructList_s pointer access
int oyStructList_Count (oyStructList_s *list)
 oyStructList_s count
int oyName_s::oyName_releaseMembers (oyName_s **obj)
 release only members
const char * oyStructList_s::oyStructList_GetID (oyStructList_s *s, int intent_spaces, uint32_t flags)
 eventually build and obtain the lists member names
const char * oyStructList_s::oyStructList_GetText (oyStructList_s *s, oyNAME_e name_type, int intent_spaces, uint32_t flags)
 build and obtain the lists member names
int oyStructList_s::oyStructList_Clear (oyStructList_s *s)
 release all listed objects
int oyStructList_s::oyStructList_CopyFrom (oyStructList_s *list, oyStructList_s *from, oyObject_s object)
 clean "list" and copy all listed objects from "from" to "list".
oyObject_s oyObject_s::oyObject_New (void)
 object management
oyObject_s oyObject_s::oyObject_NewWithAllocators (oyAlloc_f allocateFunc, oyDeAlloc_f deallocateFunc)
 object management
oyObject_s oyObject_s::oyObject_NewFrom (oyObject_s object)
 object management
oyObject_s oyObject_s::oyObject_Copy (oyObject_s object)
 object management
int oyObject_s::oyObject_Release (oyObject_s *obj)
 release an Oyranos object
oyObject_s oyObject_s::oyObject_SetParent (oyObject_s o, oyOBJECT_e type, oyPointer parent)
 custom object memory managers
int oyObject_s::oyObject_SetName (oyObject_s object, const char *text, oyNAME_e type)
 object naming
int oyObject_s::oyObject_SetNames (oyObject_s object, const char *nick, const char *name, const char *description)
 object naming
const oyChar * oyObject_s::oyObject_GetName (const oyObject_s obj, oyNAME_e type)
 object get names
int oyObject_s::oyObject_Lock (oyObject_s object, const char *marker, int line)
 Lock a object.
int oyObject_s::oyObject_UnLock (oyObject_s object, const char *marker, int line)
 Unlock a object.
int oyObject_s::oyObject_UnSetLocking (oyObject_s object, const char *marker, int line)
 remove a object's lock pointer
int oyObject_s::oyObject_GetId (oyObject_s obj)
 get the identification number of a object

Enumeration Type Documentation

enum oyNAME_e

describe the base types of a oyObject_s name

Version:
Oyranos: 0.1.8
Since:
2007/10/00 (Oyranos: 0.1.8)
Date:
2007/10/00
Enumerator:
oyNAME_NAME  compatible to oyName_s/oyObject_s
oyNAME_NICK  compatible to oyName_s/oyObject_s
oyNAME_DESCRIPTION  compatible to oyName_s/oyObject_s

enum oyOBJECT_e

Oyranos structure type.

Version:
Oyranos: 0.1.8
Since:
2007/11/22 (Oyranos: 0.1.x)
Date:
2008/07/31
Enumerator:
oyOBJECT_OBJECT_S  oyObject_s
oyOBJECT_MONITOR_S  oyMonitor_s
oyOBJECT_NAMED_COLOUR_S  oyNamedColour_s
oyOBJECT_NAMED_COLOURS_S  oyNamedColours_s
oyOBJECT_PROFILE_S  oyProfile_s
oyOBJECT_PROFILE_TAG_S  oyProfileTag_s
oyOBJECT_PROFILES_S  oyProfiles_s
oyOBJECT_OPTION_S  oyOption_s
oyOBJECT_OPTIONS_S  oyOptions_s
oyOBJECT_REGION_S  oyRegion_s
oyOBJECT_IMAGE_S  oyImage_s
oyOBJECT_ARRAY2D_S  oyArray2d_s
oyOBJECT_COLOUR_CONVERSION_S  oyColourConversion_s
oyOBJECT_CONNECTOR_S  oyConnector_s
oyOBJECT_FILTER_PLUG_S  oyFilterPlug_s
oyOBJECT_FILTER_PLUGS_S  oyFilterPlugs_s
oyOBJECT_FILTER_SOCKET_S  oyFilterSocket_s
oyOBJECT_FILTER_S  oyFilter_s
oyOBJECT_FILTERS_S  oyFilters_s
oyOBJECT_FILTER_NODE_S  oyFilterNode_s
oyOBJECT_PIXEL_ACCESS_S  oyPixelAccess_s
oyOBJECT_CONVERSION_S  oyConversion_s
oyOBJECT_CMM_HANDLE_S  oyCMMhandle_s
oyOBJECT_CMM_POINTER_S  oyCMMptr_s
oyOBJECT_CMM_INFO_S  oyCMMInfo_s
oyOBJECT_CMM_API_S  oyCMMapi_s
oyOBJECT_CMM_API1_S  oyCMMapi1_s
oyOBJECT_CMM_API2_S  oyCMMapi2_s
oyOBJECT_CMM_API3_S  oyCMMapi3_s
oyOBJECT_CMM_API4_S  oyCMMapi4_s
oyOBJECT_CMM_API5_S  oyCMMapi5_s
oyOBJECT_CMM_DATA_TYPES_S  oyCMMDataTypes_s
oyOBJECT_CMM_API_MAX  not defined
oyOBJECT_ICON_S  oyIcon_s
oyOBJECT_MODULE_S  oyModule_s
oyOBJECT_EXTERNFUNC_S  oyExternFunc_s
oyOBJECT_NAME_S  oyName_s
oyOBJECT_COMP_S_  oyComp_s_
oyOBJECT_FILE_LIST_S_  oyFileList_s_
oyOBJECT_HASH_S  oyHash_s
oyOBJECT_HANDLE_S  oyHandle_s
oyOBJECT_STRUCT_LIST_S  oyStructList_s


Function Documentation

int oyName_boolean ( oyName_s name_a,
oyName_s name_b,
oyNAME_e  name_type,
oyBOOLEAN_e  type 
)

test a boolean operator

The function requires to receive proper object arguments and valid ranges.

Returns:
-1 for undefined, 1 - true, 0 - false
Version:
Oyranos: 0.1.8
Since:
2008/06/28 (Oyranos: 0.1.8)
Date:
2008/06/28

References oyName_s::description, oyName_s::name, oyName_s::nick, oyBOOLEAN_UNION, oyNAME_DESCRIPTION, oyNAME_NAME, oyNAME_NICK, and oyTextboolean_().

oyName_s* oyName_copy ( oyName_s obj,
oyObject_s  object 
)

oyName_s copy

Since:
Oyranos: version 0.1.8
Date:
2008/01/08 (API 0.1.8)

References oyName_s::description, oyName_s::lang, oyName_s::name, oyName_s::nick, oyNAME_DESCRIPTION, oyNAME_NAME, oyName_new(), and oyNAME_NICK.

Referenced by oyName_new().

oyName_s* oyName_new ( oyObject_s  object  ) 

oyName_s new

Since:
Oyranos: version 0.1.8
Date:
2008/01/08 (API 0.1.8)

References oyName_copy(), oyName_release(), oyOBJECT_NAME_S, and oyName_s::release.

Referenced by oyName_copy().

int oyName_release ( oyName_s **  obj  ) 

oyName_s deallocation

Since:
Oyranos: version 0.1.8
Date:
2008/01/08 (API 0.1.8)

Referenced by oyName_new().

int oyName_releaseMembers ( oyName_s **  obj  )  [related, inherited]

release only members

Function oyName_releaseMembers

Useful to release the member strings but not the struct itself, which can in this case be static. Deallocation uses oyDeAllocateFunc_().

Version:
Oyranos: 0.1.9
Since:
2008/11/13 (Oyranos: 0.1.9)
Date:
2008/11/13

References oyName_s::description, oyName_s::name, and oyName_s::nick.

oyObject_s oyObject_Copy ( oyObject_s  object  )  [related, inherited]

int oyObject_GetId ( oyObject_s  obj  )  [related, inherited]

get the identification number of a object

Function oyObject_GetId

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

Referenced by oyConversion_s::oyConversion_FilterAdd(), oyFilterNode_s::oyFilterNode_Create(), oyFilterPlug_s::oyFilterPlug_Callback(), oyFilterSocket_s::oyFilterSocket_Callback(), and oyMessageFunc_().

const oyChar * oyObject_GetName ( const oyObject_s  obj,
oyNAME_e  type 
) [related, inherited]

int oyObject_Lock ( oyObject_s  object,
const char *  marker,
int  line 
) [related, inherited]

Lock a object.

Function oyObject_Lock

See also:
oyThreadLockingSet
Parameters:
[in] object the object
[in] marker debug hints, e.g. __FILE__
[in] line source line number, e.g. __LINE__
Returns:
error
Since:
Oyranos: version 0.1.8
Date:
2008/01/22 (API 0.1.8)

Referenced by oyProfile_s::oyProfile_AddTag(), oyProfile_s::oyProfile_GetMem(), oyProfile_s::oyProfile_GetTagById(), oyProfile_s::oyProfile_GetTagByPos(), oyProfile_s::oyProfile_TagReleaseAt(), and oyProfileTag_s::oyProfileTag_Copy().

oyObject_s oyObject_New ( void   )  [related, inherited]

object management

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

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

Referenced by oyFilter_s::oyFilter_ShowConnector().

oyObject_s oyObject_NewFrom ( oyObject_s  object  )  [related, inherited]

oyObject_s oyObject_NewWithAllocators ( oyAlloc_f  allocateFunc,
oyDeAlloc_f  deallocateFunc 
) [related, inherited]

object management

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

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

int oyObject_Release ( oyObject_s obj  )  [related, inherited]

int oyObject_SetName ( oyObject_s  object,
const char *  text,
oyNAME_e  type 
) [related, inherited]

object naming

Parameters:
[in] object the object
[in] text the name to set
[in] type the kind of name
Since:
Oyranos: version 0.1.8
Date:
november 2007 (API 0.1.8)

Referenced by oyFilter_s::oyFilter_GetText(), oyFilterNode_s::oyFilterNode_GetText(), oyNamedColour_s::oyNamedColour_GetName(), oyObject_s::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 
) [related, inherited]

object naming

Parameters:
[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
Since:
Oyranos: version 0.1.8
Date:
november 2007 (API 0.1.8)

References oyNAME_DESCRIPTION, oyNAME_NAME, oyNAME_NICK, and oyObject_s::oyObject_SetName().

Referenced by oyNamedColour_s::oyNamedColour_CreateWithName(), and oyProfile_s::oyProfile_GetChannelNames().

oyObject_s oyObject_SetParent ( oyObject_s  o,
oyOBJECT_e  type,
oyPointer  parent 
) [related, inherited]

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.

Parameters:
[in] o the object to modify
[in] type the parents struct type
[in] parent a pointer to the parent struct
Since:
Oyranos: version 0.1.8
Date:
november 2007 (API 0.1.8)

Referenced by oyArray2d_s::oyArray2d_New(), oyConnector_s::oyConnector_New(), oyFilterNode_s::oyFilterNode_New(), oyFilterPlug_s::oyFilterPlug_New(), oyFilterPlugs_s::oyFilterPlugs_New(), oyFilters_s::oyFilters_New(), oyFilterSocket_s::oyFilterSocket_New(), oyImage_s::oyImage_Create(), oyNamedColour_s::oyNamedColour_Create(), oyNamedColours_s::oyNamedColours_New(), oyOption_s::oyOption_New(), oyOptions_s::oyOptions_New(), oyProfiles_s::oyProfiles_New(), and oyProfileTag_s::oyProfileTag_New().

int oyObject_UnLock ( oyObject_s  object,
const char *  marker,
int  line 
) [related, inherited]

Unlock a object.

Function oyObject_UnLock

See also:
oyThreadLockingSet
Parameters:
[in] object the object
[in] marker debug hints, e.g. __FILE__
[in] line source line number, e.g. __LINE__
Returns:
error
Since:
Oyranos: version 0.1.8
Date:
2008/01/22 (API 0.1.8)

Referenced by oyProfile_s::oyProfile_AddTag(), oyProfile_s::oyProfile_GetMem(), oyProfile_s::oyProfile_GetTagById(), oyProfile_s::oyProfile_GetTagByPos(), oyProfile_s::oyProfile_TagReleaseAt(), and oyProfileTag_s::oyProfileTag_Copy().

int oyObject_UnSetLocking ( oyObject_s  object,
const char *  marker,
int  line 
) [related, inherited]

remove a object's lock pointer

Function oyObject_UnSetLocking

See also:
oyThreadLockingSet
Parameters:
[in] object the object
[in] marker debug hints, e.g. __FILE__
[in] line source line number, e.g. __LINE__
Returns:
error
Since:
Oyranos: version 0.1.8
Date:
2008/01/22 (API 0.1.8)

const char* oyStruct_TypeToText ( const oyStruct_s oy_struct  ) 

int oyStructList_Clear ( oyStructList_s *  s  )  [related, inherited]

release all listed objects

Function oyStructList_Clear

Version:
Oyranos: 0.1.9
Date:
2008/11/27
Since:
2008/11/27 (Oyranos: 0.1.9)

References oyOBJECT_STRUCT_LIST_S.

Referenced by oyStructList_s::oyStructList_CopyFrom().

int oyStructList_CopyFrom ( oyStructList_s *  list,
oyStructList_s *  from,
oyObject_s  object 
) [related, inherited]

clean "list" and copy all listed objects from "from" to "list".

Function oyStructList_CopyFrom

Version:
Oyranos: 0.1.9
Date:
2008/11/27
Since:
2008/11/27 (Oyranos: 0.1.9)

References oyStruct_s::copy, oyOBJECT_STRUCT_LIST_S, and oyStructList_s::oyStructList_Clear().

Referenced by oyOptions_s::oyOptions_DoFilter().

int oyStructList_Count ( oyStructList_s *  list  ) 

const char * oyStructList_GetID ( oyStructList_s *  s,
int  intent_spaces,
uint32_t  flags 
) [related, inherited]

eventually build and obtain the lists member names

Function oyStructList_GetID

Version:
Oyranos: 0.1.8
Date:
2008/11/04
Since:
2008/11/04 (Oyranos: 0.1.8)

References oyNAME_NICK, oyObject_s::oyObject_GetName(), and oyStructList_s::oyStructList_GetText().

oyStruct_s* oyStructList_GetRefType ( oyStructList_s *  list,
int  pos,
oyOBJECT_e  type 
)

oyStructList_s pointer access

Function oyStructList_GetRefType

Since:
Oyranos: version 0.1.8
Date:
1 january 2008 (API 0.1.8)

References oyStruct_s::oy_, oyStruct_s::release, and oyStruct_s::type_.

Referenced by oyFilterPlugs_s::oyFilterPlugs_Get(), oyFilters_s::oyFilters_Get(), oyNamedColours_s::oyNamedColours_Get(), oyOptions_s::oyOptions_Get(), and oyProfileTag_s::oyProfileTag_GetText().

const char * oyStructList_GetText ( oyStructList_s *  s,
oyNAME_e  name_type,
int  intent_spaces,
uint32_t  flags 
) [related, inherited]

build and obtain the lists member names

Function oyStructList_GetText

Version:
Oyranos: 0.1.8
Date:
2008/11/04
Since:
2008/11/04 (Oyranos: 0.1.8)

References oyStruct_s::oy_, oyObject_s::oyObject_GetName(), oyObject_s::oyObject_SetName(), and oyStructList_Count().

Referenced by oyStructList_s::oyStructList_GetID().

int oyTextboolean_ ( const char *  text_a,
const char *  text_b,
oyBOOLEAN_e  type 
)

test a boolean operator

The function requires to receive proper object arguments and valid ranges.

Todo:
test
Returns:
-1 for undefined, 1 - true, 2 - both, 0 - false
Version:
Oyranos: 0.1.9
Since:
2008/11/26 (Oyranos: 0.1.9)
Date:
2008/11/26

References oyBOOLEAN_DIFFERENZ, oyBOOLEAN_SUBSTRACTION, and oyBOOLEAN_UNION.

Referenced by oyName_boolean(), and oyOptions_s::oyOptions_FromBoolean().


Generated on Wed Aug 12 14:01:16 2009 for Oyranos by  doxygen 1.5.8