libultraship
Reimplementations of libultra (N64 SDK) functions for modern hardware
Loading...
Searching...
No Matches
Ship::ConfigVersionUpdater Class Referenceabstract

Abstract class representing a Config Version Updater, intended to express how to upgrade a Configuration file from one version of a config to another (i.e. removing default values, changing option names, etc.) It can be used by subclassing ConfigVersionUpdater, implementing the Update function, and implementing the Constructor passing the version that the Config is being updated to to this class' constructor from the child class' default constructor. For example: More...

#include <Config.h>

Public Member Functions

 ConfigVersionUpdater (uint32_t toVersion)
 
virtual void Update (Config *conf)=0
 Performs actions on a Config object via the provided pointer to update it to the next version. (i.e. removing/changing default values or renaming options)
 
uint32_t GetVersion ()
 Get the value of mVersion.
 

Protected Attributes

uint32_t mVersion
 

Detailed Description

Abstract class representing a Config Version Updater, intended to express how to upgrade a Configuration file from one version of a config to another (i.e. removing default values, changing option names, etc.) It can be used by subclassing ConfigVersionUpdater, implementing the Update function, and implementing the Constructor passing the version that the Config is being updated to to this class' constructor from the child class' default constructor. For example:

ConfigVersion1Updater() : ConfigVersionUpdater(1) {}
Abstract class representing a Config Version Updater, intended to express how to upgrade a Configurat...
Definition Config.h:23

Finally, give an instance of this subclass to a Config object via RegisterConfigVersionUpdater and call RunVersionUpdates.

Constructor & Destructor Documentation

◆ ConfigVersionUpdater()

Ship::ConfigVersionUpdater::ConfigVersionUpdater ( uint32_t  toVersion)

Member Function Documentation

◆ GetVersion()

uint32_t Ship::ConfigVersionUpdater::GetVersion ( )

Get the value of mVersion.

Returns
uint32_t

◆ Update()

virtual void Ship::ConfigVersionUpdater::Update ( Config conf)
pure virtual

Performs actions on a Config object via the provided pointer to update it to the next version. (i.e. removing/changing default values or renaming options)

Parameters
conf

Member Data Documentation

◆ mVersion

uint32_t Ship::ConfigVersionUpdater::mVersion
protected

The documentation for this class was generated from the following file: