![]() |
Oyranos Colour Management System API |
generic Options More...
#include <oyOptions_s.h>


Public Member Functions | |
| OYAPI oyOptions_s *OYEXPORT | oyOptions_New (oyObject_s object) |
| allocate a new Options object | |
| OYAPI oyOptions_s *OYEXPORT | oyOptions_Copy (oyOptions_s *options, oyObject_s object) |
| copy or reference a Options object | |
| OYAPI int OYEXPORT | oyOptions_Release (oyOptions_s **options) |
| release and possibly deallocate a oyOptions_s object | |
| OYAPI int OYEXPORT | oyOptions_MoveIn (oyOptions_s *list, oyOption_s **obj, int pos) |
| add an element to a Options list | |
| OYAPI int OYEXPORT | oyOptions_ReleaseAt (oyOptions_s *list, int pos) |
| release a element from a Options list | |
| OYAPI oyOption_s *OYEXPORT | oyOptions_Get (oyOptions_s *list, int pos) |
| get a element of a Options list | |
| OYAPI int OYEXPORT | oyOptions_Count (oyOptions_s *list) |
| count the elements in a Options list | |
| OYAPI int OYEXPORT | oyOptions_Clear (oyOptions_s *list) |
| clear the elements in a Options list | |
| OYAPI int OYEXPORT | oyOptions_Sort (oyOptions_s *list, int32_t *rank_list) |
| sort a list according to a rank_list | |
| oyOptions_s * | oyOptions_FromBoolean (oyOptions_s *set_a, oyOptions_s *set_b, oyBOOLEAN_e type, oyObject_s object) |
| boolean operations on two sets of option | |
| oyOptions_s * | oyOptions_FromText (const char *text, uint32_t flags, oyObject_s object) |
| deserialise a text file to oyOptions_s data | |
| int | oyOptions_Add (oyOptions_s *options, oyOption_s *option, int pos, oyObject_s object) |
| add a element to a Options list | |
| int | oyOptions_Set (oyOptions_s *options, oyOption_s *option, int pos, oyObject_s object) |
| set a element in a Options list | |
| int | oyOptions_SetOpts (oyOptions_s *list, oyOptions_s *add) |
| set options in a Options list | |
| int | oyOptions_AppendOpts (oyOptions_s *list, oyOptions_s *append) |
| Basic reference options from one list into an other. | |
| int | oyOptions_CopyFrom (oyOptions_s **list, oyOptions_s *from, oyBOOLEAN_e type, oyFILTER_REG_e fields, oyObject_s object) |
| copy from one option set to an other option set | |
| int | oyOptions_Filter (oyOptions_s **add_list, int32_t *count, uint32_t flags, oyBOOLEAN_e type, const char *registration, oyOptions_s *src_list) |
| filter options | |
| const char * | oyOptions_GetText (oyOptions_s *options, oyNAME_e type) |
| dump options to text | |
| int | oyOptions_CountType (oyOptions_s *options, const char *registration, oyOBJECT_e type) |
| search for options with special attributes | |
| oyOption_s * | oyOptions_Find (oyOptions_s *options, const char *registration) |
| search for a certain option key | |
| const char * | oyOptions_FindString (oyOptions_s *options, const char *registration, const char *value) |
| search for a certain option key and possibly value | |
| int | oyOptions_SetFromText (oyOptions_s **obj, const char *registration, const char *value, uint32_t flags) |
| change a value | |
| int | oyOptions_FindInt (oyOptions_s *options, const char *registration, int pos, int32_t *result) |
| get a value | |
| int | oyOptions_SetFromInt (oyOptions_s **obj, const char *registration, int32_t value, int pos, uint32_t flags) |
| change a value | |
| int | oyOptions_FindDouble (oyOptions_s *options, const char *registration, int pos, double *result) |
| get a value | |
| int | oyOptions_SetFromDouble (oyOptions_s **obj, const char *registration, double value, int pos, uint32_t flags) |
| change a value | |
| oyStruct_s * | oyOptions_GetType (oyOptions_s *options, int pos, const char *registration, oyOBJECT_e type) |
| select from options with special attribute | |
| int | oyOptions_MoveInStruct (oyOptions_s **obj, const char *registration, oyStruct_s **oy_struct, uint32_t flags) |
| change a value | |
| int | oyOptions_SetFromData (oyOptions_s **options, const char *registration, oyPointer ptr, size_t size, uint32_t flags) |
| set a data blob or plain pointer | |
| int | oyOptions_FindData (oyOptions_s *options, const char *registration, oyPointer *result, size_t *size, oyAlloc_f allocateFunc) |
| get a value | |
| int | oyOptions_SetSource (oyOptions_s *options, oyOPTIONSOURCE_e source) |
| set source attribute | |
| OYAPI int OYEXPORT | oyOptions_ObserverAdd (oyOptions_s *object, oyStruct_s *observer, oyStruct_s *user_data, oyObserver_Signal_f signalFunc) |
| observe options and its elements | |
| OYAPI int OYEXPORT | oyOptions_ObserversDisable (oyOptions_s *object) |
| disable signaling | |
| OYAPI int OYEXPORT | oyOptions_ObserversEnable (oyOptions_s *object) |
| disable signaling | |
| OYAPI int OYEXPORT | oyOptions_SetDriverContext (oyOptions_s **options, oyPointer driver_context, const char *driver_context_type, size_t driver_context_size, oyObject_s object) |
| set a device option from a given external context | |
| void | oyOptions_Release__Members (oyOptions_s_ *options) |
| Custom Options destructor. | |
| int | oyOptions_Init__Members (oyOptions_s_ *options) |
| Custom Options constructor. | |
| int | oyOptions_Copy__Members (oyOptions_s_ *dst, oyOptions_s_ *src) |
| Custom Options copy constructor. | |
Public Member Functions inherited from oyStruct_s | |
| const char * | oyStruct_GetText (oyStruct_s *obj, oyNAME_e name_type, uint32_t flags) |
| get a text dump | |
Data Fields | |
| oyStruct_Copy_f | copy |
| oyStruct_Release_f | release |
Data Fields inherited from oyStruct_s | |
| oyStruct_Copy_f | copy |
| oyStruct_Release_f | release |
generic Options
Options can be any flag or rendering intent and other informations needed to configure a process. The object contains a list of oyOption_s objects.
| int oyOptions_Add | ( | oyOptions_s * | options, |
| oyOption_s * | option, | ||
| int | pos, | ||
| oyObject_s | object | ||
| ) |
add a element to a Options list
Function oyOptions_Add
We must not add any already listed option. (oyFILTER_REG_TOP)
Adding a new element without any checks is as simple as following code:
* tmp = oyOption_Copy( option, object ); * oyOptions_MoveIn( options, &tmp, -1 );
References oyFILTER_REG_TOP, oyOption_s::oyOption_Copy(), oyOption_s::oyOption_Release(), oyOptions_Count(), oyOptions_Get(), and oyOptions_MoveIn().
Referenced by oyConfigs_s::oyConfigs_FromDB(), oyOptions_Filter(), and oyOptions_FromBoolean().
| int oyOptions_AppendOpts | ( | oyOptions_s * | list, |
| oyOptions_s * | append | ||
| ) |
Basic reference options from one list into an other.
Function oyOptions_AppendOpts
References oyOptions_Count(), oyOptions_Get(), and oyOptions_MoveIn().
Referenced by oyConfig_s::oyConfig_Count(), oyConfig_s::oyConfig_Get(), and oyConfig_s::oyConfig_SaveToDB().
| OYAPI int OYEXPORT oyOptions_Clear | ( | oyOptions_s * | list | ) |
clear the elements in a Options list
Function oyOptions_Clear
| [in,out] | list | the list |
References oyOBJECT_OPTIONS_S, and oyStructList_s::oyStructList_Clear().
Referenced by oyConfig_s::oyConfig_GetOptions(), and oyProfiles_s::oyProfiles_DeviceRank().
| OYAPI oyOptions_s *OYEXPORT oyOptions_Copy | ( | oyOptions_s * | options, |
| oyObject_s | object | ||
| ) |
copy or reference a Options object
Function oyOptions_Copy
The function is for copying and for referencing. The reference is the most often used way, which saves resourcs and time.
| [in] | options | Options struct object |
| object | NULL - means reference, the optional object triffers a real copy |
References oyOBJECT_OPTIONS_S.
Referenced by oyConfig_s::oyConfig_GetFromDB(), oyConfigs_s::oyConfigs_FromDeviceClass(), oyFilterCore_s::oyFilterCore_Copy__Members(), oyFilterCore_s::oyFilterCore_NewWith(), oyFilterGraph_s::oyFilterGraph_Copy__Members(), oyFilterGraph_s::oyFilterGraph_GetOptions(), oyFilterNode_s::oyFilterNode_GetTags(), oyImage_s::oyImage_GetTags(), oyImage_s::oyImage_SetCritical(), oyOptions_FromBoolean(), and oyPixelAccess_s::oyPixelAccess_GetRequestQueue().
| int oyOptions_Copy__Members | ( | oyOptions_s_ * | dst, |
| oyOptions_s_ * | src | ||
| ) |
Custom Options copy constructor.
Function oyOptions_Copy__Members
| int oyOptions_CopyFrom | ( | oyOptions_s ** | list, |
| oyOptions_s * | from, | ||
| oyBOOLEAN_e | type, | ||
| oyFILTER_REG_e | fields, | ||
| oyObject_s | object | ||
| ) |
copy from one option set to an other option set
Function oyOptions_CopyFrom
| [out] | list | target |
| [in] | from | source |
| type | boolean operation before copy | |
| fields | registration fields of each option | |
| object | the optional object |
References oyBOOLEAN_DIFFERENZ, oyBOOLEAN_INTERSECTION, oyBOOLEAN_SUBSTRACTION, oyBOOLEAN_UNION, oyOption_s::oyOption_Release(), oyOptions_Count(), oyOptions_Get(), oyOptions_MoveIn(), oyOptions_New(), oyOptions_Release(), oyOptions_SetOpts(), oyStructList_s::oyStructList_New(), and oyStructList_s::oyStructList_Release().
Referenced by oyImage_ToFile().
| OYAPI int OYEXPORT oyOptions_Count | ( | oyOptions_s * | list | ) |
count the elements in a Options list
Function oyOptions_Count
| [in,out] | list | the list |
References oyOBJECT_OPTIONS_S, and oyStructList_s::oyStructList_Count().
Referenced by oyConfig_s::oyConfig_Compare(), oyConfig_s::oyConfig_Count(), oyOptions_Add(), oyOptions_AppendOpts(), oyOptions_CopyFrom(), oyOptions_CountType(), oyOptions_Filter(), oyOptions_Find(), oyOptions_FromBoolean(), oyOptions_GetText(), oyOptions_GetType(), oyOptions_ObserversDisable(), oyOptions_ObserversEnable(), oyOptions_Set(), oyOptions_SetOpts(), oyOptions_SetSource(), and oyProfiles_s::oyProfiles_DeviceRank().
| int oyOptions_CountType | ( | oyOptions_s * | options, |
| const char * | registration, | ||
| oyOBJECT_e | type | ||
| ) |
search for options with special attributes
Function oyOptions_CountType
References oyOBJECT_OPTIONS_S, oyOption_s::oyOption_Release(), oyOptions_Count(), oyOptions_Get(), and oyVAL_STRUCT.
| int oyOptions_Filter | ( | oyOptions_s ** | add_list, |
| int32_t * | count, | ||
| uint32_t | flags, | ||
| oyBOOLEAN_e | type, | ||
| const char * | registration, | ||
| oyOptions_s * | src_list | ||
| ) |
filter options
Function oyOptions_Filter
Each option added to the add_list is a cheaply linked one.
| [out] | add_list | the options list to add to |
| [out] | count | the number of matching options |
| [in] | flags | for inbuild defaults | oyOPTIONSOURCE_FILTER |
| [in] | type | support are oyBOOLEAN_INTERSECTION and oyBOOLEAN_DIFFERENZ |
| [in] | registration | a registration which shall be matched |
| [in] | src_list | the options to select from |
References oyBOOLEAN_DIFFERENZ, oyBOOLEAN_INTERSECTION, oyBOOLEAN_UNION, oyOBJECT_OPTIONS_S, oyOption_s::oyOption_Release(), oyOptions_Add(), oyOptions_Count(), oyOptions_Get(), oyOptions_New(), oyOPTIONSOURCE_DATA, oyOPTIONSOURCE_FILTER, and oyOPTIONSOURCE_USER.
Referenced by oyPixelAccess_s::oyPixelAccess_Create().
| oyOption_s * oyOptions_Find | ( | oyOptions_s * | options, |
| const char * | registration | ||
| ) |
search for a certain option key
Function oyOptions_Find
This function returns the first found option for a given key. The key is represented by a registrations option level.
| options | set of options |
| registration | registration or key |
References oyOBJECT_OPTIONS_S, oyOption_s::oyOption_Release(), oyOptions_Count(), and oyOptions_Get().
Referenced by oyConfig_s::oyConfig_Find(), oyConfig_s::oyConfig_Has(), oyFilterGraph_s::oyFilterGraph_PrepareContexts(), oyOptions_FindData(), oyOptions_FindDouble(), oyOptions_FindInt(), oyOptions_FindString(), oyOptions_MoveInStruct(), oyOptions_SetFromData(), oyOptions_SetFromDouble(), oyOptions_SetFromInt(), oyOptions_SetFromText(), oyObserver_s::oyStruct_DisableSignalSend(), oyObserver_s::oyStruct_EnableSignalSend(), oyObserver_s::oyStruct_ObserverListGet_(), and oyObserver_s::oyStruct_ObserverSignal().
| int oyOptions_FindData | ( | oyOptions_s * | options, |
| const char * | registration, | ||
| oyPointer * | result, | ||
| size_t * | size, | ||
| oyAlloc_f | allocateFunc | ||
| ) |
get a value
Function oyOptions_FindData
| options | the options list or set to manipulate | |
| registration | the options registration name, e.g. "org/my_org/openicc/my_app/my_opt" or simply a key, e.g. "my_opt" | |
| [out] | result | the data; With size == zero, the pointer is static and owned somewhere else. With size set, the pointer is owned my
|
| [out] | size | the data size |
| [in] | allocateFunc | user allocator |
References oyOBJECT_OPTION_S, oyOBJECT_OPTIONS_S, oyOption_s::oyOption_GetData(), oyOption_s::oyOption_Release(), oyOptions_Find(), and oyVAL_STRUCT.
| int oyOptions_FindDouble | ( | oyOptions_s * | options, |
| const char * | registration, | ||
| int | pos, | ||
| double * | result | ||
| ) |
get a value
Function oyOptions_FindDouble
| options | the options list or set to manipulate |
| registration | the options registration name, e.g. "org/my_org/openicc/my_app/my_opt" or simple key, e.g. "my_opt" |
| result | the double |
| pos | the value position |
References oyOBJECT_OPTION_S, oyOBJECT_OPTIONS_S, oyOption_s::oyOption_GetValueDouble(), oyOption_s::oyOption_Release(), oyOptions_Find(), and oyVAL_DOUBLE.
| int oyOptions_FindInt | ( | oyOptions_s * | options, |
| const char * | registration, | ||
| int | pos, | ||
| int32_t * | result | ||
| ) |
get a value
Function oyOptions_FindInt
| options | the options list or set to manipulate |
| registration | the options registration name, e.g. "org/my_org/openicc/my_app/my_opt" or simple key, e.g. "my_opt" |
| pos | the values position in a possible list |
| result | the integer |
References oyOBJECT_OPTION_S, oyOBJECT_OPTIONS_S, oyOption_s::oyOption_GetValueInt(), oyOption_s::oyOption_Release(), and oyOptions_Find().
| const char * oyOptions_FindString | ( | oyOptions_s * | options, |
| const char * | registration, | ||
| const char * | value | ||
| ) |
search for a certain option key and possibly value
Function oyOptions_FindString
This function returns the first found value for a given key. The key is represented by the oyOption_s::name::nick The returned string is valid along the livetime of the particular option value.
References oyOBJECT_OPTION_S, oyOBJECT_OPTIONS_S, oyOption_s::oyOption_Release(), and oyOptions_Find().
Referenced by oyConfig_s::oyConfig_FindString(), oyConfigs_s::oyConfigs_FromDeviceClass(), oyConversion_s::oyConversion_RunPixels(), oyFilterGraph_s::oyFilterGraph_CountNodes(), oyFilterGraph_s::oyFilterGraph_GetNode(), oyObject_s::oyObject_GetName(), oyProfile_s::oyProfile_AddDevice(), oyProfile_FromTaxiDB(), oyProfile_s::oyProfile_GetFileName(), and oyProfile_Install().
| oyOptions_s * oyOptions_FromBoolean | ( | oyOptions_s * | set_a, |
| oyOptions_s * | set_b, | ||
| oyBOOLEAN_e | type, | ||
| oyObject_s | object | ||
| ) |
boolean operations on two sets of option
Function oyOptions_FromBoolean
| [in] | set_a | options set A |
| [in] | set_b | options set B |
| [in] | type | the operation to perform |
| object | the optional object |
References oyBOOLEAN_DIFFERENZ, oyBOOLEAN_UNION, oyFILTER_REG_OPTION, oyOption_s::oyOption_Release(), oyOptions_Add(), oyOptions_Copy(), oyOptions_Count(), oyOptions_Get(), and oyOptions_New().
| oyOptions_s * oyOptions_FromText | ( | const char * | text, |
| uint32_t | flags, | ||
| oyObject_s | object | ||
| ) |
deserialise a text file to oyOptions_s data
Function oyOptions_FromText
This function is based on libxml2.
| [in] | text | the text to process |
| [in] | flags | for future use |
| object | the optional object |
References oyOptions_New().
Referenced by oyOptions_SetDriverContext().
| OYAPI oyOption_s *OYEXPORT oyOptions_Get | ( | oyOptions_s * | list, |
| int | pos | ||
| ) |
get a element of a Options list
Function oyOptions_Get
| [in,out] | list | the list |
| pos | position |
References oyOBJECT_OPTION_S, oyOBJECT_OPTIONS_S, and oyStructList_s::oyStructList_GetRefType().
Referenced by oyConfig_s::oyConfig_Compare(), oyConfig_s::oyConfig_EraseFromDB(), oyConfig_s::oyConfig_Get(), oyOptions_Add(), oyOptions_AppendOpts(), oyOptions_CopyFrom(), oyOptions_CountType(), oyOptions_Filter(), oyOptions_Find(), oyOptions_FromBoolean(), oyOptions_GetText(), oyOptions_GetType(), oyOptions_ObserversDisable(), oyOptions_ObserversEnable(), oyOptions_Set(), oyOptions_SetOpts(), and oyOptions_SetSource().
| const char * oyOptions_GetText | ( | oyOptions_s * | options, |
| oyNAME_e | type | ||
| ) |
dump options to text
Function oyOptions_GetText
The type argument should select the following string in return:
| [in,out] | options | the option |
| type | oyNAME_NICK is equal to an ID |
References oyNAME_DESCRIPTION, oyNAME_NAME, oyObject_s::oyObject_GetName(), oyObject_s::oyObject_SetName(), oyOption_s::oyOption_GetText(), oyOption_s::oyOption_GetValueText(), oyOption_s::oyOption_Release(), oyOptions_Count(), oyOptions_Get(), and oyVAL_STRUCT.
Referenced by oyOption_s::oyOption_GetText().
| oyStruct_s * oyOptions_GetType | ( | oyOptions_s * | options, |
| int | pos, | ||
| const char * | registration, | ||
| oyOBJECT_e | type | ||
| ) |
select from options with special attribute
Function oyOptions_GetType
References oyStruct_s::copy, oyOBJECT_OPTIONS_S, oyOption_s::oyOption_Release(), oyOptions_Count(), oyOptions_Get(), and oyVAL_STRUCT.
Referenced by oyImage_s::oyImage_CreateForDisplay().
| int oyOptions_Init__Members | ( | oyOptions_s_ * | options | ) |
Custom Options constructor.
Function oyOptions_Init__Members
| OYAPI int OYEXPORT oyOptions_MoveIn | ( | oyOptions_s * | list, |
| oyOption_s ** | obj, | ||
| int | pos | ||
| ) |
add an element to a Options list
Function oyOptions_MoveIn
| [in] | list | list |
| [in,out] | obj | list element |
| pos | position |
References oyOBJECT_OPTION_S, oyOBJECT_OPTIONS_S, oyObserver_s::oyStruct_IsObserved(), oyObserver_s::oyStruct_ObserverAdd(), oyStructList_s::oyStructList_Create(), and oyStructList_s::oyStructList_MoveIn().
Referenced by oyOptions_Add(), oyOptions_AppendOpts(), oyOptions_CopyFrom(), oyOptions_MoveInStruct(), oyOptions_Set(), oyOptions_SetDriverContext(), oyOptions_SetFromData(), oyOptions_SetFromDouble(), oyOptions_SetFromInt(), oyOptions_SetFromText(), and oyObserver_s::oyStruct_ObserverListGet_().
| int oyOptions_MoveInStruct | ( | oyOptions_s ** | obj, |
| const char * | registration, | ||
| oyStruct_s ** | oy_struct, | ||
| uint32_t | flags | ||
| ) |
change a value
Function oyOptions_MoveInStruct
| obj | the options list or set to manipulate |
| registration | the options registration name, e.g. "org/my_org/openicc/my_app/my_opt" |
| oy_struct | the Oyranos style object to move in |
| flags | can be OY_CREATE_NEW for a new option, or OY_ADD_ALWAYS |
Add a new option if the OY_CREATE_NEW flag is present.
References oyOBJECT_OPTIONS_S, oyOption_s::oyOption_FromRegistration(), oyOption_s::oyOption_Release(), oyOption_s::oyOption_StructMoveIn(), oyOptions_Find(), oyOptions_MoveIn(), and oyOptions_New().
Referenced by oyImage_s::oyImage_Create().
| OYAPI oyOptions_s *OYEXPORT oyOptions_New | ( | oyObject_s | object | ) |
allocate a new Options object
Function oyOptions_New
References oyOBJECT_OBJECT_S.
Referenced by oyConfig_s::oyConfig_ClearDBData(), oyConfig_s::oyConfig_Count(), oyConfig_s::oyConfig_Get(), oyConfig_s::oyConfig_GetOptions(), oyConfig_s::oyConfig_SaveToDB(), oyFilterGraph_s::oyFilterGraph_Init__Members(), oyFilterNode_s::oyFilterNode_GetTags(), oyImage_s::oyImage_Init__Members(), oyOptions_CopyFrom(), oyOptions_Filter(), oyOptions_FromBoolean(), oyOptions_FromText(), oyOptions_MoveInStruct(), oyOptions_SetDriverContext(), oyOptions_SetFromData(), oyOptions_SetFromDouble(), oyOptions_SetFromInt(), oyOptions_SetFromText(), and oyObserver_s::oyStruct_ObserverListGet_().
| OYAPI int OYEXPORT oyOptions_ObserverAdd | ( | oyOptions_s * | object, |
| oyStruct_s * | observer, | ||
| oyStruct_s * | user_data, | ||
| oyObserver_Signal_f | signalFunc | ||
| ) |
observe options and its elements
Function oyOptions_ObserverAdd
| [in] | object | the options |
| [in] | observer | the in observation intereressted object |
| [in] | user_data | additional static informations |
| [in] | signalFunc | the signal handler |
References oyObserver_s::oyStruct_ObserverAdd(), and oyStructList_s::oyStructList_ObserverAdd().
| OYAPI int OYEXPORT oyOptions_ObserversDisable | ( | oyOptions_s * | object | ) |
disable signaling
Function oyOptions_ObserversDisable
| [in] | object | the options |
References oyOption_s::oyOption_Release(), oyOptions_Count(), oyOptions_Get(), and oyObserver_s::oyStruct_DisableSignalSend().
| OYAPI int OYEXPORT oyOptions_ObserversEnable | ( | oyOptions_s * | object | ) |
disable signaling
Function oyOptions_ObserversEnable
| [in] | object | the options |
References oyOption_s::oyOption_Release(), oyOptions_Count(), oyOptions_Get(), and oyObserver_s::oyStruct_EnableSignalSend().
| OYAPI int OYEXPORT oyOptions_Release | ( | oyOptions_s ** | options | ) |
release and possibly deallocate a oyOptions_s object
Function oyOptions_Release
| [in,out] | options | Options struct object |
References oyOBJECT_OPTIONS_S.
Referenced by oyActivateMonitorProfiles(), oyConfig_s::oyConfig_ClearDBData(), oyConfig_s::oyConfig_Count(), oyConfig_s::oyConfig_Get(), oyConfig_s::oyConfig_GetBestMatchFromTaxiDB(), oyConfig_s::oyConfig_GetFromDB(), oyConfig_s::oyConfig_SaveToDB(), oyConfigs_s::oyConfigs_FromDeviceClass(), oyConversion_CreateFromImage(), oyFilterGraph_s::oyFilterGraph_Release__Members(), oyFilterNode_s::oyFilterNode_Release__Members(), oyGetDisplayNameFromPosition(), oyGetDisplayNameFromPosition2(), oyGetMonitorProfileNameFromDB(), oyImage_FromFile(), oyImage_s::oyImage_SetCritical(), oyImage_ToFile(), oyOptions_CopyFrom(), oyOptions_SetDriverContext(), and oySetMonitorProfile().
| void oyOptions_Release__Members | ( | oyOptions_s_ * | options | ) |
Custom Options destructor.
Function oyOptions_Release__Members
| OYAPI int OYEXPORT oyOptions_ReleaseAt | ( | oyOptions_s * | list, |
| int | pos | ||
| ) |
release a element from a Options list
Function oyOptions_ReleaseAt
| [in,out] | list | the list |
| pos | position |
References oyOBJECT_OPTIONS_S, oyStructList_s::oyStructList_GetParentObjType(), and oyStructList_s::oyStructList_ReleaseAt().
| int oyOptions_Set | ( | oyOptions_s * | options, |
| oyOption_s * | option, | ||
| int | pos, | ||
| oyObject_s | object | ||
| ) |
set a element in a Options list
Function oyOptions_Set
Already listed options are replaced by the new option. A option new to the existing set will be referenced if no object argument is given.
Adding a new element without any checks is as simple as following code:
* tmp = oyOption_Copy( option, object ); * oyOptions_MoveIn( options, &tmp, -1 );
References oyOption_s::oyOption_Copy(), oyOption_s::oyOption_Release(), oyOptions_Count(), oyOptions_Get(), and oyOptions_MoveIn().
Referenced by oyOptions_SetOpts().
| OYAPI int OYEXPORT oyOptions_SetDriverContext | ( | oyOptions_s ** | options, |
| oyPointer | driver_context, | ||
| const char * | driver_context_type, | ||
| size_t | driver_context_size, | ||
| oyObject_s | object | ||
| ) |
set a device option from a given external context
Function oyOptions_SetDriverContext
The options will be created in case they do not exist. The driver_context_type accepts "xml". The data in driver_context will be converted to a options set following the Oyranos options XML schemes with the help oyOptions_FromText(). Any other pointer will be converted to a oyBlob_s object. The name of that object will come from driver_context_type.
| [in,out] | options | options for the device |
| [in] | driver_context | driver context |
| [in] | driver_context_type | "xml" or something related to the driver |
| [in] | driver_context_size | size of driver_context |
| [in] | object | a optional object |
References oyOBJECT_OPTIONS_S, oyOption_s::oyOption_FromRegistration(), oyOption_s::oyOption_SetFromData(), oyOption_s::oyOption_StructMoveIn(), oyOptions_FromText(), oyOptions_MoveIn(), oyOptions_New(), and oyOptions_Release().
| int oyOptions_SetFromData | ( | oyOptions_s ** | options, |
| const char * | registration, | ||
| oyPointer | ptr, | ||
| size_t | size, | ||
| uint32_t | flags | ||
| ) |
set a data blob or plain pointer
Function oyOptions_SetFromData
| options | the options list or set to manipulate |
| registration | the options registration name, e.g. "org/my_org/openicc/my_app/my_opt" |
| ptr | the pointer |
| size | the pointer size |
| flags | can be OY_CREATE_NEW for a new option, or OY_ADD_ALWAYS |
Add a new option if the OY_CREATE_NEW flag is present.
References oyOBJECT_OPTIONS_S, oyOption_s::oyOption_FromRegistration(), oyOption_s::oyOption_Release(), oyOption_s::oyOption_SetFromData(), oyOptions_Find(), oyOptions_MoveIn(), and oyOptions_New().
| int oyOptions_SetFromDouble | ( | oyOptions_s ** | obj, |
| const char * | registration, | ||
| double | value, | ||
| int | pos, | ||
| uint32_t | flags | ||
| ) |
change a value
Function oyOptions_SetFromDouble
| obj | the options list or set to manipulate |
| registration | the options registration name, e.g. "org/my_org/openicc/my_app/my_opt" |
| value | the value to set |
| pos | the position in a value list |
| flags | can be OY_CREATE_NEW for a new option, OY_STRING_LIST or OY_ADD_ALWAYS |
Add a new option if the OY_CREATE_NEW flag is present.
References oyOBJECT_OPTIONS_S, oyOption_s::oyOption_FromRegistration(), oyOption_s::oyOption_Release(), oyOption_s::oyOption_SetFromDouble(), oyOptions_Find(), oyOptions_MoveIn(), and oyOptions_New().
| int oyOptions_SetFromInt | ( | oyOptions_s ** | obj, |
| const char * | registration, | ||
| int32_t | value, | ||
| int | pos, | ||
| uint32_t | flags | ||
| ) |
change a value
Function oyOptions_SetFromInt
| obj | the options list or set to manipulate |
| registration | the options registration name, e.g. "org/my_org/openicc/my_app/my_opt" |
| value | the value to set |
| pos | the position in a value list |
| flags | can be OY_CREATE_NEW for a new option, OY_STRING_LIST or OY_ADD_ALWAYS |
Add a new option if the OY_CREATE_NEW flag is present.
References oyOBJECT_OPTIONS_S, oyOption_s::oyOption_FromRegistration(), oyOption_s::oyOption_Release(), oyOption_s::oyOption_SetFromInt(), oyOptions_Find(), oyOptions_MoveIn(), and oyOptions_New().
| int oyOptions_SetFromText | ( | oyOptions_s ** | obj, |
| const char * | registration, | ||
| const char * | value, | ||
| uint32_t | flags | ||
| ) |
change a value
Function oyOptions_SetFromText
| obj | the options list or set to manipulate |
| registration | the options registration name, e.g. "org/my_org/openicc/my_app/my_opt" |
| value | the value to set |
| flags | can be OY_CREATE_NEW for a new option, OY_STRING_LIST or OY_ADD_ALWAYS |
Add a new option if the OY_CREATE_NEW flag is present.
Flags are passed on to oyOption_SetFromText, e.g. OY_STRING_LIST.
References oyOBJECT_OPTIONS_S, oyOption_s::oyOption_FromRegistration(), oyOption_s::oyOption_Release(), oyOption_s::oyOption_SetFromText(), oyOptions_Find(), oyOptions_MoveIn(), and oyOptions_New().
Referenced by oyActivateMonitorProfiles(), oyConfig_s::oyConfig_AddDBData(), oyFilterNode_s::oyFilterNode_SetContext_(), oyGetDisplayNameFromPosition(), oyGetDisplayNameFromPosition2(), oyImage_s::oyImage_CreateForDisplay(), oyImage_FromFile(), oyImage_ToFile(), oyObject_s::oyObject_SetName(), oyProfile_s::oyProfile_GetFileName(), and oySetMonitorProfile().
| int oyOptions_SetOpts | ( | oyOptions_s * | list, |
| oyOptions_s * | add | ||
| ) |
set options in a Options list
Function oyOptions_SetOpts
Already listed options are replaced by the new options.
References oyOption_s::oyOption_Release(), oyOptions_Count(), oyOptions_Get(), and oyOptions_Set().
Referenced by oyOptions_CopyFrom().
| int oyOptions_SetSource | ( | oyOptions_s * | options, |
| oyOPTIONSOURCE_e | source | ||
| ) |
set source attribute
Function oyOptions_SetSource
| options | the options list or set to manipulate |
| source | the options new source attribute |
References oyOBJECT_OPTIONS_S, oyOption_s::oyOption_Release(), oyOptions_Count(), and oyOptions_Get().
Referenced by oyConfigs_s::oyConfigs_FromDomain(), and oyProfile_s::oyProfile_GetDevice().
| OYAPI int OYEXPORT oyOptions_Sort | ( | oyOptions_s * | list, |
| int32_t * | rank_list | ||
| ) |
sort a list according to a rank_list
Function oyOptions_Sort
References oyOBJECT_OPTIONS_S, and oyStructList_s::oyStructList_Sort().
| oyStruct_Copy_f oyOptions_s::copy |
copy function
| oyStruct_Release_f oyOptions_s::release |
release function