| Oyranos Colour Management System API

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- Data Structures
- Data Structure Index
- Class Hierarchy
- Data Fields

Public Member Functions | Data Fields
oyStructList_s Struct Reference
Objects_generic

a pointer list More...

`#include <oyStructList_s.h>`

Inheritance diagram for oyStructList_s:
Collaboration diagram for oyStructList_s:

## Public Member Functions

OYAPI oyStructList_s *OYEXPORT | oyStructList_New (oyObject_s object)
| allocate a new StructList object More...
OYAPI oyStructList_s *OYEXPORT | oyStructList_Copy (oyStructList_s *structlist, oyObject_s object)
| copy or reference a StructList object More...
OYAPI int OYEXPORT | oyStructList_Release (oyStructList_s **structlist)
| release and possibly deallocate a oyStructList_s object More...
int | oyStructList_MoveIn (oyStructList_s *list, oyStruct_s **ptr, int pos, uint32_t flags)
| oyStructList_s pointer add More...
oyStruct_s * | oyStructList_GetRef (oyStructList_s *list, int pos)
| oyStructList_s referenced pointer access More...
oyStruct_s * | oyStructList_GetRefType (oyStructList_s *list, int pos, oyOBJECT_e type)
| oyStructList_s pointer access More...
int | oyStructList_ReleaseAt (oyStructList_s *list, int pos)
| oyStructList_s pointer release More...
int | oyStructList_Count (oyStructList_s *list)
| oyStructList_s count More...
const char * | oyStructList_GetText (oyStructList_s *list, oyNAME_e name_type, int intent_spaces, uint32_t flags)
| Build and obtain the lists member names. More...
const char * | oyStructList_GetID (oyStructList_s *list, int intent_spaces, uint32_t flags)
| Eventually build and obtain the lists member names. More...
int | oyStructList_Clear (oyStructList_s *list)
| Release all listed objects. More...
int | oyStructList_CopyFrom (oyStructList_s *list, oyStructList_s *from, oyObject_s object)
| Clean "list" and copy all listed objects from "from" to "list". More...
int | oyStructList_MoveTo (oyStructList_s *s, int pos, int new_pos)
| Move a list element to a new position. More...
int | oyStructList_Sort (oyStructList_s *list, int32_t *rank_list)
| Sort a list according to a rank_list. More...
int | oyStructList_ObserverAdd (oyStructList_s *list, oyStruct_s *observer, oyStruct_s *user_data, oyObserver_Signal_f signalFunc)
| Add a observer to the each list member. More...
oyStruct_s * | oyStructList_GetType (oyStructList_s *list, int pos, oyOBJECT_e type)
| oyStructList_s pointer access More...
oyOBJECT_e | oyStructList_GetParentObjType (oyStructList_s *list)
oyStructList_s * | oyStructList_Create (oyOBJECT_e parent_type, const char *list_name, oyObject_s object)
| Create a new oyStruct_s list. More...
int | oyStructList_MoveInName (oyStructList_s *texts, char **text, int pos)
| Add a name to a list. More...
int | oyStructList_AddName (oyStructList_s *texts, const char *text, int pos)
| Add a name to a list. More...
const char * | oyStructList_GetName (oyStructList_s *texts, int pos)
| Add a name to a list. More...
oyHash_s * | oyStructList_GetHash (oyStructList_s *cache_list, uint32_t flags, const char *hash_text)
| Get a hash from a cache. More...
oyStruct_s * | oyStructList_GetHashStruct (oyStructList_s *cache_list, uint32_t flags, const char *hash_text, oyOBJECT_e type)
| Get a hash from a cache. More...
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 More...

## Data Fields

oyStruct_Copy_f | copy
oyStruct_Release_f | release
Data Fields inherited from oyStruct_s
oyStruct_Copy_f | copy
oyStruct_Release_f | release

## Detailed Description

a pointer list

## Member Function Documentation

int oyStructList_AddName | ( | oyStructList_s * | texts,
|  | const char * | text,
|  | int | pos
| ) |  |

Add a name to a list.

Function oyStructList_AddName

The text is added a a oyName_s::name member variable.

Version
  Oyranos: 0.1.13

Date
  2008/10/07

Since
  2008/10/07 (Oyranos: 0.1.13)

References oyStructList_MoveIn().

int oyStructList_Clear | ( | oyStructList_s * | list | ) |

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, and oyStructList_ReleaseAt().

Referenced by oyConfigs_s::oyConfigs_Clear(), oyFilterNodes_s::oyFilterNodes_Clear(), oyFilterPlugs_s::oyFilterPlugs_Clear(), oyOptions_s::oyOptions_Clear(), oyProfiles_s::oyProfiles_Clear(), and oyStructList_CopyFrom().

OYAPI oyStructList_s *OYEXPORT oyStructList_Copy | ( | oyStructList_s * | structlist,
|  | oyObject_s | object
| ) |  |

copy or reference a StructList object

Function oyStructList_Copy

The function is for copying and for referencing. The reference is the most often used way, which saves resourcs and time.

Parameters

  [in] | structlist | StructList struct object
  | object | NULL - means reference, the optional object triggers a real copy

References oyOBJECT_STRUCT_LIST_S.

int oyStructList_CopyFrom | ( | oyStructList_s * | list,
|  | oyStructList_s * | from,
|  | oyObject_s | object
| ) |  |

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

Function oyStructList_CopyFrom

If the list was observed, the new elements are observed by the list through the standard signal forwarding function (oyStructSignalForward_).

Version
  Oyranos: 0.1.10

Since
  2008/11/27 (Oyranos: 0.1.9)

Date
  2009/10/28

References oyStruct_s::copy, oyOBJECT_STRUCT_LIST_S, oyObserver_s::oyStruct_IsObserved(), oyStructList_Clear(), oyStructList_MoveIn(), and oyStructList_ObserverAdd().

int oyStructList_Count | ( | oyStructList_s * | list | ) |

oyStructList_s count

Function oyStructList_Count

Since
  Oyranos: version 0.1.8

Date
  21 november 2007 (API 0.1.8)

References oyOBJECT_STRUCT_LIST_S.

Referenced by oyCacheListGetEntry_(), oyConfigs_s::oyConfigs_Count(), oyFilterNodes_s::oyFilterNodes_Count(), oyFilterPlugs_s::oyFilterPlugs_Count(), oyOptions_s::oyOptions_Count(), oyProfile_s::oyProfile_GetMem(), oyProfile_s::oyProfile_GetTagCount(), oyProfiles_s::oyProfiles_Count(), oyProfileTag_s::oyProfileTag_GetText(), oyObserver_s::oyStruct_DisableSignalSend(), oyObserver_s::oyStruct_EnableSignalSend(), oyObserver_s::oyStruct_IsObserved(), oyObserver_s::oyStruct_ObserverAdd(), oyObserver_s::oyStruct_ObserverCopyModel(), oyObserver_s::oyStruct_ObserverCopyObserver(), oyObserver_s::oyStruct_ObserverSignal(), oyStructList_GetText(), oyStructList_MoveTo(), oyStructList_ObserverAdd(), and oyStructList_Sort().

oyStructList_s * oyStructList_Create | ( | oyOBJECT_e | parent_type,
|  | const char * | list_name,
|  | oyObject_s | object
| ) |  |

Create a new oyStruct_s list.

Function oyStructList_Create

Parameters

  parent_type | type of parent object
  list_name | optional list name
  object | the optional object

Returns
  a empty list

Version
  Oyranos: 0.1.8

Since
  2008/11/02 (Oyranos: 0.1.8)

Date
  2008/11/02

References oyStructList_New().

Referenced by oyConfigs_s::oyConfigs_MoveIn(), oyFilterNodes_s::oyFilterNodes_MoveIn(), oyFilterPlugs_s::oyFilterPlugs_MoveIn(), oyOptions_s::oyOptions_MoveIn(), and oyProfiles_s::oyProfiles_MoveIn().

oyHash_s * oyStructList_GetHash | ( | oyStructList_s * | cache_list,
|  | uint32_t | flags,
|  | const char * | hash_text
| ) |  |

Get a hash from a cache.

Function oyStructList_GetHash

Get always a Oyranos cache entry from a cache list.

Parameters

  [in] | cache_list | the list to search in

  [in]

  flags

  - 0 - assume text, length is strlen()
  - 1 - assume 16 byte hash instead of text

  [in] | hash_text | the text to search for in the cache_list

Returns
  the cache entry may not have a entry

Version
  Oyranos: 0.9.0

Date
  2012/10/17

Since
  2012/10/17 (Oyranos: 0.9.0)

References oyCacheListGetEntry_().

oyStruct_s * oyStructList_GetHashStruct | ( | oyStructList_s * | cache_list,
|  | uint32_t | flags,
|  | const char * | hash_text,
|  | oyOBJECT_e | type
| ) |  |

Get a hash from a cache.

Function oyStructList_GetHashStruct

Get always a Oyranos cache entry from a cache list.

Parameters

  [in] | cache_list | the list to search in

  [in]

  flags

  - 0 - assume text, length is strlen()
  - 1 - assume 16 byte hash instead of text

  [in] | hash_text | the text to search for in the cache_list
  [in] | type | thre requested object type

Returns
  the cache entry may not have a entry

Version
  Oyranos: 0.9.0

Date
  2012/10/17

Since
  2012/10/17 (Oyranos: 0.9.0)

References oyCacheListGetEntry_().

const char * oyStructList_GetID | ( | oyStructList_s * | list,
|  | int | intent_spaces,
|  | uint32_t | flags
| ) |  |

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, and oyStructList_GetText().

Referenced by oyContextCollectData_().

const char * oyStructList_GetName | ( | oyStructList_s * | texts,
|  | int | pos
| ) |  |

Add a name to a list.

Function oyStructList_GetName

The text is added a a oyName_s::name member variable.

Version
  Oyranos: 0.3.1

Date
  2011/05/18

Since
  2011/05/18 (Oyranos: 0.3.1)

References oyNAME_NAME, oyOBJECT_NAME_S, and oyStructList_GetRefType().

oyOBJECT_e oyStructList_GetParentObjType | ( | oyStructList_s * | list | ) |

Function oyStructList_GetParentObjType

References oyOBJECT_STRUCT_LIST_S.

Referenced by oyConfigs_s::oyConfigs_ReleaseAt(), oyFilterNodes_s::oyFilterNodes_ReleaseAt(), oyFilterPlugs_s::oyFilterPlugs_ReleaseAt(), oyOptions_s::oyOptions_ReleaseAt(), and oyProfiles_s::oyProfiles_ReleaseAt().

oyStruct_s * oyStructList_GetRef | ( | oyStructList_s * | list,
|  | int | pos
| ) |  |

oyStructList_s referenced pointer access

Function oyStructList_GetRef

Since
  Oyranos: version 0.1.8

Date
  4 december 2007 (API 0.1.8)

Referenced by oyStructList_GetRefType(), and oyStructList_MoveTo().

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 oyStructList_GetRef(), and oyStruct_s::release.

Referenced by oyConfigs_s::oyConfigs_Get(), oyFilterNodes_s::oyFilterNodes_Get(), oyFilterPlugs_s::oyFilterPlugs_Get(), oyOptions_s::oyOptions_Get(), oyProfiles_s::oyProfiles_Get(), oyProfileTag_s::oyProfileTag_GetText(), and oyStructList_GetName().

const char * oyStructList_GetText | ( | oyStructList_s * | list,
|  | oyNAME_e | name_type,
|  | int | intent_spaces,
|  | uint32_t | flags
| ) |  |

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 oyStructList_Count().

Referenced by oyStructList_GetID().

oyStruct_s * oyStructList_GetType | ( | oyStructList_s * | list,
|  | int | pos,
|  | oyOBJECT_e | type
| ) |  |

oyStructList_s pointer access

Function oyStructList_GetType

non thread save; better dont use

Since
  Oyranos: version 0.1.8

Date
  1 january 2008 (API 0.1.8)

Referenced by oyObserver_s::oyStruct_DisableSignalSend(), oyObserver_s::oyStruct_EnableSignalSend(), oyObserver_s::oyStruct_IsObserved(), oyObserver_s::oyStruct_ObserverAdd(), oyObserver_s::oyStruct_ObserverCopyModel(), oyObserver_s::oyStruct_ObserverCopyObserver(), and oyObserver_s::oyStruct_ObserverSignal().

int oyStructList_MoveIn | ( | oyStructList_s * | list,
|  | oyStruct_s ** | ptr,
|  | int | pos,
|  | uint32_t | flags
| ) |  |

oyStructList_s pointer add

Function oyStructList_MoveIn

If the list was observed, the new elements are not automatically observed. The caller can select OY_OBSERVE_AS_WELL in the flags argument if he wishes to observe a newly added element as well. The attached observation function will be oyStructSignalForward_.

Parameters

  [in] | list | the list
  [in] | ptr | the handle this function takes ownership of
  [in] | pos | the prefered position in the list. This option has affect of the order in list.
  [in] | flags | OY_OBSERVE_AS_WELL

Version
  Oyranos: 0.1.10

Since
  2007/11/30 (Oyranos: 0.1.8)

Date
  2009/10/28

References oyOBJECT_STRUCT_LIST_S, oyObserver_s::oyStruct_IsObserved(), and oyObserver_s::oyStruct_ObserverAdd().

Referenced by oyCacheListGetEntry_(), oyConfigs_s::oyConfigs_MoveIn(), oyFilterNodes_s::oyFilterNodes_MoveIn(), oyFilterPlugs_s::oyFilterPlugs_MoveIn(), oyOptions_s::oyOptions_MoveIn(), oyProfile_s::oyProfile_AddTagText(), oyProfile_s::oyProfile_TagMoveIn(), oyProfiles_s::oyProfiles_MoveIn(), oyProfileTag_s::oyProfileTag_CreateFromText(), oyObserver_s::oyStruct_ObserverAdd(), oyStructList_AddName(), oyStructList_CopyFrom(), oyStructList_MoveInName(), and oyStructList_MoveTo().

int oyStructList_MoveInName | ( | oyStructList_s * | texts,
|  | char ** | text,
|  | int | pos
| ) |  |

Add a name to a list.

Function oyStructList_MoveInName

The text is added a a oyName_s::name member variable and owned by the list.

Version
  Oyranos: 0.1.13

Date
  2008/10/07

Since
  2008/10/07 (Oyranos: 0.1.13)

References oyStructList_MoveIn().

int oyStructList_MoveTo | ( | oyStructList_s * | s,
|  | int | pos,
|  | int | new_pos
| ) |  |

Move a list element to a new position.

Function oyStructList_MoveTo

real used?

Version
  Oyranos: 0.1.10

Date
  2009/05/22

Since
  2009/05/22 (Oyranos: 0.1.10)

References oyOBJECT_STRUCT_LIST_S, oyStructList_Count(), oyStructList_GetRef(), oyStructList_MoveIn(), and oyStructList_ReleaseAt().

OYAPI oyStructList_s *OYEXPORT oyStructList_New | ( | oyObject_s | object | ) |

allocate a new StructList object

Function oyStructList_New

References oyOBJECT_OBJECT_S.

Referenced by oyOptions_s::oyOptions_CopyFrom(), oyProfile_s::oyProfile_AddTagText(), oyProfileTag_s::oyProfileTag_CreateFromText(), and oyStructList_Create().

int oyStructList_ObserverAdd | ( | oyStructList_s * | list,
|  | oyStruct_s * | observer,
|  | oyStruct_s * | user_data,
|  | oyObserver_Signal_f | signalFunc
| ) |  |

Add a observer to the each list member.

Function oyStructList_ObserverAdd

Members are further observed by the list object.

Version
  Oyranos: 0.1.10

Date
  2009/10/28

Since
  2009/10/28 (Oyranos: 0.1.10)

References oyOBJECT_STRUCT_LIST_S, oyObserver_s::oyStruct_ObserverAdd(), and oyStructList_Count().

Referenced by oyOptions_s::oyOptions_ObserverAdd(), and oyStructList_CopyFrom().

OYAPI int OYEXPORT oyStructList_Release | ( | oyStructList_s ** | structlist | ) |

release and possibly deallocate a oyStructList_s object

Function oyStructList_Release

Parameters

  [in,out] | structlist | StructList struct object

References oyOBJECT_STRUCT_LIST_S.

Referenced by oyOptions_s::oyOptions_CopyFrom(), oyProfile_s::oyProfile_AddTagText(), oyProfileTag_s::oyProfileTag_CreateFromText(), and oyProfileTag_s::oyProfileTag_GetText().

int oyStructList_ReleaseAt | ( | oyStructList_s * | list,
|  | int | pos
| ) |  |

oyStructList_s pointer release

Function oyStructList_ReleaseAt

release and shrink

Version
  Oyranos: 0.1.8

Date
  2007/11/21

Since
  2007/11/21 (Oyranos: 0.1.8)

References oyOBJECT_STRUCT_LIST_S.

Referenced by oyConfigs_s::oyConfigs_ReleaseAt(), oyFilterNodes_s::oyFilterNodes_ReleaseAt(), oyFilterPlugs_s::oyFilterPlugs_ReleaseAt(), oyOptions_s::oyOptions_ReleaseAt(), oyProfile_s::oyProfile_TagReleaseAt(), oyProfiles_s::oyProfiles_ReleaseAt(), oyStructList_Clear(), and oyStructList_MoveTo().

int oyStructList_Sort | ( | oyStructList_s * | list,
|  | int32_t * | rank_list
| ) |  |

Sort a list according to a rank_list.

Function oyStructList_Sort

Version
  Oyranos: 0.1.10

Date
  2009/05/23

Since
  2009/05/23 (Oyranos: 0.1.10)

References oyOBJECT_STRUCT_LIST_S, and oyStructList_Count().

Referenced by oyConfigs_s::oyConfigs_Sort(), oyFilterNodes_s::oyFilterNodes_Sort(), oyFilterPlugs_s::oyFilterPlugs_Sort(), oyOptions_s::oyOptions_Sort(), oyProfiles_s::oyProfiles_DeviceRank(), and oyProfiles_s::oyProfiles_Sort().

## Field Documentation

oyStruct_Copy_f oyStructList_s::copy

copy function

oyStruct_Release_f oyStructList_s::release

release function