Guitarix
gx_engine::Parameter Class Referenceabstract

#include <gx_parameter.h>

Inheritance diagram for gx_engine::Parameter:
gx_engine::FileParameter gx_engine::ParameterV< T > gx_engine::ParameterV< Glib::ustring > gx_engine::ParameterV< GxJConvSettings > gx_engine::ParameterV< GxSeqSettings > gx_engine::ParameterV< OscilloscopeInfo > gx_engine::ParameterV< bool > gx_engine::ParameterV< float > gx_engine::ParameterV< int >

Public Types

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

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)
 
virtual void trigger_changed ()
 
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)
 
bool isOutput () const
 
void setOutput (bool v)
 
bool isMaxlevel () const
 
void setMaxlevel (bool v)
 
bool isNoWarning () const
 
void setNoWarning (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 () const
 
void set_blocked (bool v)
 
bool get_blocked () const
 
void set_midi_blocked (bool v)
 
bool get_midi_blocked () const
 
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 output: 1
 
bool maxlevel: 1
 
bool nowarn: 1
 
bool used: 1
 

Private Member Functions

virtual bool midi_set (float n, float high, float llimit, float ulimit)
 
virtual bool midi_set_bpm (float n, float high, float llimit, float ulimit)
 

Friends

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

Detailed Description

Definition at line 106 of file gx_parameter.h.

Member Enumeration Documentation

◆ ctrl_type

Enumerator
None 
Continuous 
Switch 
Enum 

Definition at line 108 of file gx_parameter.h.

◆ display_flags

Enumerator
dtp_normal 
dtp_log 

Definition at line 116 of file gx_parameter.h.

◆ toggle_type

Enumerator
OnOff 
Constant 
Toggle 
Commander 
_Count 

Definition at line 109 of file gx_parameter.h.

◆ value_type

Enumerator
tp_float 
tp_int 
tp_bool 
tp_file 
tp_string 
tp_special 

Definition at line 115 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 136 of file gx_parameter.h.

◆ Parameter() [2/2]

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

◆ ~Parameter()

virtual gx_engine::Parameter::~Parameter ( )
virtual

Member Function Documentation

◆ compareJSON_value()

◆ desc()

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

Definition at line 189 of file gx_parameter.h.

Referenced by set_desc().

◆ dump()

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

◆ get_blocked()

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

Definition at line 195 of file gx_parameter.h.

◆ get_midi_blocked()

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

Definition at line 197 of file gx_parameter.h.

◆ get_typename()

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

◆ getBool()

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

Definition at line 490 of file gx_parameter.h.

◆ getControlType()

ctrl_type gx_engine::Parameter::getControlType ( ) const
inline

Definition at line 173 of file gx_parameter.h.

◆ getEnum()

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

Definition at line 484 of file gx_parameter.h.

◆ getFile()

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

Definition at line 495 of file gx_parameter.h.

◆ getFloat()

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

Definition at line 474 of file gx_parameter.h.

◆ getInt()

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

Definition at line 479 of file gx_parameter.h.

◆ getLowerAsFloat()

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

◆ getStepAsFloat()

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

Reimplemented in gx_engine::ParameterV< float >.

◆ getString()

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

Definition at line 500 of file gx_parameter.h.

◆ getUpperAsFloat()

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

◆ getValueNames()

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

◆ group()

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

Definition at line 185 of file gx_parameter.h.

◆ group_id()

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

Definition at line 135 of file gx_parameter.h.

◆ hasRange()

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

◆ id()

◆ is_log_display()

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

Definition at line 193 of file gx_parameter.h.

◆ isBool()

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

Definition at line 170 of file gx_parameter.h.

Referenced by getBool().

◆ isControllable()

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

Definition at line 174 of file gx_parameter.h.

◆ isFile()

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

Definition at line 171 of file gx_parameter.h.

Referenced by getFile().

◆ isFloat()

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

Definition at line 168 of file gx_parameter.h.

Referenced by getFloat().

◆ isInPreset()

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

Definition at line 175 of file gx_parameter.h.

◆ isInt()

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

Definition at line 169 of file gx_parameter.h.

Referenced by getInt().

◆ isMaxlevel()

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

Definition at line 180 of file gx_parameter.h.

◆ isNoWarning()

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

Definition at line 182 of file gx_parameter.h.

◆ isOutput()

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

Definition at line 178 of file gx_parameter.h.

◆ isSavable()

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

Definition at line 176 of file gx_parameter.h.

◆ isString()

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

Definition at line 172 of file gx_parameter.h.

Referenced by getString().

◆ isUsed()

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

Definition at line 160 of file gx_parameter.h.

◆ jp_next()

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

◆ l_desc()

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

Definition at line 191 of file gx_parameter.h.

◆ l_group()

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

Definition at line 186 of file gx_parameter.h.

◆ l_name()

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

Definition at line 188 of file gx_parameter.h.

◆ midi_set()

virtual bool gx_engine::Parameter::midi_set ( float  n,
float  high,
float  llimit,
float  ulimit 
)
privatevirtual

◆ midi_set_bpm()

virtual bool gx_engine::Parameter::midi_set_bpm ( float  n,
float  high,
float  llimit,
float  ulimit 
)
privatevirtual

Reimplemented in gx_engine::ParameterV< float >.

◆ name()

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

Definition at line 187 of file gx_parameter.h.

◆ on_off_value()

◆ operator==()

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

Definition at line 198 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 194 of file gx_parameter.h.

◆ set_desc()

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

Definition at line 190 of file gx_parameter.h.

◆ set_log_display()

void gx_engine::Parameter::set_log_display ( )
inline

Definition at line 192 of file gx_parameter.h.

◆ set_midi_blocked()

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

Definition at line 196 of file gx_parameter.h.

◆ setJSON_value()

◆ setMaxlevel()

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

Definition at line 181 of file gx_parameter.h.

◆ setNoWarning()

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

Definition at line 183 of file gx_parameter.h.

◆ setOutput()

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

Definition at line 179 of file gx_parameter.h.

◆ setSavable()

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

Definition at line 177 of file gx_parameter.h.

◆ setUsed()

void gx_engine::Parameter::setUsed ( )
inline

Definition at line 161 of file gx_parameter.h.

◆ signal_changed_bool()

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

Definition at line 517 of file gx_parameter.h.

◆ signal_changed_float()

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

Definition at line 505 of file gx_parameter.h.

◆ signal_changed_int()

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

Definition at line 511 of file gx_parameter.h.

◆ signal_changed_string()

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

Definition at line 523 of file gx_parameter.h.

◆ stdJSON_value()

◆ trigger_changed()

◆ value_label()

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

Definition at line 210 of file gx_parameter.h.

◆ writeJSON()

Friends And Related Function Documentation

◆ compare_parameter

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

◆ MidiController

friend class MidiController
friend

Definition at line 113 of file gx_parameter.h.

Member Data Documentation

◆ _desc

string gx_engine::Parameter::_desc
protected

Definition at line 118 of file gx_parameter.h.

Referenced by desc(), l_desc(), and set_desc().

◆ _group

string gx_engine::Parameter::_group
protected

Definition at line 118 of file gx_parameter.h.

Referenced by group(), and l_group().

◆ _id

string gx_engine::Parameter::_id
protected

Definition at line 117 of file gx_parameter.h.

Referenced by group_id(), and id().

◆ _name

string gx_engine::Parameter::_name
protected

Definition at line 118 of file gx_parameter.h.

Referenced by l_name(), and name().

◆ blocked

bool gx_engine::Parameter::blocked
protected

Definition at line 125 of file gx_parameter.h.

Referenced by get_blocked(), and set_blocked().

◆ c_type

enum ctrl_type gx_engine::Parameter::c_type
protected

Definition at line 120 of file gx_parameter.h.

Referenced by getControlType().

◆ controllable

bool gx_engine::Parameter::controllable
protected

Definition at line 123 of file gx_parameter.h.

Referenced by isControllable().

◆ d_flags

unsigned int gx_engine::Parameter::d_flags
protected

Definition at line 121 of file gx_parameter.h.

Referenced by is_log_display(), and set_log_display().

◆ do_not_save

bool gx_engine::Parameter::do_not_save
protected

Definition at line 124 of file gx_parameter.h.

Referenced by isSavable(), and setSavable().

◆ maxlevel

bool gx_engine::Parameter::maxlevel
protected

Definition at line 128 of file gx_parameter.h.

Referenced by isMaxlevel(), and setMaxlevel().

◆ midi_blocked

bool gx_engine::Parameter::midi_blocked
protected

Definition at line 126 of file gx_parameter.h.

Referenced by get_midi_blocked(), and set_midi_blocked().

◆ nowarn

bool gx_engine::Parameter::nowarn
protected

Definition at line 129 of file gx_parameter.h.

Referenced by isNoWarning(), and setNoWarning().

◆ output

bool gx_engine::Parameter::output
protected

Definition at line 127 of file gx_parameter.h.

Referenced by isOutput(), and setOutput().

◆ save_in_preset

bool gx_engine::Parameter::save_in_preset
protected

Definition at line 122 of file gx_parameter.h.

Referenced by isInPreset().

◆ used

bool gx_engine::Parameter::used
protected

Definition at line 130 of file gx_parameter.h.

Referenced by isUsed(), and setUsed().

◆ v_type

enum value_type gx_engine::Parameter::v_type
protected

Definition at line 119 of file gx_parameter.h.

Referenced by isBool(), isFile(), isFloat(), isInt(), and isString().


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