[beast: 74/95] DRIVERS: use C++ inheritance instead of nesting for GObject struct derivation
- From: Tim Janik <timj src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [beast: 74/95] DRIVERS: use C++ inheritance instead of nesting for GObject struct derivation
- Date: Mon, 25 Mar 2013 00:42:43 +0000 (UTC)
commit af02ee25ae9b12035cfa053dc07d1628451e2183
Author: Tim Janik <timj gnu org>
Date: Fri Mar 22 15:43:30 2013 +0100
DRIVERS: use C++ inheritance instead of nesting for GObject struct derivation
drivers/bse-portaudio/bsepcmdevice-portaudio.hh | 21 +++++++++------------
drivers/bsemididevice-alsa.hh | 20 ++++++++------------
drivers/bsepcmdevice-alsa.hh | 20 ++++++++------------
3 files changed, 25 insertions(+), 36 deletions(-)
---
diff --git a/drivers/bse-portaudio/bsepcmdevice-portaudio.hh b/drivers/bse-portaudio/bsepcmdevice-portaudio.hh
index 04d1ec2..dd20f06 100644
--- a/drivers/bse-portaudio/bsepcmdevice-portaudio.hh
+++ b/drivers/bse-portaudio/bsepcmdevice-portaudio.hh
@@ -4,23 +4,20 @@
#include <bse/bsepcmdevice.hh>
#include <bse/bseplugin.hh>
G_BEGIN_DECLS
-/* --- object type macros --- */
+
#define BSE_TYPE_PCM_DEVICE_PORT_AUDIO (BSE_EXPORT_TYPE_ID (BsePcmDevicePortAudio))
#define BSE_PCM_DEVICE_PORT_AUDIO(object) (G_TYPE_CHECK_INSTANCE_CAST ((object),
BSE_TYPE_PCM_DEVICE_PORT_AUDIO, BsePcmDevicePortAudio))
#define BSE_PCM_DEVICE_PORT_AUDIO_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class),
BSE_TYPE_PCM_DEVICE_PORT_AUDIO, BsePcmDevicePortAudioClass))
#define BSE_IS_PCM_DEVICE_PORT_AUDIO(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object),
BSE_TYPE_PCM_DEVICE_PORT_AUDIO))
#define BSE_IS_PCM_DEVICE_PORT_AUDIO_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class),
BSE_TYPE_PCM_DEVICE_PORT_AUDIO))
#define BSE_PCM_DEVICE_PORT_AUDIO_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS ((object),
BSE_TYPE_PCM_DEVICE_PORT_AUDIO, BsePcmDevicePortAudioClass))
-/* --- BsePcmDevicePortAudio object --- */
-typedef struct _BsePcmDevicePortAudio BsePcmDevicePortAudio;
-typedef struct _BsePcmDevicePortAudioClass BsePcmDevicePortAudioClass;
-struct _BsePcmDevicePortAudio
-{
- BsePcmDevice parent_object;
-};
-struct _BsePcmDevicePortAudioClass
-{
- BsePcmDeviceClass parent_class;
-};
+
+struct BsePcmDevicePortAudio : BsePcmDevice
+{};
+
+struct BsePcmDevicePortAudioClass : BsePcmDeviceClass
+{};
+
G_END_DECLS
+
#endif /* __BSE_PCM_DEVICE_PORTAUDIO_H__ */
diff --git a/drivers/bsemididevice-alsa.hh b/drivers/bsemididevice-alsa.hh
index cb08823..32e91df 100644
--- a/drivers/bsemididevice-alsa.hh
+++ b/drivers/bsemididevice-alsa.hh
@@ -4,23 +4,19 @@
#include <bse/bsemididevice.hh>
#include <bse/bseplugin.hh>
G_BEGIN_DECLS
-/* --- object type macros --- */
+
#define BSE_TYPE_MIDI_DEVICE_ALSA (bse_midi_device_alsa_get_type())
#define BSE_MIDI_DEVICE_ALSA(object) (G_TYPE_CHECK_INSTANCE_CAST ((object),
BSE_TYPE_MIDI_DEVICE_ALSA, BseMidiDeviceALSA))
#define BSE_MIDI_DEVICE_ALSA_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), BSE_TYPE_MIDI_DEVICE_ALSA,
BseMidiDeviceALSAClass))
#define BSE_IS_MIDI_DEVICE_ALSA(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object),
BSE_TYPE_MIDI_DEVICE_ALSA))
#define BSE_IS_MIDI_DEVICE_ALSA_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), BSE_TYPE_MIDI_DEVICE_ALSA))
#define BSE_MIDI_DEVICE_ALSA_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS ((object),
BSE_TYPE_MIDI_DEVICE_ALSA, BseMidiDeviceALSAClass))
-/* --- BseMidiDeviceALSA object --- */
-typedef struct _BseMidiDeviceALSA BseMidiDeviceALSA;
-typedef struct _BseMidiDeviceALSAClass BseMidiDeviceALSAClass;
-struct _BseMidiDeviceALSA
-{
- BseMidiDevice parent_object;
-};
-struct _BseMidiDeviceALSAClass
-{
- BseMidiDeviceClass parent_class;
-};
+
+struct BseMidiDeviceALSA : BseMidiDevice
+{};
+struct BseMidiDeviceALSAClass : BseMidiDeviceClass
+{};
+
G_END_DECLS
+
#endif /* __BSE_MIDI_DEVICE_ALSA_H__ */
diff --git a/drivers/bsepcmdevice-alsa.hh b/drivers/bsepcmdevice-alsa.hh
index 39218b0..93591c1 100644
--- a/drivers/bsepcmdevice-alsa.hh
+++ b/drivers/bsepcmdevice-alsa.hh
@@ -4,23 +4,19 @@
#include <bse/bsepcmdevice.hh>
#include <bse/bseplugin.hh>
G_BEGIN_DECLS
-/* --- object type macros --- */
+
#define BSE_TYPE_PCM_DEVICE_ALSA (bse_pcm_device_alsa_get_type())
#define BSE_PCM_DEVICE_ALSA(object) (G_TYPE_CHECK_INSTANCE_CAST ((object),
BSE_TYPE_PCM_DEVICE_ALSA, BsePcmDeviceALSA))
#define BSE_PCM_DEVICE_ALSA_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), BSE_TYPE_PCM_DEVICE_ALSA,
BsePcmDeviceALSAClass))
#define BSE_IS_PCM_DEVICE_ALSA(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object),
BSE_TYPE_PCM_DEVICE_ALSA))
#define BSE_IS_PCM_DEVICE_ALSA_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), BSE_TYPE_PCM_DEVICE_ALSA))
#define BSE_PCM_DEVICE_ALSA_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS ((object),
BSE_TYPE_PCM_DEVICE_ALSA, BsePcmDeviceALSAClass))
-/* --- BsePcmDeviceALSA object --- */
-typedef struct _BsePcmDeviceALSA BsePcmDeviceALSA;
-typedef struct _BsePcmDeviceALSAClass BsePcmDeviceALSAClass;
-struct _BsePcmDeviceALSA
-{
- BsePcmDevice parent_object;
-};
-struct _BsePcmDeviceALSAClass
-{
- BsePcmDeviceClass parent_class;
-};
+
+struct BsePcmDeviceALSA : BsePcmDevice
+{};
+struct BsePcmDeviceALSAClass : BsePcmDeviceClass
+{};
+
G_END_DECLS
+
#endif /* __BSE_PCM_DEVICE_ALSA_H__ */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]