diff options
author | Andreas Färber <afaerber@suse.de> | 2013-01-23 12:20:18 +0100 |
---|---|---|
committer | Andreas Färber <afaerber@suse.de> | 2013-01-27 23:33:34 +0100 |
commit | 178623789465287624c48f7ef12d0ab83a1dc380 (patch) | |
tree | a62aad528a9c24e9d66e0aca7f64928827092b7d /include | |
parent | d89e12188d50f7f8a894027789f32fa7ba6226ad (diff) | |
download | qemu-178623789465287624c48f7ef12d0ab83a1dc380.tar.gz qemu-178623789465287624c48f7ef12d0ab83a1dc380.tar.bz2 qemu-178623789465287624c48f7ef12d0ab83a1dc380.zip |
qom: Introduce object_class_is_abstract()
This lets a caller check if an ObjectClass as returned by, e.g.,
object_class_by_name() is instantiatable.
Signed-off-by: Andreas Färber <afaerber@suse.de>
Cc: Anthony Liguori <anthony@codemonkey.ws>
Diffstat (limited to 'include')
-rw-r--r-- | include/qom/object.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/qom/object.h b/include/qom/object.h index 8e16ea8a44..48e80ba229 100644 --- a/include/qom/object.h +++ b/include/qom/object.h @@ -691,6 +691,14 @@ ObjectClass *object_class_get_parent(ObjectClass *klass); const char *object_class_get_name(ObjectClass *klass); /** + * object_class_is_abstract: + * @klass: The class to obtain the abstractness for. + * + * Returns: %true if @klass is abstract, %false otherwise. + */ +bool object_class_is_abstract(ObjectClass *klass); + +/** * object_class_by_name: * @typename: The QOM typename to obtain the class for. * |