Oyranos  git-devel
Oyranos is a full featured Color Management System
Macros | Typedefs | Enumerations | Functions
oyranos_object.h File Reference
#include <oyranos_core.h>

Macros

#define oyOBJECT_MAX_CUSTOM   1024
 
#define oyOBJECT_MAX_STRUCT   300
 
#define OY_SELECT_FILTER   2048
 select from filter More...
 
#define OY_SELECT_COMMON   4096
 select from policy More...
 
#define OY_MATCH_SUB_STRING   0x100
 
#define OY_SYNTAX_SKIP_REG   0x200
 
#define OY_SYNTAX_SKIP_PATTERN   0x400
 

Typedefs

typedef int(* oyPointer_release_f) (oyPointer *)
 oyPointer_s release function type More...
 
typedef void(* oyLockRelease_f) (oyPointer lock, const char *marker, int line)
 Lock release function type. More...
 
typedef void(* oyLock_f) (oyPointer lock, const char *marker, int line)
 Lock function type. More...
 
typedef void(* oyUnLock_f) (oyPointer look, const char *marker, int line)
 Unlock function type. More...
 
typedef struct oyObject_s_ * oyObject_s
 

Enumerations

enum  oyOBJECT_e { ,
  oyOBJECT_OBJECT_S, oyOBJECT_MONITOR_S, oyOBJECT_NAMED_COLOR_S, oyOBJECT_NAMED_COLORS_S,
  oyOBJECT_PROFILE_S, oyOBJECT_PROFILE_TAG_S, oyOBJECT_PROFILES_S, oyOBJECT_OPTION_S,
  oyOBJECT_OPTIONS_S, oyOBJECT_RECTANGLE_S, oyOBJECT_IMAGE_S, oyOBJECT_ARRAY2D_S,
  oyOBJECT_CONNECTOR_S = 20, oyOBJECT_CONNECTOR_IMAGING_S, oyOBJECT_CONNECTOR_MAX_S, oyOBJECT_FILTER_PLUG_S = 30,
  oyOBJECT_FILTER_PLUGS_S, oyOBJECT_FILTER_SOCKET_S, oyOBJECT_FILTER_CORE_S, oyOBJECT_FILTER_CORES_S,
  oyOBJECT_FILTER_NODE_S, oyOBJECT_FILTER_NODES_S, oyOBJECT_FILTER_GRAPH_S, oyOBJECT_PIXEL_ACCESS_S,
  oyOBJECT_CONVERSION_S, oyOBJECT_CMM_HANDLE_S = 50, oyOBJECT_POINTER_S, oyOBJECT_CMM_INFO_S,
  oyOBJECT_CMM_API_S, oyOBJECT_CMM_APIS_S, oyOBJECT_CMM_API_FILTER_S, oyOBJECT_CMM_API1_S,
  oyOBJECT_CMM_API2_S, oyOBJECT_CMM_API3_S, oyOBJECT_CMM_API4_S, oyOBJECT_CMM_API5_S,
  oyOBJECT_CMM_API6_S, oyOBJECT_CMM_API7_S, oyOBJECT_CMM_DATA_TYPES_S, oyOBJECT_CMM_API8_S,
  oyOBJECT_CMM_API9_S, oyOBJECT_CMM_API10_S, oyOBJECT_CMM_UI_S, oyOBJECT_CMM_OBJECT_TYPE_S,
  oyOBJECT_CMM_API_FILTERS_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_STRUCT_LIST_S, oyOBJECT_BLOB_S, oyOBJECT_CONFIG_S,
  oyOBJECT_CONFIGS_S, oyOBJECT_UI_HANDLER_S, oyOBJECT_FORMS_ARGS_S, oyOBJECT_CALLBACK_S,
  oyOBJECT_OBSERVER_S, oyOBJECT_CONF_DOMAIN_S, oyOBJECT_INFO_STATIC_S, oyOBJECT_LIST_S,
  oyOBJECT_LIS_S, oyOBJECT_JOB_S, oyOBJECT_DB_API_S, oyOBJECT_MONITOR_HOOKS_S = 120,
  oyOBJECT_MONITOR_HOOKS2_S = 122, oyOBJECT_MONITOR_HOOKS3_S = 123
}
 Oyranos structure type. More...
 
enum  oyOPTIONATTRIBUTE_e {
  oyOPTIONATTRIBUTE_BASIC = 0, oyOPTIONATTRIBUTE_EDIT = 32, oyOPTIONATTRIBUTE_AUTOMATIC = 64, oyOPTIONATTRIBUTE_ADVANCED = 128,
  oyOPTIONATTRIBUTE_FRONT = 256, oyOPTIONATTRIBUTE_DOUBLE = 512
}
 Usage and State Properties. More...
 
enum  oyBOOLEAN_e { oyBOOLEAN_INTERSECTION, oyBOOLEAN_SUBSTRACTION, oyBOOLEAN_DIFFERENZ, oyBOOLEAN_UNION }
 boolean operations More...
 
enum  oyFILTER_REG_e { ,
  oyFILTER_REG_TOP = 0x01, oyFILTER_REG_DOMAIN = 0x02, oyFILTER_REG_TYPE = 0x04, oyFILTER_REG_APPLICATION = 0x08,
  oyFILTER_REG_OPTION = 0x10, oyFILTER_REG_MAX = 0x20
}
 
enum  oySTATUS_e
 File status type. More...
 
enum  oyERROR_e { oyERROR_USER = 10, oyERROR_DATA_READ, oyERROR_DATA_WRITE, oyERROR_DATA_AMBIGUITY }
 Common errors. More...
 

Functions

char * oyFilterRegistrationToText (const char *registration, oyFILTER_REG_e type, oyAlloc_f allocateFunc)
 analyse registration string More...
 
int oyFilterRegistrationMatch (const char *registration, const char *pattern, oyOBJECT_e api_number)
 analyse registration string and compare with a given pattern More...
 
int oyFilterRegistrationMatchKey (const char *registration1, const char *registration2, oyOBJECT_e api_number)
 compare two registration strings, skip key attributes More...
 
const char * oyGetKeyFromRegistration (const char *registration)
 get oyFILTER_REG_MAX from registration string More...
 
int oyFilterStringMatch (const char *registration, const char *pattern, oyOBJECT_e api_number, char path_separator, char key_separator, int flags)
 analyse string and compare with a given pattern More...
 

Detailed Description

[Template file inheritance graph] +– oyranos_object.template.h

Oyranos is an open source Color Management System

Copyright:
2004-2022 (C) Kai-Uwe Behrmann
Author
Kai-Uwe Behrmann ku.b@.nosp@m.gmx..nosp@m.de
License:
new BSD - see: http://www.opensource.org/licenses/BSD-3-Clause

Macro Definition Documentation

◆ OY_MATCH_SUB_STRING

#define OY_MATCH_SUB_STRING   0x100
Since
0.9.7

◆ OY_SYNTAX_SKIP_PATTERN

#define OY_SYNTAX_SKIP_PATTERN   0x400
Since
0.9.7

avoid "-,_,+" syntax checking in search patterns

◆ OY_SYNTAX_SKIP_REG

#define OY_SYNTAX_SKIP_REG   0x200
Since
0.9.7

avoid "-,_,+" syntax checking in registration strings

Typedef Documentation

◆ oyLock_f

typedef void(* oyLock_f) (oyPointer lock, const char *marker, int line)

Lock function type.

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

◆ oyLockRelease_f

typedef void(* oyLockRelease_f) (oyPointer lock, const char *marker, int line)

Lock release function type.

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

◆ oyPointer_release_f

typedef int(* oyPointer_release_f) (oyPointer *)

oyPointer_s release function type

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

◆ oyUnLock_f

typedef void(* oyUnLock_f) (oyPointer look, const char *marker, int line)

Unlock function type.

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

Enumeration Type Documentation

◆ oyBOOLEAN_e

boolean operations

Version
Oyranos: 0.1.8
Since
2008/06/28 (Oyranos: 0.1.8)
Date
2008/06/28
Enumerator
oyBOOLEAN_INTERSECTION 

and, the part covered by A and B

oyBOOLEAN_SUBSTRACTION 

minus, the part covered by A but not by B

oyBOOLEAN_DIFFERENZ 

xor, exclusive parts of A and B

oyBOOLEAN_UNION 

or, the parts covered by A or B or both

Function Documentation

◆ oyFilterRegistrationMatch()

int oyFilterRegistrationMatch ( const char *  registration,
const char *  pattern,
oyOBJECT_e  api_number 
)

analyse registration string and compare with a given pattern

Function oyFilterRegistrationMatch The rules are described in the Backend Modules overview. The function is intensively used.

Parameters
registrationregistration string to analise
patternpattern or key name to compare with
api_numberselect object type
Returns
match, useable for ranking
Version
Oyranos: 0.1.10
Date
2009/07/16
Since
2008/06/26 (Oyranos: 0.1.8)

References oyFilterStringMatch().

Referenced by l2cmsMOptions_Handle(), l2cmsMOptions_Handle2(), l2cmsMOptions_Handle3(), and l2cmsMOptions_Handle4().

◆ oyFilterRegistrationMatchKey()

int oyFilterRegistrationMatchKey ( const char *  registration_a,
const char *  registration_b,
oyOBJECT_e  api_number 
)

compare two registration strings, skip key attributes

Function oyFilterRegistrationMatchKey The rules are described in the Backend Modules overview. The rules in this function map especially to key storage rules for Oyranos DB.

The non key part is handled as namespace and should match in order to consider the two keys from the same namespace. The second condition is the key name is stripped from all attributes. This means the string part after the last slash '/' is taken into account only until the first point '.' or end of string appears.

Parameters
registration_aregistration key
registration_bregistration key
api_numberselect object type
Returns
match, useable for ranking
Version
Oyranos: 0.1.10
Since
2010/06/03 (Oyranos: 0.1.10)
Date
2010/06/03

Referenced by oyOptions_s::oyOptions_Set().

◆ oyFilterRegistrationToText()

char* oyFilterRegistrationToText ( const char *  registration,
oyFILTER_REG_e  fields,
oyAlloc_f  allocateFunc 
)

analyse registration string

Function oyFilterRegistrationToText

Parameters
registrationregistration string to analyse
[in]fieldskind of answere in return
[in]allocateFuncuse this or Oyranos standard allocator
Version
Oyranos: 0.1.10
Since
2008/06/26 (Oyranos: 0.1.8)
Date
2009/05/27

For several oyFILTER_REG bits we compose a new registration string.

◆ oyFilterStringMatch()

int oyFilterStringMatch ( const char *  registration,
const char *  pattern,
oyOBJECT_e  api_number,
char  path_separator,
char  key_separator,
int  flags 
)

analyse string and compare with a given pattern

The rules are described in the Backend Modules overview. This version is configurable

Parameters
registrationregistration string to analise
patternpattern or key name to compare with
api_numberselect object type
path_separatora char to split into hierarchical levels
key_separatora char to split key strings
flagsoptions:
  • OY_MATCH_SUB_STRING - find sub string; default is whole word match
  • OY_SYNTAX_SKIP_REG - avoid "-,_,+" syntax checking in registration
  • OY_SYNTAX_SKIP_PATTERN - avoid "-,_,+" syntax checking in pattern
Returns
match, useable for ranking
Version
Oyranos: 0.9.7
Date
2017/01/05
Since
2017/01/05 (Oyranos: 0.9.7)

Referenced by oyFilterRegistrationMatch().

◆ oyGetKeyFromRegistration()

const char* oyGetKeyFromRegistration ( const char *  registration)

get oyFILTER_REG_MAX from registration string

Function oyGetKeyFromRegistration This function is similar to oyFilterRegistrationToText() .

Parameters
registrationregistration string to analyse
Returns
the key name
Version
Oyranos: 0.9.6
Date
2015/03/09
Since
2015/03/09 (Oyranos: 0.9.6)

References OY_SLASH_C.