DEKI/ENGINE docs
Deki 0.19.0
Modular C++ 2D engine for embedded displays and desktop
Loading...
Searching...
No Matches
DekiEditor::PlatformRegistry Class Reference

The available platforms, all loaded from JSON: the project's own, those its packages offer, and board packs. More...

#include <C:/Users/kirby/Documents/Github/deki/deki-editor/deki-editor/include/deki-editor/build/PlatformConfig.h>

Public Member Functions

void RegisterPlatform (const PlatformConfig &config)
const PlatformConfig * GetPlatform (const std::string &id) const
 The platform with this id, or nullptr.
std::vector< std::string > GetAvailablePlatforms () const
std::vector< std::pair< std::string, std::string > > GetPlatformDisplayList () const
 (id, display name) pairs, for the UI.
bool LoadPlatformsFromDirectory (const std::string &path)
 Loads the platform JSON files in path. True if any were loaded.
bool LoadPlatformsFromBoardPacks ()
 Loads platforms from installed board packs (~/.deki-editor/board-packs/).
void Clear ()
bool SavePlatformToFile (const PlatformConfig &config, const std::string &directory)
 Saves config as a JSON file in directory. True on success.
bool DeletePlatform (const std::string &id, const std::string &directory)
 Removes a platform from the registry and deletes its JSON file in directory.
void UnregisterPlatform (const std::string &id)
 Removes a platform from the registry; its file stays.

Static Public Member Functions

static PlatformRegistry & Instance ()

Detailed Description

The available platforms, all loaded from JSON: the project's own, those its packages offer, and board packs.

Member Function Documentation

◆ Instance()

PlatformRegistry & DekiEditor::PlatformRegistry::Instance ( )
static

◆ RegisterPlatform()

void DekiEditor::PlatformRegistry::RegisterPlatform ( const PlatformConfig & config)

◆ GetPlatform()

const PlatformConfig * DekiEditor::PlatformRegistry::GetPlatform ( const std::string & id) const

The platform with this id, or nullptr.

◆ GetAvailablePlatforms()

std::vector< std::string > DekiEditor::PlatformRegistry::GetAvailablePlatforms ( ) const

◆ GetPlatformDisplayList()

std::vector< std::pair< std::string, std::string > > DekiEditor::PlatformRegistry::GetPlatformDisplayList ( ) const

(id, display name) pairs, for the UI.

◆ LoadPlatformsFromDirectory()

bool DekiEditor::PlatformRegistry::LoadPlatformsFromDirectory ( const std::string & path)

Loads the platform JSON files in path. True if any were loaded.

◆ LoadPlatformsFromBoardPacks()

bool DekiEditor::PlatformRegistry::LoadPlatformsFromBoardPacks ( )

Loads platforms from installed board packs (~/.deki-editor/board-packs/).

Skips ids already registered, so project platforms take priority. True if any were loaded.

◆ Clear()

void DekiEditor::PlatformRegistry::Clear ( )

◆ SavePlatformToFile()

bool DekiEditor::PlatformRegistry::SavePlatformToFile ( const PlatformConfig & config,
const std::string & directory )

Saves config as a JSON file in directory. True on success.

◆ DeletePlatform()

bool DekiEditor::PlatformRegistry::DeletePlatform ( const std::string & id,
const std::string & directory )

Removes a platform from the registry and deletes its JSON file in directory.

True on success.

◆ UnregisterPlatform()

void DekiEditor::PlatformRegistry::UnregisterPlatform ( const std::string & id)

Removes a platform from the registry; its file stays.


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