SGSubsystem classes: Subsystem and subsystem group API declaration standardisation.
This is a cleanup commit.
This commit is contained in:
parent
b73dfb08ae
commit
10662e4ca5
@ -34,8 +34,9 @@ class SGInterpolator : public SGSubsystem
|
||||
{
|
||||
public:
|
||||
SGInterpolator() { _list = 0; }
|
||||
virtual void init() {}
|
||||
virtual void update(double delta_time_sec);
|
||||
|
||||
// Subsystem API.
|
||||
void update(double delta_time_sec) override;
|
||||
|
||||
// Simple method that interpolates a double property value from
|
||||
// its current value (default of zero) to the specified target
|
||||
|
@ -33,9 +33,9 @@ class PropertyBasedMgr : public SGSubsystem,
|
||||
public SGPropertyChangeListener
|
||||
{
|
||||
public:
|
||||
// Subsystem API.
|
||||
void init() override;
|
||||
void shutdown() override;
|
||||
|
||||
void update(double delta_time_sec) override;
|
||||
|
||||
/**
|
||||
|
@ -51,10 +51,8 @@ public:
|
||||
|
||||
PropertyInterpolationMgr();
|
||||
|
||||
/**
|
||||
* Update all active interpolators.
|
||||
*/
|
||||
void update(double dt);
|
||||
// Subsystem API.
|
||||
void update(double dt) override;
|
||||
|
||||
/**
|
||||
* Create a new property interpolator.
|
||||
|
@ -42,12 +42,13 @@ public:
|
||||
SGTerraSync();
|
||||
virtual ~SGTerraSync();
|
||||
|
||||
virtual void init();
|
||||
virtual void shutdown();
|
||||
virtual void reinit();
|
||||
virtual void bind();
|
||||
virtual void unbind();
|
||||
virtual void update(double);
|
||||
// Subsystem API.
|
||||
void bind() override;
|
||||
void init() override;
|
||||
void reinit() override;
|
||||
void shutdown() override;
|
||||
void unbind() override;
|
||||
void update(double) override;
|
||||
|
||||
/// notify terrasync that the sim was repositioned, as opposed to
|
||||
/// us travelling in a direction. Avoid last_lat / last_lon blocking
|
||||
|
@ -52,15 +52,18 @@ public:
|
||||
SGSoundMgr();
|
||||
~SGSoundMgr();
|
||||
|
||||
void init();
|
||||
void update(double dt);
|
||||
// Subsystem API.
|
||||
void init() override;
|
||||
void reinit() override;
|
||||
void resume() override;
|
||||
void suspend() override;
|
||||
void update(double dt) override;
|
||||
|
||||
// Subsystem identification.
|
||||
static const char* subsystemName() { return "sound"; }
|
||||
|
||||
void suspend();
|
||||
void resume();
|
||||
void stop();
|
||||
|
||||
void reinit();
|
||||
|
||||
/**
|
||||
* Select a specific sound device.
|
||||
* Requires a init/reinit call before sound is actually switched.
|
||||
@ -323,8 +326,6 @@ public:
|
||||
|
||||
bool testForError(std::string s, std::string name = "sound manager");
|
||||
|
||||
static const char* subsystemName() { return "sound"; };
|
||||
|
||||
private:
|
||||
class SoundManagerPrivate;
|
||||
/// private implementation object
|
||||
|
@ -37,10 +37,11 @@ class SGPerformanceMonitor : public SGSubsystem
|
||||
public:
|
||||
SGPerformanceMonitor(SGSubsystemMgr* subSysMgr, SGPropertyNode_ptr root);
|
||||
|
||||
virtual void bind (void);
|
||||
virtual void unbind (void);
|
||||
virtual void init (void);
|
||||
virtual void update (double dt);
|
||||
// Subsystem API.
|
||||
void bind() override;
|
||||
void init() override;
|
||||
void unbind() override;
|
||||
void update(double dt) override;
|
||||
|
||||
private:
|
||||
static void subSystemMgrHook(void* userData, const std::string& name, SampleStatistic* timeStat);
|
||||
|
@ -76,10 +76,11 @@ public:
|
||||
SGEventMgr();
|
||||
~SGEventMgr();
|
||||
|
||||
virtual void init();
|
||||
virtual void update(double delta_time_sec);
|
||||
virtual void unbind();
|
||||
virtual void shutdown();
|
||||
// Subsystem API.
|
||||
void init() override;
|
||||
void shutdown() override;
|
||||
void unbind() override;
|
||||
void update(double delta_time_sec) override;
|
||||
|
||||
void setRealtimeProperty(SGPropertyNode* node) { _rtProp = node; }
|
||||
|
||||
|
@ -382,17 +382,18 @@ public:
|
||||
SGSubsystemGroup (const char *name);
|
||||
virtual ~SGSubsystemGroup ();
|
||||
|
||||
// Subsystem API.
|
||||
void bind() override;
|
||||
InitStatus incrementalInit() override;
|
||||
void init() override;
|
||||
InitStatus incrementalInit () override;
|
||||
void postinit () override;
|
||||
void reinit () override;
|
||||
void shutdown () override;
|
||||
void bind () override;
|
||||
void unbind () override;
|
||||
void update (double delta_time_sec) override;
|
||||
void suspend () override;
|
||||
void resume () override;
|
||||
bool is_suspended () const override;
|
||||
void postinit() override;
|
||||
void reinit() override;
|
||||
void resume() override;
|
||||
void shutdown() override;
|
||||
void suspend() override;
|
||||
void unbind() override;
|
||||
void update(double delta_time_sec) override;
|
||||
bool is_suspended() const override;
|
||||
|
||||
virtual void set_subsystem (const std::string &name,
|
||||
SGSubsystem * subsystem,
|
||||
@ -506,17 +507,18 @@ public:
|
||||
SGSubsystemMgr (const char *name);
|
||||
virtual ~SGSubsystemMgr ();
|
||||
|
||||
void init () override;
|
||||
InitStatus incrementalInit () override;
|
||||
void postinit () override;
|
||||
void reinit () override;
|
||||
void shutdown () override;
|
||||
void bind () override;
|
||||
void unbind () override;
|
||||
void update (double delta_time_sec) override;
|
||||
void suspend () override;
|
||||
void resume () override;
|
||||
bool is_suspended () const override;
|
||||
// Subsystem API.
|
||||
void bind() override;
|
||||
void init() override;
|
||||
InitStatus incrementalInit() override;
|
||||
void postinit() override;
|
||||
void reinit() override;
|
||||
void resume() override;
|
||||
void shutdown() override;
|
||||
void suspend() override;
|
||||
void unbind() override;
|
||||
void update(double delta_time_sec) override;
|
||||
bool is_suspended() const override;
|
||||
|
||||
virtual void add (const char * name,
|
||||
SGSubsystem * subsystem,
|
||||
|
Loading…
Reference in New Issue
Block a user