ScPropertyCollection.h
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
24typedef 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
37typedef struct {
47 union {
48 int integer;
49 char const *string;
50 ScBool boolean;
51 float floating_point;
52 };
54
63typedef struct ScOpaquePropertyCollection ScPropertyCollection;
64
74SC_EXPORT
76 char const *key);
77
88SC_EXPORT
90 char const *key,
91 ScPropertyValue *out_value);
92
106SC_EXPORT
108 char const *key,
109 ScPropertyValue value);
110
124SC_EXPORT
126 char const *key,
127 ScBool *out_value);
128
142SC_EXPORT
144 char const *key,
145 int *out_value);
146
160SC_EXPORT
162 char const *key,
163 float *out_value);
164
179SC_EXPORT
181 char const *key,
182 char const **out_value);
183
196SC_EXPORT
198 char const *key,
199 ScBool value);
200
213SC_EXPORT
215 char const *key,
216 int value);
217
230SC_EXPORT
232 char const *key,
233 float value);
234
247SC_EXPORT
249 char const *key,
250 char const *value);
251
253
254#endif // SC_PROPERTY_COLLECTION_H_
Common functions and data structures.
Common definitions used throughout the ScanditSDK API.
#define SC_EXTERN_C_BEGIN
Start of external C code.
Definition: ScConfig.h:19
#define SC_EXTERN_C_END
End of external C code.
Definition: ScConfig.h:28
int32_t ScBool
Boolean value, can be SC_TRUE or SC_FALSE.
Definition: ScConfig.h:167
ScPropertyType type
Definition: ScPropertyCollection.h:42
ScPropertyType
Property types.
Definition: ScPropertyCollection.h:24
Represents a typed settings property value.
Definition: ScPropertyCollection.h:37
Handle to a collection of properties.
ScBool sc_property_collection_set_property_value(ScPropertyCollection *properties, char const *key, ScPropertyValue value)
Set custom property value.
ScBool sc_property_collection_set_float_property(ScPropertyCollection *properties, char const *key, float value)
Set a float property to the given property collection.
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.
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.
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_set_int_property(ScPropertyCollection *properties, char const *key, int value)
Set an int property to the given property collection.
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_get_property_value(ScPropertyCollection const *properties, char const *key, ScPropertyValue *out_value)
Retrieves set property value by name.
ScBool sc_property_collection_set_string_property(ScPropertyCollection *properties, char const *key, char const *value)
Set a string property to the given property collection.