Go to the documentation of this file.
1 
11 #ifndef SC_PROPERTY_COLLECTION_H_
12 #define SC_PROPERTY_COLLECTION_H_
13 
14 #include <Scandit/ScConfig.h>
15 #include <Scandit/ScCommon.h>
16 
18 
24 typedef enum {
25  SC_PROPERTY_TYPE_INT = 0,
26  SC_PROPERTY_TYPE_STRING = 1,
27  SC_PROPERTY_TYPE_BOOL = 2,
28  SC_PROPERTY_TYPE_UNKNOWN = 3,
29  SC_PROPERTY_TYPE_FLOAT = 4
31 
37 typedef struct {
47  union {
48  int integer;
49  char const *string;
50  ScBool boolean;
51  float floating_point;
52  };
54 
62 typedef struct ScOpaquePropertyCollection ScPropertyCollection;
63 
73 SC_EXPORT
75  char const *key);
76 
87 SC_EXPORT
89  char const *key,
90  ScPropertyValue *out_value);
91 
105 SC_EXPORT
107  char const *key,
108  ScPropertyValue value);
109 
123 SC_EXPORT
125  char const *key,
126  ScBool *out_value);
127 
141 SC_EXPORT
143  char const *key,
144  int *out_value);
145 
159 SC_EXPORT
161  char const *key,
162  float *out_value);
163 
178 SC_EXPORT
180  char const *key,
181  char const **out_value);
182 
195 SC_EXPORT
197  char const *key,
198  ScBool value);
199 
212 SC_EXPORT
214  char const *key,
215  int value);
216 
229 SC_EXPORT
231  char const *key,
232  float value);
233 
246 SC_EXPORT
248  char const *key,
249  char const *value);
250 
252 
253 #endif // SC_PROPERTY_COLLECTION_H_
Represents a typed settings property value.
Definition: ScPropertyCollection.h:37
ScBool sc_property_collection_set_bool_property(ScPropertyCollection *properties, char const *key, ScBool value)
Set a bool property to the given property collection.
ScBool sc_property_collection_is_property_known(ScPropertyCollection const *properties, char const *key)
Return whether a property with a given name is known to the collection.
ScBool sc_property_collection_get_string_property(ScPropertyCollection const *properties, char const *key, char const **out_value)
Retrieves a bool property from the given property collection.
Handle to a collection of properties.
ScBool sc_property_collection_get_int_property(ScPropertyCollection const *properties, char const *key, int *out_value)
Retrieves an int property from the given property collection.
ScBool sc_property_collection_get_bool_property(ScPropertyCollection const *properties, char const *key, ScBool *out_value)
Retrieves a bool property from the given property collection.
ScBool sc_property_collection_get_property_value(ScPropertyCollection const *properties, char const *key, ScPropertyValue *out_value)
Retrieves set property value by name.
#define SC_EXTERN_C_BEGIN
Start of external C code.
Definition: ScConfig.h:19
ScPropertyType
Property types.
Definition: ScPropertyCollection.h:24
ScBool sc_property_collection_get_float_property(ScPropertyCollection const *properties, char const *key, float *out_value)
Retrieves a float property from the given property collection.
ScPropertyType type
Definition: ScPropertyCollection.h:42
#define SC_EXTERN_C_END
End of external C code.
Definition: ScConfig.h:28
ScBool sc_property_collection_set_int_property(ScPropertyCollection *properties, char const *key, int value)
Set an int property to the given property collection.
ScBool sc_property_collection_set_property_value(ScPropertyCollection *properties, char const *key, ScPropertyValue value)
Set custom property value.
ScBool sc_property_collection_set_string_property(ScPropertyCollection *properties, char const *key, char const *value)
Set a string property to the given property collection.
Common definitions used throughout the ScanditSDK API.
Common functions and data structures.
ScBool sc_property_collection_set_float_property(ScPropertyCollection *properties, char const *key, float value)
Set a float property to the given property collection.
int32_t ScBool
Boolean value, can be SC_TRUE or SC_FALSE.
Definition: ScConfig.h:158