Oyranos Color Management System API - Version 0.9.6
Public Member Functions | Data Fields
oyNamedColors_s Struct Reference

List of Single Color objects. More...

#include <oyNamedColors_s.h>

Inheritance diagram for oyNamedColors_s:
Inheritance graph
Collaboration diagram for oyNamedColors_s:
Collaboration graph

Public Member Functions

OYAPI oyNamedColors_s *OYEXPORT oyNamedColors_New (oyObject_s object)
 allocate a new NamedColors object More...
 
 oyNamedColors_Copy
 Copy or Reference a NamedColors object. More...
 
OYAPI int OYEXPORT oyNamedColors_Release (oyNamedColors_s **namedcolors)
 release and possibly deallocate a oyNamedColors_s object More...
 
OYAPI int OYEXPORT oyNamedColors_MoveIn (oyNamedColors_s *list, oyNamedColor_s **obj, int pos)
 add an element to a NamedColors list More...
 
OYAPI int OYEXPORT oyNamedColors_ReleaseAt (oyNamedColors_s *list, int pos)
 release a element from a NamedColors list More...
 
OYAPI oyNamedColor_s *OYEXPORT oyNamedColors_Get (oyNamedColors_s *list, int pos)
 get a element of a NamedColors list More...
 
OYAPI int OYEXPORT oyNamedColors_Count (oyNamedColors_s *list)
 count the elements in a NamedColors list More...
 
OYAPI int OYEXPORT oyNamedColors_Clear (oyNamedColors_s *list)
 clear the elements in a NamedColors list More...
 
OYAPI int OYEXPORT oyNamedColors_Sort (oyNamedColors_s *list, int32_t *rank_list)
 sort a list according to a rank_list More...
 
void oyNamedColors_SetPrefix (oyNamedColors_s *colors, const char *string)
 set name prefix More...
 
void oyNamedColors_SetSuffix (oyNamedColors_s *colors, const char *string)
 set name suffix More...
 
const char * oyNamedColors_GetPrefix (oyNamedColors_s *colors)
 get name prefix More...
 
const char * oyNamedColors_GetSuffix (oyNamedColors_s *colors)
 get name suffix More...
 
const char * oyNamedColors_GetColorName (oyNamedColors_s *colors, int pos)
 get full length name More...
 
void oyNamedColors_Release__Members (oyNamedColors_s_ *namedcolors)
 Custom NamedColors destructor. More...
 
int oyNamedColors_Init__Members (oyNamedColors_s_ *namedcolors)
 Custom NamedColors constructor. More...
 
int oyNamedColors_Copy__Members (oyNamedColors_s_ *dst, oyNamedColors_s_ *src)
 Custom NamedColors copy constructor. More...
 
- Public Member Functions inherited from oyList_s
OYAPI oyList_s *OYEXPORT oyList_New (oyObject_s object)
 allocate a new List object More...
 
 oyList_Copy
 Copy or Reference a List object. More...
 
OYAPI int OYEXPORT oyList_Release (oyList_s **list)
 release and possibly deallocate a oyList_s object More...
 
OYAPI int OYEXPORT oyList_MoveIn (oyList_s *list, oyLis_s **obj, int pos)
 add an element to a List list More...
 
OYAPI int OYEXPORT oyList_ReleaseAt (oyList_s *list, int pos)
 release a element from a List list More...
 
OYAPI oyLis_s *OYEXPORT oyList_Get (oyList_s *list, int pos)
 get a element of a List list More...
 
OYAPI int OYEXPORT oyList_Count (oyList_s *list)
 count the elements in a List list More...
 
OYAPI int OYEXPORT oyList_Clear (oyList_s *list)
 clear the elements in a List list More...
 
OYAPI int OYEXPORT oyList_Sort (oyList_s *list, int32_t *rank_list)
 sort a list according to a rank_list More...
 
void oyList_Release__Members (oyList_s_ *list)
 Custom List destructor. More...
 
int oyList_Init__Members (oyList_s_ *list)
 Custom List constructor. More...
 
int oyList_Copy__Members (oyList_s_ *dst, oyList_s_ *src)
 Custom List copy constructor. 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...
 
 oyStruct_RegisterStaticMessageFunc
 register a function for verbosity More...
 
 oyStruct_GetInfo
 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 oyList_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...
 
- 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...
 

Detailed Description

List of Single Color objects.

Version
Oyranos: 0.9.5
Since
2007/10/00 (Oyranos: 0.1.8)
Date
2013/08/15

Member Function Documentation

OYAPI int OYEXPORT oyNamedColors_Clear ( oyNamedColors_s list)

clear the elements in a NamedColors list

Function oyNamedColors_Clear

Parameters
[in,out]listthe list
Returns
0 - success; otherwise - error
Version
Oyranos: 0.3.0
Since
2011/02/01 (Oyranos: 0.3.0)
Date
2011/02/01

References oyOBJECT_NAMED_COLORS_S, and oyStructList_s::oyStructList_Clear().

oyNamedColors_Copy

Copy or Reference a NamedColors object.

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

Parameters
[in]namedcolorsNamedColors struct object
objectNULL - means reference, the optional object triggers a real copy

Referenced by oyNamedColors_Copy__Members(), and oyNamedColors_New().

int oyNamedColors_Copy__Members ( oyNamedColors_s_ *  dst,
oyNamedColors_s_ *  src 
)
OYAPI int OYEXPORT oyNamedColors_Count ( oyNamedColors_s list)

count the elements in a NamedColors list

Function oyNamedColors_Count

Parameters
[in,out]listthe list
Returns
element count
Version
Oyranos: 0.1.10
Since
2010/07/05 (Oyranos: 0.1.10)
Date
2010/07/05

References oyOBJECT_NAMED_COLORS_S, and oyStructList_s::oyStructList_Count().

OYAPI oyNamedColor_s *OYEXPORT oyNamedColors_Get ( oyNamedColors_s list,
int  pos 
)

get a element of a NamedColors list

Function oyNamedColors_Get

Parameters
[in,out]listthe list
posposition
Version
Oyranos: 0.1.10
Since
2010/07/05 (Oyranos: 0.1.10)
Date
2010/07/05

References oyOBJECT_NAMED_COLOR_S, oyOBJECT_NAMED_COLORS_S, and oyStructList_s::oyStructList_GetRefType().

const char * oyNamedColors_GetColorName ( oyNamedColors_s colors,
int  pos 
)

get full length name

The name is constructed from suffix, name and prefix.

Parameters
[in]colorsOyranos colors struct pointer
[in]posnth color in list
Returns
string
Version
Oyranos: 0.9.5
Date
2013/12/12
Since
2013/09/03 (Oyranos: 0.9.5)

References oyNamedColor_s::oy_, oyNAME_NAME, oyNAME_NICK, oyNamedColor_s::oyNamedColor_GetName(), oyNamedColor_s::oyNamedColor_Release(), oyObject_GetAlloc(), oyObject_GetDeAlloc(), oyObject_GetName(), oyOBJECT_NAMED_COLOR_S, oyOBJECT_NAMED_COLORS_S, oyObject_SetName(), and oyStructList_s::oyStructList_GetRefType().

const char * oyNamedColors_GetPrefix ( oyNamedColors_s colors)

get name prefix

Parameters
[in]colorsOyranos colors struct pointer
Returns
prefix string
Version
Oyranos: 0.9.5
Date
2013/09/03
Since
2013/09/03 (Oyranos: 0.9.5)

References oyOBJECT_NAMED_COLORS_S.

const char * oyNamedColors_GetSuffix ( oyNamedColors_s colors)

get name suffix

Parameters
[in]colorsOyranos colors struct pointer
Returns
suffix string
Version
Oyranos: 0.9.5
Date
2013/09/03
Since
2013/09/03 (Oyranos: 0.9.5)

References oyOBJECT_NAMED_COLORS_S.

int oyNamedColors_Init__Members ( oyNamedColors_s_ *  namedcolors)

Custom NamedColors constructor.

Function oyNamedColors_Init__Members

Referenced by oyNamedColors_Copy__Members().

OYAPI int OYEXPORT oyNamedColors_MoveIn ( oyNamedColors_s list,
oyNamedColor_s **  obj,
int  pos 
)

add an element to a NamedColors list

Function oyNamedColors_MoveIn

Parameters
[in]listlist
[in,out]objlist element
posposition
Version
Oyranos: 0.1.10
Since
2010/07/05 (Oyranos: 0.1.10)
Date
2010/07/05

References oyOBJECT_NAMED_COLOR_S, oyOBJECT_NAMED_COLORS_S, oyStructList_s::oyStructList_Create(), oyStructList_s::oyStructList_MoveIn(), and oyNamedColor_s::type_.

OYAPI oyNamedColors_s *OYEXPORT oyNamedColors_New ( oyObject_s  object)

allocate a new NamedColors object

Function oyNamedColors_New

References oyNamedColors_Copy(), oyOBJECT_NAMED_COLORS_S, and oyOBJECT_OBJECT_S.

Referenced by oyNamedColors_Copy__Members().

OYAPI int OYEXPORT oyNamedColors_Release ( oyNamedColors_s **  namedcolors)

release and possibly deallocate a oyNamedColors_s object

Function oyNamedColors_Release

Parameters
[in,out]namedcolorsNamedColors struct object

References oyOBJECT_NAMED_COLORS_S.

Referenced by oyNamedColors_Copy__Members().

void oyNamedColors_Release__Members ( oyNamedColors_s_ *  namedcolors)

Custom NamedColors destructor.

Function oyNamedColors_Release__Members

References oyObject_GetDeAlloc().

Referenced by oyNamedColors_Copy__Members().

OYAPI int OYEXPORT oyNamedColors_ReleaseAt ( oyNamedColors_s list,
int  pos 
)

release a element from a NamedColors list

Function oyNamedColors_ReleaseAt

Parameters
[in,out]listthe list
posposition
Version
Oyranos: 0.1.10
Since
2010/07/05 (Oyranos: 0.1.10)
Date
2010/07/05

References oyOBJECT_NAMED_COLORS_S, oyStructList_s::oyStructList_GetParentObjType(), and oyStructList_s::oyStructList_ReleaseAt().

void oyNamedColors_SetPrefix ( oyNamedColors_s colors,
const char *  string 
)

set name prefix

Parameters
[in]colorsOyranos colors struct pointer
[in]stringprefix string
Version
Oyranos: 0.9.5
Date
2013/08/25
Since
2013/08/25 (Oyranos: 0.9.5)

References oyObject_GetAlloc(), oyObject_GetDeAlloc(), and oyOBJECT_NAMED_COLORS_S.

void oyNamedColors_SetSuffix ( oyNamedColors_s colors,
const char *  string 
)

set name suffix

Parameters
[in]colorsOyranos colors struct pointer
[in]stringsuffix string
Version
Oyranos: 0.9.5
Date
2013/08/25
Since
2013/08/25 (Oyranos: 0.9.5)

References oyObject_GetAlloc(), oyObject_GetDeAlloc(), and oyOBJECT_NAMED_COLORS_S.

OYAPI int OYEXPORT oyNamedColors_Sort ( oyNamedColors_s list,
int32_t *  rank_list 
)

sort a list according to a rank_list

Function oyNamedColors_Sort

Version
Oyranos: 0.3.0
Since
2011/02/01 (Oyranos: 0.3.0)
Date
2011/02/01

References oyOBJECT_NAMED_COLORS_S, and oyStructList_s::oyStructList_Sort().

Field Documentation

oyStruct_Copy_f oyNamedColors_s::copy

Copy function.

oyObject_s oyNamedColors_s::oy_

Oyranos internal object.

Features name and hash. Do not change during object life time.

oyStruct_Release_f oyNamedColors_s::release

Release function.

const oyOBJECT_e oyNamedColors_s::type_

Type of object.

The struct type tells Oyranos how to interprete hidden fields.