Guitarix
gx_system::PresetBanks Class Reference

#include <gx_json.h>

Classes

class  iterator
 

Public Member Functions

 PresetBanks ()
 
 ~PresetBanks ()
 
void readJSON_remote (gx_system::JsonParser &jp)
 
bool check_reparse ()
 
void parse (const std::string &bank_path, const std::string &preset_dir, const std::string &factory_path, const char *scratchpad_name, const char *scratchpad_file)
 
PresetFileget_file (const Glib::ustring &bank) const
 
int get_index (const Glib::ustring &bank) const
 
iterator begin ()
 
iterator end ()
 
bool remove (const Glib::ustring &bank)
 
void check_save ()
 
void save ()
 
int size ()
 
Glib::ustring get_name (int n)
 
void insert (PresetFile *f, int position=0)
 
bool has_entry (const Glib::ustring &bank) const
 
bool has_file (const std::string &file) const
 
bool rename (const Glib::ustring &oldname, const Glib::ustring &newname, const std::string &newfile)
 
void reorder (const std::vector< Glib::ustring > &neworder)
 
void make_bank_unique (Glib::ustring &name, std::string *file=0)
 

Static Public Member Functions

static void make_valid_utf8 (Glib::ustring &s)
 
static std::string add_preset_postfix (const std::string &filename)
 
static bool strip_preset_postfix (std::string &name)
 

Private Types

typedef std::list< PresetFile * > bl_type
 

Private Member Functions

void parse_factory_list (const std::string &path)
 
void parse_bank_list (bl_type::iterator pos)
 
void collect_lost_banks (const char *scratchpad_name, const char *scratchpad_file)
 

Private Attributes

bl_type banklist
 
std::string filepath
 
time_t mtime
 
std::string preset_dir
 

Friends

class gx_engine::GxMachineRemote
 

Detailed Description

Definition at line 415 of file gx_json.h.

Member Typedef Documentation

◆ bl_type

typedef std::list<PresetFile*> gx_system::PresetBanks::bl_type
private

Definition at line 417 of file gx_json.h.

Constructor & Destructor Documentation

◆ PresetBanks()

gx_system::PresetBanks::PresetBanks ( )

◆ ~PresetBanks()

gx_system::PresetBanks::~PresetBanks ( )

Member Function Documentation

◆ add_preset_postfix()

static std::string gx_system::PresetBanks::add_preset_postfix ( const std::string &  filename)
static

◆ begin()

iterator gx_system::PresetBanks::begin ( )
inline

Definition at line 445 of file gx_json.h.

◆ check_reparse()

bool gx_system::PresetBanks::check_reparse ( )

◆ check_save()

void gx_system::PresetBanks::check_save ( )

◆ collect_lost_banks()

void gx_system::PresetBanks::collect_lost_banks ( const char *  scratchpad_name,
const char *  scratchpad_file 
)
private

◆ end()

iterator gx_system::PresetBanks::end ( )
inline

Definition at line 446 of file gx_json.h.

◆ get_file()

PresetFile * gx_system::PresetBanks::get_file ( const Glib::ustring &  bank) const

◆ get_index()

int gx_system::PresetBanks::get_index ( const Glib::ustring &  bank) const

◆ get_name()

Glib::ustring gx_system::PresetBanks::get_name ( int  n)

◆ has_entry()

bool gx_system::PresetBanks::has_entry ( const Glib::ustring &  bank) const
inline

Definition at line 453 of file gx_json.h.

◆ has_file()

bool gx_system::PresetBanks::has_file ( const std::string &  file) const

◆ insert()

void gx_system::PresetBanks::insert ( PresetFile f,
int  position = 0 
)

◆ make_bank_unique()

void gx_system::PresetBanks::make_bank_unique ( Glib::ustring &  name,
std::string *  file = 0 
)

◆ make_valid_utf8()

static void gx_system::PresetBanks::make_valid_utf8 ( Glib::ustring &  s)
static

◆ parse()

void gx_system::PresetBanks::parse ( const std::string &  bank_path,
const std::string &  preset_dir,
const std::string &  factory_path,
const char *  scratchpad_name,
const char *  scratchpad_file 
)

◆ parse_bank_list()

void gx_system::PresetBanks::parse_bank_list ( bl_type::iterator  pos)
private

◆ parse_factory_list()

void gx_system::PresetBanks::parse_factory_list ( const std::string &  path)
private

◆ readJSON_remote()

void gx_system::PresetBanks::readJSON_remote ( gx_system::JsonParser jp)

◆ remove()

bool gx_system::PresetBanks::remove ( const Glib::ustring &  bank)

◆ rename()

bool gx_system::PresetBanks::rename ( const Glib::ustring &  oldname,
const Glib::ustring &  newname,
const std::string &  newfile 
)

◆ reorder()

void gx_system::PresetBanks::reorder ( const std::vector< Glib::ustring > &  neworder)

◆ save()

void gx_system::PresetBanks::save ( )

◆ size()

int gx_system::PresetBanks::size ( void  )
inline

Definition at line 450 of file gx_json.h.

◆ strip_preset_postfix()

static bool gx_system::PresetBanks::strip_preset_postfix ( std::string &  name)
static

Friends And Related Function Documentation

◆ gx_engine::GxMachineRemote

friend class gx_engine::GxMachineRemote
friend

Definition at line 425 of file gx_json.h.

Member Data Documentation

◆ banklist

bl_type gx_system::PresetBanks::banklist
private

Definition at line 418 of file gx_json.h.

Referenced by begin(), end(), and size().

◆ filepath

std::string gx_system::PresetBanks::filepath
private

Definition at line 419 of file gx_json.h.

◆ mtime

time_t gx_system::PresetBanks::mtime
private

Definition at line 420 of file gx_json.h.

◆ preset_dir

std::string gx_system::PresetBanks::preset_dir
private

Definition at line 421 of file gx_json.h.


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