SolarCapture C Bindings
Main Page
Modules
Data Structures
Files
File List
Globals
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Groups
include
solar_capture
args.h
Go to the documentation of this file.
1
8
#ifndef __SOLAR_CAPTURE_ARGS_H__
9
#define __SOLAR_CAPTURE_ARGS_H__
10
15
enum
sc_param_type
{
16
SC_PARAM_STR
,
17
SC_PARAM_INT
,
18
SC_PARAM_OBJ
,
19
SC_PARAM_DBL
,
20
};
21
22
27
struct
sc_arg
{
28
const
char
*
name
;
29
enum
sc_param_type
type
;
30
union
{
31
const
char
* str;
32
int64_t i;
33
struct
sc_object
* obj;
34
double
dbl;
35
}
val
;
36
};
37
43
#define SC_ARG_INT(_name, _val) \
44
{ .name = _name, .type = SC_PARAM_INT, .val.i = _val }
45
51
#define SC_ARG_STR(_name, _val) \
52
{ .name = _name, .type = SC_PARAM_STR, .val.str = _val }
53
59
#define SC_ARG_OBJ(_name, _val) \
60
{ .name = _name, .type = SC_PARAM_OBJ, .val.obj = _val }
61
67
#define SC_ARG_DBL(_name, _val) \
68
{ .name = _name, .type = SC_PARAM_DBL, .val.dbl = _val }
69
70
71
#endif
/* __SOLAR_CAPTURE_ARGS_H__ */
72
SC_PARAM_DBL
Definition:
args.h:19
sc_param_type
sc_param_type
Possible parameter types that can be used for arguments in a node's init function.
Definition:
args.h:15
SC_PARAM_INT
Definition:
args.h:17
sc_object
An opaque object. Use this to pass all types of data that are not ints, doubles or char arrays (see S...
sc_arg::val
union sc_arg::@0 val
SC_PARAM_OBJ
Definition:
args.h:18
sc_arg::name
const char * name
Definition:
args.h:28
sc_arg::type
enum sc_param_type type
Definition:
args.h:29
SC_PARAM_STR
Definition:
args.h:16
sc_arg
Representation of an argument. Used by node init functions.
Definition:
args.h:27
Generated on Tue Feb 10 2015 14:39:30 for SolarCapture C Bindings by
1.8.6