Guitarix
gx_engine::Parameter Class Referenceabstract

#include <gx_parameter.h>

Inheritance diagram for gx_engine::Parameter:
Collaboration diagram for gx_engine::Parameter:

Public Types

enum  ctrl_type { None, Continuous, Switch, Enum }
 
enum  toggle_type { OnOff = 0, Constant = 1, _Count = 2 }
 

Public Member Functions

std::string group_id () const
 
 Parameter (const string &id, const string &name, value_type vtp, ctrl_type ctp, bool preset, bool ctrl)
 
 Parameter (gx_system::JsonParser &jp)
 
virtual ~Parameter ()
 
virtual void serializeJSON (gx_system::JsonWriter &jw)
 
bool isUsed () const
 
void setUsed ()
 
void dump (gx_system::JsonWriter *jw)
 
const char * get_typename () const
 
bool isFloat () const
 
bool isInt () const
 
bool isBool () const
 
bool isFile () const
 
bool isString () const
 
ctrl_type getControlType () const
 
bool isControllable () const
 
bool isInPreset () const
 
bool isSavable () const
 
void setSavable (bool v)
 
const string & id () const
 
const string & group () const
 
string l_group () const
 
const string & name () const
 
string l_name () const
 
const string & desc () const
 
void set_desc (const string &desc)
 
string l_desc () const
 
void set_log_display ()
 
bool is_log_display ()
 
void set_blocked (bool v)
 
bool get_blocked ()
 
void set_midi_blocked (bool v)
 
bool get_midi_blocked ()
 
bool operator== (const Parameter &p) const
 
virtual void stdJSON_value ()=0
 
virtual bool on_off_value ()=0
 
virtual void writeJSON (gx_system::JsonWriter &jw) const =0
 
virtual void readJSON_value (gx_system::JsonParser &jp)=0
 
virtual void setJSON_value ()=0
 
virtual bool compareJSON_value ()=0
 
virtual bool hasRange () const
 
virtual float getLowerAsFloat () const
 
virtual float getUpperAsFloat () const
 
virtual float getStepAsFloat () const
 
virtual const value_pairgetValueNames () const
 
FloatParametergetFloat ()
 
IntParametergetInt ()
 
EnumParametergetEnum ()
 
BoolParametergetBool ()
 
FileParametergetFile ()
 
StringParametergetString ()
 
sigc::signal< void, float > & signal_changed_float ()
 
sigc::signal< void, int > & signal_changed_int ()
 
sigc::signal< void, bool > & signal_changed_bool ()
 
sigc::signal< void, const Glib::ustring & > & signal_changed_string ()
 

Static Public Member Functions

static const char * value_label (const value_pair &vp)
 

Protected Types

enum  value_type {
  tp_float, tp_int, tp_bool, tp_file,
  tp_string, tp_special
}
 
enum  display_flags { dtp_normal, dtp_log = 1 }
 

Protected Member Functions

void range_warning (float value, float lower, float upper)
 

Static Protected Member Functions

static gx_system::JsonParserjp_next (gx_system::JsonParser &jp, const char *key)
 

Protected Attributes

string _id
 
string _name
 
string _group
 
string _desc
 
enum value_type v_type: 3
 
enum ctrl_type c_type: 3
 
unsigned int d_flags: 2
 
bool save_in_preset: 1
 
bool controllable: 1
 
bool do_not_save: 1
 
bool blocked: 1
 
bool midi_blocked: 1
 
bool used: 1
 

Friends

class MidiController
 
void compare_parameter (const char *title, Parameter *p1, Parameter *p2, bool all)
 

Detailed Description

Definition at line 104 of file gx_parameter.h.

Member Enumeration Documentation

◆ ctrl_type

Enumerator
None 
Continuous 
Switch 
Enum 

Definition at line 106 of file gx_parameter.h.

◆ display_flags

Enumerator
dtp_normal 
dtp_log 

Definition at line 115 of file gx_parameter.h.

◆ toggle_type

Enumerator
OnOff 
Constant 
_Count 

Definition at line 107 of file gx_parameter.h.

◆ value_type

Enumerator
tp_float 
tp_int 
tp_bool 
tp_file 
tp_string 
tp_special 

Definition at line 114 of file gx_parameter.h.

Constructor & Destructor Documentation

◆ Parameter() [1/2]

gx_engine::Parameter::Parameter ( const string &  id,
const string &  name,
value_type  vtp,
ctrl_type  ctp,
bool  preset,
bool  ctrl 
)
inline

Definition at line 132 of file gx_parameter.h.

◆ Parameter() [2/2]

gx_engine::Parameter::Parameter ( gx_system::JsonParser jp)

Definition at line 898 of file gx_paramtable.cpp.

◆ ~Parameter()

gx_engine::Parameter::~Parameter ( )
virtual

Definition at line 943 of file gx_paramtable.cpp.

Member Function Documentation

◆ compareJSON_value()

◆ desc()

◆ dump()

void gx_engine::Parameter::dump ( gx_system::JsonWriter jw)

Definition at line 1989 of file gx_paramtable.cpp.

◆ get_blocked()

bool gx_engine::Parameter::get_blocked ( )
inline

Definition at line 182 of file gx_parameter.h.

◆ get_midi_blocked()

bool gx_engine::Parameter::get_midi_blocked ( )
inline

Definition at line 184 of file gx_parameter.h.

◆ get_typename()

const char * gx_engine::Parameter::get_typename ( ) const

Definition at line 975 of file gx_paramtable.cpp.

◆ getBool()

BoolParameter & gx_engine::Parameter::getBool ( )
inline

◆ getControlType()

◆ getEnum()

EnumParameter & gx_engine::Parameter::getEnum ( )
inline

Definition at line 463 of file gx_parameter.h.

◆ getFile()

FileParameter & gx_engine::Parameter::getFile ( )
inline

Definition at line 474 of file gx_parameter.h.

◆ getFloat()

FloatParameter & gx_engine::Parameter::getFloat ( )
inline

Definition at line 453 of file gx_parameter.h.

Referenced by gx_gui::CpBase::init(), and gx_gui::UiSelector< T >::UiSelector().

◆ getInt()

IntParameter & gx_engine::Parameter::getInt ( )
inline

Definition at line 458 of file gx_parameter.h.

Referenced by gx_gui::UiSelector< T >::UiSelector().

◆ getLowerAsFloat()

float gx_engine::Parameter::getLowerAsFloat ( ) const
virtual

◆ getStepAsFloat()

float gx_engine::Parameter::getStepAsFloat ( ) const
virtual

Reimplemented in gx_engine::ParameterV< float >.

Definition at line 986 of file gx_paramtable.cpp.

Referenced by gx_main_midi::MidiConnect::MidiConnect().

◆ getString()

StringParameter & gx_engine::Parameter::getString ( )
inline

Definition at line 479 of file gx_parameter.h.

◆ getUpperAsFloat()

float gx_engine::Parameter::getUpperAsFloat ( ) const
virtual

◆ getValueNames()

const value_pair * gx_engine::Parameter::getValueNames ( ) const
virtual

◆ group()

const string& gx_engine::Parameter::group ( ) const
inline

Definition at line 172 of file gx_parameter.h.

Referenced by gx_gui::CpBase::init(), and gx_gui::UiSelector< T >::UiSelector().

◆ group_id()

std::string gx_engine::Parameter::group_id ( ) const
inline

Definition at line 131 of file gx_parameter.h.

◆ hasRange()

bool gx_engine::Parameter::hasRange ( ) const
virtual

Reimplemented in gx_engine::ParameterV< int >, and gx_engine::ParameterV< float >.

Definition at line 982 of file gx_paramtable.cpp.

◆ id()

◆ is_log_display()

bool gx_engine::Parameter::is_log_display ( )
inline

Definition at line 180 of file gx_parameter.h.

Referenced by gx_gui::CpBase::init().

◆ isBool()

bool gx_engine::Parameter::isBool ( ) const
inline

Definition at line 163 of file gx_parameter.h.

◆ isControllable()

bool gx_engine::Parameter::isControllable ( ) const
inline

Definition at line 167 of file gx_parameter.h.

Referenced by gx_gui::GxBuilder::fixup_controlparameters().

◆ isFile()

bool gx_engine::Parameter::isFile ( ) const
inline

Definition at line 164 of file gx_parameter.h.

◆ isFloat()

bool gx_engine::Parameter::isFloat ( ) const
inline

Definition at line 161 of file gx_parameter.h.

Referenced by getFloat().

◆ isInPreset()

bool gx_engine::Parameter::isInPreset ( ) const
inline

Definition at line 168 of file gx_parameter.h.

◆ isInt()

bool gx_engine::Parameter::isInt ( ) const
inline

Definition at line 162 of file gx_parameter.h.

◆ isSavable()

bool gx_engine::Parameter::isSavable ( ) const
inline

Definition at line 169 of file gx_parameter.h.

◆ isString()

bool gx_engine::Parameter::isString ( ) const
inline

Definition at line 165 of file gx_parameter.h.

◆ isUsed()

bool gx_engine::Parameter::isUsed ( ) const
inline

Definition at line 153 of file gx_parameter.h.

◆ jp_next()

gx_system::JsonParser & gx_engine::Parameter::jp_next ( gx_system::JsonParser jp,
const char *  key 
)
staticprotected

Definition at line 873 of file gx_paramtable.cpp.

◆ l_desc()

string gx_engine::Parameter::l_desc ( ) const
inline

Definition at line 178 of file gx_parameter.h.

Referenced by gx_main_midi::MidiConnect::MidiConnect().

◆ l_group()

string gx_engine::Parameter::l_group ( ) const
inline

Definition at line 173 of file gx_parameter.h.

Referenced by gx_main_midi::MidiConnect::MidiConnect().

◆ l_name()

string gx_engine::Parameter::l_name ( ) const
inline

◆ name()

const string& gx_engine::Parameter::name ( ) const
inline

Definition at line 174 of file gx_parameter.h.

Referenced by gx_gui::CpBase::init(), and gx_gui::UiSelector< T >::UiSelector().

◆ on_off_value()

◆ operator==()

bool gx_engine::Parameter::operator== ( const Parameter p) const
inline

Definition at line 185 of file gx_parameter.h.

◆ range_warning()

void gx_engine::Parameter::range_warning ( float  value,
float  lower,
float  upper 
)
protected

◆ readJSON_value()

◆ serializeJSON()

◆ set_blocked()

void gx_engine::Parameter::set_blocked ( bool  v)
inline

Definition at line 181 of file gx_parameter.h.

◆ set_desc()

void gx_engine::Parameter::set_desc ( const string &  desc)
inline

Definition at line 177 of file gx_parameter.h.

◆ set_log_display()

void gx_engine::Parameter::set_log_display ( )
inline

Definition at line 179 of file gx_parameter.h.

◆ set_midi_blocked()

void gx_engine::Parameter::set_midi_blocked ( bool  v)
inline

Definition at line 183 of file gx_parameter.h.

◆ setJSON_value()

◆ setSavable()

void gx_engine::Parameter::setSavable ( bool  v)
inline

◆ setUsed()

void gx_engine::Parameter::setUsed ( )
inline

Definition at line 154 of file gx_parameter.h.

◆ signal_changed_bool()

sigc::signal< void, bool > & gx_engine::Parameter::signal_changed_bool ( )
inline

Definition at line 496 of file gx_parameter.h.

◆ signal_changed_float()

sigc::signal< void, float > & gx_engine::Parameter::signal_changed_float ( )
inline

Definition at line 484 of file gx_parameter.h.

◆ signal_changed_int()

sigc::signal< void, int > & gx_engine::Parameter::signal_changed_int ( )
inline

Definition at line 490 of file gx_parameter.h.

Referenced by gx_engine::GxMachine::GxMachine().

◆ signal_changed_string()

sigc::signal< void, const Glib::ustring & > & gx_engine::Parameter::signal_changed_string ( )
inline

Definition at line 502 of file gx_parameter.h.

◆ stdJSON_value()

◆ value_label()

static const char* gx_engine::Parameter::value_label ( const value_pair vp)
inlinestatic

Definition at line 197 of file gx_parameter.h.

Referenced by gx_gui::CpSelectorBase::CpSelectorBase().

◆ writeJSON()

Friends And Related Function Documentation

◆ compare_parameter

void compare_parameter ( const char *  title,
Parameter p1,
Parameter p2,
bool  all = false 
)
friend

Definition at line 1003 of file gx_paramtable.cpp.

◆ MidiController

friend class MidiController
friend

Definition at line 112 of file gx_parameter.h.

Member Data Documentation

◆ _desc

string gx_engine::Parameter::_desc
protected

Definition at line 117 of file gx_parameter.h.

Referenced by is_log_display(), l_desc(), and set_log_display().

◆ _group

string gx_engine::Parameter::_group
protected

Definition at line 117 of file gx_parameter.h.

Referenced by l_name(), and name().

◆ _id

string gx_engine::Parameter::_id
protected

◆ _name

string gx_engine::Parameter::_name
protected

Definition at line 117 of file gx_parameter.h.

Referenced by desc(), and set_desc().

◆ blocked

bool gx_engine::Parameter::blocked
protected

Definition at line 124 of file gx_parameter.h.

Referenced by get_midi_blocked(), and set_midi_blocked().

◆ c_type

enum ctrl_type gx_engine::Parameter::c_type
protected

Definition at line 119 of file gx_parameter.h.

Referenced by isInPreset().

◆ controllable

bool gx_engine::Parameter::controllable
protected

Definition at line 122 of file gx_parameter.h.

Referenced by isSavable().

◆ d_flags

unsigned int gx_engine::Parameter::d_flags
protected

Definition at line 120 of file gx_parameter.h.

Referenced by get_blocked(), and set_blocked().

◆ do_not_save

bool gx_engine::Parameter::do_not_save
protected

Definition at line 123 of file gx_parameter.h.

Referenced by group(), and id().

◆ midi_blocked

bool gx_engine::Parameter::midi_blocked
protected

Definition at line 125 of file gx_parameter.h.

Referenced by operator==().

◆ save_in_preset

bool gx_engine::Parameter::save_in_preset
protected

Definition at line 121 of file gx_parameter.h.

Referenced by setSavable().

◆ used

bool gx_engine::Parameter::used
protected

Definition at line 126 of file gx_parameter.h.

Referenced by setUsed().

◆ v_type

enum value_type gx_engine::Parameter::v_type
protected

Definition at line 118 of file gx_parameter.h.

Referenced by getControlType(), isBool(), isControllable(), isFile(), and isString().


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