[openbeos-midi] Re: goals update?
- From: "Marcus Overhagen" <ml@xxxxxxxxxxxx>
- To: openbeos-midi@xxxxxxxxxxxxx
- Date: Tue, 4 Jun 2002 21:27:44 +0200
shaggyafterjack <shaggyafterjack@xxxxxxxxx> wrote:
>Also, how to implement a global bsynth object named be_synth globally per
>application and detect
>the whether it has been initialized or not? Is there an objects database in
>the be framework that
>I can do a look up or is it something more fundamental in the language (C++)
>than that?
This is simple.
You already have
extern _IMPEXP_MIDI BSynth *be_synth;
in the header file.
The only thing you need in you cpp file is a global object, and the pointer
variable.
do it like this:
static BSynth be_synth_object;
BSynth *be_synth = &be_synth_object;
when the library gets loaded, the constructor will be called,
destructor should be called on unloading.
Marcus
- Follow-Ups:
- [openbeos-midi] Re: goals update?
- From: Michael Pfeiffer
Other related posts:
- » [openbeos-midi] goals update?
- » [openbeos-midi] Re: goals update?
- » [openbeos-midi] Re: goals update?
- » [openbeos-midi] Re: goals update?
- [openbeos-midi] Re: goals update?
- From: Michael Pfeiffer