Oyranos
git-devel
Oyranos is a full featured Color Management System
|
a pointer list More...
#include <oyStructList_s.h>
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 OY_UNUSED) |
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, oyNAME_e type) |
Move a name into a list. More... | |
OYAPI int OYEXPORT | oyStructList_AddName (oyStructList_s *texts, const char *text, int pos, oyNAME_e type) |
Add a name to a list. More... | |
OYAPI const char *OYEXPORT | oyStructList_GetName (oyStructList_s *texts, int pos, oyNAME_e type) |
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... | |
oyStruct_s * | oyStructList_Get_ (oyStructList_s_ *list, int pos) |
oyStructList_s pointer access More... | |
int | oyStructList_ReferenceAt_ (oyStructList_s_ *list, int pos) |
oyStructList_s pointer referencing More... | |
oyStruct_s * | oyStructList_GetType_ (oyStructList_s_ *list, int pos, oyOBJECT_e type) |
oyStructList_s pointer access More... | |
Public Member Functions inherited from oyStruct_s | |
const char * | oyStruct_GetTextFromModule (oyStruct_s *obj, oyNAME_e name_type, uint32_t flags) |
get object infos from a module More... | |
const char * | oyStruct_GetText (oyStruct_s *obj, oyNAME_e name_type, uint32_t flags) |
Get a text dump. More... | |
int | oyStruct_RegisterStaticMessageFunc (int type, oyStruct_RegisterStaticMessageFunc_f msg, oyStruct_RegisterStaticFreeFunc_f free_func) |
register a function for verbosity More... | |
const char * | oyStruct_GetInfo (oyPointer context_object, oyNAME_e type, int flags) |
get a additional string from a object More... | |
const char * | oyStructTypeToText (oyOBJECT_e type) |
Objects type to small string. More... | |
Data Fields | |
const oyOBJECT_e | type_ |
Type of object. More... | |
oyStruct_Copy_f | copy |
Copy function. More... | |
oyStruct_Release_f | release |
Release function. More... | |
oyObject_s | oy_ |
Oyranos internal object. More... | |
Data Fields inherited from oyStruct_s | |
const oyOBJECT_e | type_ |
Type of object. More... | |
oyStruct_Copy_f | copy |
Copy function. More... | |
oyStruct_Release_f | release |
Release function. More... | |
oyObject_s | oy_ |
Oyranos internal object. More... | |
a pointer list
OYAPI int OYEXPORT oyStructList_AddName | ( | oyStructList_s * | texts, |
const char * | text, | ||
int | pos, | ||
oyNAME_e | type | ||
) |
Add a name to a list.
Function oyStructList_AddName
The text can be get back with oyStructList_GetName().
texts | the texts list |
text | the string to add |
pos | the position of the string in list or -1 for the end |
type | supported are:
|
References oyOption_s::oy_, OY_INTERNAL, oyOBJECT_OPTION_S, oyObject_SetName(), oyOption_s::oyOption_FromRegistration(), oyOption_s::oyOption_Release(), oyStructList_GetRefType(), and oyStructList_MoveIn().
Referenced by oyStructList_MoveInName().
int oyStructList_Clear | ( | oyStructList_s * | list | ) |
Release all listed objects.
Function oyStructList_Clear
Referenced by 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.
[in] | structlist | StructList struct object |
object | NULL - means reference, the optional object triggers a real copy |
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_).
References oyOBJECT_STRUCT_LIST_S, oyStructList_Clear(), and type_.
int oyStructList_Count | ( | oyStructList_s * | list | ) |
oyStructList_s count
Function oyStructList_Count
Referenced by oyProfile_GetWhitePoint().
oyStructList_s * oyStructList_Create | ( | oyOBJECT_e | parent_type, |
const char * | list_name, | ||
oyObject_s | object | ||
) |
Create a new oyStruct_s list.
Function oyStructList_Create
parent_type | type of parent object |
list_name | optional list name |
object | the optional object |
Referenced by oyProfileTag_s::oyProfileTag_CreateFromText().
oyStruct_s * oyStructList_Get_ | ( | oyStructList_s_ * | list, |
int | pos | ||
) |
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.
[in] | cache_list | the list to search in |
[in] | flags | - 0 - assume text, length is strlen()
|
[in] | hash_text | the text to search for in the cache_list |
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.
[in] | cache_list | the list to search in |
[in] | flags | - 0 - assume text, length is strlen()
|
[in] | hash_text | the text to search for in the cache_list |
[in] | type | thre requested object type |
const char * oyStructList_GetID | ( | oyStructList_s * | list, |
int | intent_spaces, | ||
uint32_t | flags | ||
) |
Eventually build and obtain the lists member names.
Function oyStructList_GetID
OYAPI const char *OYEXPORT oyStructList_GetName | ( | oyStructList_s * | texts, |
int | pos, | ||
oyNAME_e | type | ||
) |
Add a name to a list.
Function oyStructList_GetName
The text must have added with oyStructList_AddName().
References oyOption_s::oy_, oyObject_GetName(), oyOBJECT_OPTION_S, oyOption_s::oyOption_Release(), and oyStructList_GetRefType().
oyOBJECT_e oyStructList_GetParentObjType | ( | oyStructList_s * | list | ) |
Function oyStructList_GetParentObjType
oyStruct_s * oyStructList_GetRef | ( | oyStructList_s * | list, |
int | pos | ||
) |
oyStructList_s referenced pointer access
Function oyStructList_GetRef
Referenced by oyStructList_GetRefType().
oyStruct_s * oyStructList_GetRefType | ( | oyStructList_s * | list, |
int | pos, | ||
oyOBJECT_e | type | ||
) |
oyStructList_s pointer access
Function oyStructList_GetRefType
References oyStruct_s::oy_, oyStructList_GetRef(), oyStruct_s::release, and oyStruct_s::type_.
Referenced by oyStructList_AddName(), and oyStructList_GetName().
const char * oyStructList_GetText | ( | oyStructList_s * | list, |
oyNAME_e | name_type, | ||
int | intent_spaces, | ||
uint32_t flags | OY_UNUSED | ||
) |
Build and obtain the lists member names.
Function oyStructList_GetText
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
References oyStructList_Get_().
Referenced by oyProfile_GetWhitePoint().
oyStruct_s * oyStructList_GetType_ | ( | oyStructList_s_ * | list, |
int | pos, | ||
oyOBJECT_e | type | ||
) |
oyStructList_s pointer access
Function oyStructList_GetType_
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_.
[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 |
Referenced by oyStructList_AddName().
int oyStructList_MoveInName | ( | oyStructList_s * | texts, |
char ** | text, | ||
int | pos, | ||
oyNAME_e | type | ||
) |
Move a name into a list.
Function oyStructList_MoveInName
The text is released inside.
References oyStructList_AddName().
int oyStructList_MoveTo | ( | oyStructList_s * | s, |
int | pos, | ||
int | new_pos | ||
) |
Move a list element to a new position.
Function oyStructList_MoveTo
real used?
OYAPI oyStructList_s *OYEXPORT oyStructList_New | ( | oyObject_s | object | ) |
allocate a new StructList object
Function oyStructList_New
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.
Referenced by oyOptions_s::oyOptions_ObserverAdd().
int oyStructList_ReferenceAt_ | ( | oyStructList_s_ * | list, |
int | pos | ||
) |
oyStructList_s pointer referencing
Function oyStructList_ReferenceAt_
OYAPI int OYEXPORT oyStructList_Release | ( | oyStructList_s ** | structlist | ) |
release and possibly deallocate a oyStructList_s object
Function oyStructList_Release
[in,out] | structlist | StructList struct object |
Referenced by oyProfile_GetWhitePoint().
int oyStructList_ReleaseAt | ( | oyStructList_s * | list, |
int | pos | ||
) |
oyStructList_s pointer release
Function oyStructList_ReleaseAt
release and shrink
int oyStructList_Sort | ( | oyStructList_s * | list, |
int32_t * | rank_list | ||
) |
Sort a list according to a rank_list.
Function oyStructList_Sort
oyStruct_Copy_f oyStructList_s::copy |
Copy function.
oyObject_s oyStructList_s::oy_ |
Oyranos internal object.
Features name and hash. Do not change during object life time.
oyStruct_Release_f oyStructList_s::release |
Release function.
const oyOBJECT_e oyStructList_s::type_ |
Type of object.
The struct type tells Oyranos how to interprete hidden fields.
Referenced by oyStructList_CopyFrom().