[beast/devel: 1/16] SFI: renamed 'enum' keyword in IDL files
- From: Tim Janik <timj src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [beast/devel: 1/16] SFI: renamed 'enum' keyword in IDL files
- Date: Wed, 16 Jan 2013 17:36:43 +0000 (UTC)
commit f370a3d148a6ced6c6cf8a3688110a7b019bcc74
Author: Tim Janik <timj gnu org>
Date: Mon Dec 24 02:55:32 2012 +0100
SFI: renamed 'enum' keyword in IDL files
beast-gtk/bstrecords.idl | 10 +++++-----
bse/bsecore.idl | 12 ++++++------
bse/bseprocidl.cc | 2 +-
plugins/standardsaturator.idl | 2 +-
sfi/sfidl-parser.cc | 4 ++--
sfi/tests/testidl.idl | 4 ++--
tests/bse/testplugin.idl | 2 +-
7 files changed, 18 insertions(+), 18 deletions(-)
---
diff --git a/beast-gtk/bstrecords.idl b/beast-gtk/bstrecords.idl
index 7b09725..628068b 100644
--- a/beast-gtk/bstrecords.idl
+++ b/beast-gtk/bstrecords.idl
@@ -1,7 +1,7 @@
// Licensed GNU LGPL v2.1 or later: http://www.gnu.org/licenses/lgpl.html
namespace Bst {
/*
-choice Test1 {
+enum Test1 {
FOO1,
FOO2,
};
@@ -12,13 +12,13 @@ record Test2 {
using namespace Sfi;
Const STORAGE = ":r:w:S:";
Const STANDARD = STORAGE "G:";
-choice Direction {
+enum Direction {
UP = (_("Up"), _("Move upwards")),
LEFT = (_("Left"), _("Move to the left")),
RIGHT = (_("Right"), _("Move to the right")),
DOWN = (_("Down"), _("Move downwards"))
};
-choice FFTSize {
+enum FFTSize {
FFT_SIZE_2 = (_("2 Value FFT Window"), _("A 2 value FFT window corresponds to a spectrum with 2 frequency peaks")),
FFT_SIZE_4 = (_("4 Value FFT Window"), _("A 4 value FFT window corresponds to a spectrum with 3 frequency peaks")),
FFT_SIZE_8 = (_("8 Value FFT Window"), _("A 8 value FFT window corresponds to a spectrum with 5 frequency peaks")),
@@ -36,7 +36,7 @@ choice FFTSize {
FFT_SIZE_32768 = (_("32768 Value FFT Window"), _("A 32768 value FFT window corresponds to a spectrum with 16385 frequency peaks")),
FFT_SIZE_65536 = (_("65536 Value FFT Window"), _("A 65536 value FFT window corresponds to a spectrum with 32769 frequency peaks")),
};
-choice NoteLength {
+enum NoteLength {
NOTE_LENGTH_NONE = (Neutral, _("None"), _("Unspecified length")),
NOTE_LENGTH_1 = (_("1/1"), _("Whole note")),
NOTE_LENGTH_2 = (_("1/2"), _("Half note")),
@@ -63,7 +63,7 @@ choice NoteLength {
NOTE_LENGTH_64T = (_("1/64T"), _("Triplet sixty-fourth note")),
NOTE_LENGTH_128T = (_("1/128T"),_("Triplet hundred twenty-eighth note")),
};
-choice RowShading {
+enum RowShading {
ROW_SHADING_NONE = (Neutral, _("None")),
ROW_SHADING_2 = (_("2"), _("Every second row")),
ROW_SHADING_4 = (_("4"), _("Every fourth row")),
diff --git a/bse/bsecore.idl b/bse/bsecore.idl
index 510d6b3..fc3c2a1 100644
--- a/bse/bsecore.idl
+++ b/bse/bsecore.idl
@@ -48,7 +48,7 @@ sequence StringSeq {
String strings;
};
/* musical tunings: http://en.wikipedia.org/wiki/Musical_tuning */
-choice MusicalTuningType {
+enum MusicalTuningType {
/* Equal Temperament: http://en.wikipedia.org/wiki/Equal_temperament */
MUSICAL_TUNING_12_TET = (1, _("12 Tone Equal Temperament"), // http://en.wikipedia.org/wiki/Equal_temperament
_("The most common tuning system for modern Western music, "
@@ -124,7 +124,7 @@ choice MusicalTuningType {
"as well as six equally imperfect fifths.")),
};
/* various MIDI specific definitions */
-choice MidiSignalType {
+enum MidiSignalType {
/* special cased signals */
MIDI_SIGNAL_PROGRAM = (1, _("Program Change")), /* 7bit */
MIDI_SIGNAL_PRESSURE = (2, _("Channel Pressure")), /* 7bit */
@@ -304,7 +304,7 @@ choice MidiSignalType {
MIDI_SIGNAL_CONTROL_126 = (254, _("Control 126 Monophonic Voices Mode")),
MIDI_SIGNAL_CONTROL_127 = (255, _("Control 127 Polyphonic Mode On ITrigger")),
};
-choice MidiControlType {
+enum MidiControlType {
/* special cased signals */
MIDI_CONTROL_NONE = (Neutral, _("None")),
/* 14bit, continuous controls */
@@ -472,7 +472,7 @@ choice MidiControlType {
MIDI_CONTROL_126 = (254, _("Control 126 Monophonic Voices Mode")),
MIDI_CONTROL_127 = (255, _("Control 127 Polyphonic Mode On ITrigger")),
};
-choice MidiChannelEventType {
+enum MidiChannelEventType {
MIDI_EVENT_NONE = Neutral,
/* channel voice messages */
MIDI_EVENT_NOTE_OFF,
@@ -660,7 +660,7 @@ record SampleFileInfo {
};
class Janitor;
/* user messages */
-choice MsgType {
+enum MsgType {
MSG_NONE = Neutral,
MSG_ALWAYS,
MSG_ERROR,
@@ -685,7 +685,7 @@ record Message {
Int pid;
};
/* thread info */
-choice ThreadState {
+enum ThreadState {
THREAD_STATE_UNKNOWN,
THREAD_STATE_RUNNING,
THREAD_STATE_SLEEPING,
diff --git a/bse/bseprocidl.cc b/bse/bseprocidl.cc
index 286421e..6281a97 100644
--- a/bse/bseprocidl.cc
+++ b/bse/bseprocidl.cc
@@ -312,7 +312,7 @@ printChoices (void)
{
/* enum definition */
printIndent ();
- print ("choice %s {\n", removeBse(name).c_str());
+ print ("enum %s {\n", removeBse(name).c_str());
indent++;
for (val = eclass->values; val->value_name; val++)
{
diff --git a/plugins/standardsaturator.idl b/plugins/standardsaturator.idl
index 21fe553..6c92889 100644
--- a/plugins/standardsaturator.idl
+++ b/plugins/standardsaturator.idl
@@ -1,7 +1,7 @@
// Licensed GNU LGPL v2.1 or later: http://www.gnu.org/licenses/lgpl.html
#include <bse/bse.idl>
namespace Bse { namespace Standard {
-choice SaturationType {
+enum SaturationType {
SATURATE_TANH = (_("TANH"), _("Saturation via hyperbolic tangent function which is mostly linear for "
"small levels while providing a soft curvature for high volume signals")),
SATURATE_ATAN = (_("ATAN"), _("Saturation via arc tangent function which is reasonably linear in the "
diff --git a/sfi/sfidl-parser.cc b/sfi/sfidl-parser.cc
index a4ae723..f6571bc 100644
--- a/sfi/sfidl-parser.cc
+++ b/sfi/sfidl-parser.cc
@@ -95,7 +95,7 @@ enum ExtraToken {
TOKEN_ERROR
};
const char *token_symbols[] = {
- "namespace", "class", "choice", "record", "sequence",
+ "namespace", "class", "enum", "record", "sequence",
"property", "group", "using",
"Const", "ConstIdent", "Info", "IStream", "JStream", "OStream",
0
@@ -975,7 +975,7 @@ Parser::parseChoice ()
{
Choice choice;
int value = 0, sequentialValue = 1;
- DEBUG("parse choice\n");
+ DEBUG("parse enum\n");
parse_or_return (TOKEN_CHOICE);
parse_or_return (G_TOKEN_IDENTIFIER);
choice.name = defineSymbol (scanner->value.v_identifier);
diff --git a/sfi/tests/testidl.idl b/sfi/tests/testidl.idl
index 692c4a6..4cad76a 100644
--- a/sfi/tests/testidl.idl
+++ b/sfi/tests/testidl.idl
@@ -6,12 +6,12 @@ namespace Test // this comment tests C++ style comments
Const ANSWER_A = "the answer to all questions";
Const ANSWER_B = 42;
Const ULTIMATE_ANSWER = (ANSWER_A " is " ANSWER_B);
-choice YesNoUndecided {
+enum YesNoUndecided {
Undecided = (Neutral, "Undecided"),
Yes = (1, "Yes"),
No = (2, "No")
};
-choice ExcessiveChoiceTest {
+enum ExcessiveChoiceTest {
V0,
V2 = 2,
V4 = "l4",
diff --git a/tests/bse/testplugin.idl b/tests/bse/testplugin.idl
index f2100e5..8e1e7be 100644
--- a/tests/bse/testplugin.idl
+++ b/tests/bse/testplugin.idl
@@ -3,7 +3,7 @@
namespace Namespace {
using namespace Sfi;
// test enum
-choice FunkynessType {
+enum FunkynessType {
REALLY_FUNKY,
MODERATELY_FUNKY,
NON_FUNKY = (42, "No Funk At All"),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]