diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-02-21 13:27:51 +0000 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-02-21 13:27:51 +0000 |
commit | 04622f7d2210cbb8036502afadf5bcdcb0394d28 (patch) | |
tree | 1ba5f0321aaf86f6050193dd8283d85a7f4acd39 /obj-types.h | |
parent | 1cc790fae01e4392d4cf96820f6402528f611c44 (diff) | |
download | rsyslog-04622f7d2210cbb8036502afadf5bcdcb0394d28.tar.gz rsyslog-04622f7d2210cbb8036502afadf5bcdcb0394d28.tar.bz2 rsyslog-04622f7d2210cbb8036502afadf5bcdcb0394d28.zip |
first steps in implementing object interfaces (stage work for later dynamic
class loading)
Diffstat (limited to 'obj-types.h')
-rw-r--r-- | obj-types.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/obj-types.h b/obj-types.h index d823af47..3046e96f 100644 --- a/obj-types.h +++ b/obj-types.h @@ -296,6 +296,14 @@ typedef struct interface_s { objID_t oID; /* our object ID (later dynamically assigned) */ } interface_t; + +/* the following macro is used to get access to an object (not an instance, + * just the class itself!). It must be called before any of the object's + * methods can be accessed. + */ +#define objUse(obj) \ + obj##QueryInterface(&obj) + /* defines data that must always be present at the very begin of the interface structure */ #define ifBEGIN \ int ifVersion; /* must be set to version requested */ \ @@ -306,7 +314,7 @@ typedef struct interface_s { * the beginning */ #define DEFobjCurrIf(obj) \ - obj##_if_t obj = { .ifVersion = obj##CURR_IF_VERSION }; + static obj##_if_t obj = { .ifVersion = obj##CURR_IF_VERSION }; /* ------------------------------ end object loader system ------------------------------ */ |