From 0197362922e5ffdd8ca64cb0fe32aa9ae0c77b57 Mon Sep 17 00:00:00 2001
From: Aaron Cuevas Lopez <aacuelo@teleco.upv.es>
Date: Fri, 15 May 2015 17:38:20 +0200
Subject: [PATCH] Move methods from Parameter header to its cpp

---
 Source/Processors/Parameter/Parameter.cpp     | 57 +++++++++++++++++++
 Source/Processors/Parameter/Parameter.h       | 57 ++++---------------
 .../Processors/Parameter/ParameterEditor.cpp  | 11 ++++
 Source/Processors/Parameter/ParameterEditor.h | 11 ++--
 4 files changed, 84 insertions(+), 52 deletions(-)

diff --git a/Source/Processors/Parameter/Parameter.cpp b/Source/Processors/Parameter/Parameter.cpp
index 1fcd924ed..b5da5de77 100755
--- a/Source/Processors/Parameter/Parameter.cpp
+++ b/Source/Processors/Parameter/Parameter.cpp
@@ -70,6 +70,37 @@ Parameter::Parameter(const String& name_, Array<var> a, int defaultVal,
 
 }
 
+Parameter::~Parameter() {}
+
+const String& Parameter::getName()
+{
+	return name;
+}
+
+const String& Parameter::getDescription()
+{
+	return description;
+}
+
+void Parameter::addDescription(const String& desc)
+{
+	description = desc;
+}
+
+var Parameter::getDefaultValue()
+{
+	return defaultValue;
+}
+
+int Parameter::getID()
+{
+	return parameterId;
+}
+
+Array<var> Parameter::getPossibleValues()
+{
+	return possibleValues;
+}
 
 void Parameter::setValue(float val, int chan)
 {
@@ -111,6 +142,32 @@ void Parameter::setValue(float val, int chan)
 
 }
 
+var Parameter::operator[](int chan)
+{
+	return values[chan];
+}
+
+var Parameter::getValue(int chan)
+{
+	return values[chan];
+}
+
+
+bool Parameter::isBoolean()
+{
+	return isBool;
+}
+
+bool Parameter::isContinuous()
+{
+	return isCont;
+}
+
+bool Parameter::isDiscrete()
+{
+	return isDisc;
+}
+
 // void BooleanParameter::setValue(float val, int chan)
 // {
 
diff --git a/Source/Processors/Parameter/Parameter.h b/Source/Processors/Parameter/Parameter.h
index 33cf68b40..a84f24efb 100755
--- a/Source/Processors/Parameter/Parameter.h
+++ b/Source/Processors/Parameter/Parameter.h
@@ -58,79 +58,46 @@ public:
     Parameter(const String& name_, Array<var> a, int defaultVal, int ID, bool t = false);
 
     /** Destructor.*/
-    ~Parameter() {}
+	~Parameter();
 
     /** Returns the name of the parameter.*/
-    const String& getName()
-    {
-        return name;
-    }
+	const String& getName();
 
     /** Returns a description of the parameter.*/
-    const String& getDescription()
-    {
-        return description;
-    }
+	const String& getDescription();
 
     /** Sets the description of the parameter.*/
-    void addDescription(const String& desc)
-    {
-        description = desc;
-    }
+	void addDescription(const String& desc);
 
     /** Returns the default value of a parameter (can be boolean, int, or float).*/
-    var getDefaultValue()
-    {
-        return defaultValue;
-    }
+	var getDefaultValue();
 
     /** Returns the unique integer ID of a parameter.*/
-    int getID()
-    {
-        return parameterId;
-    }
+	int getID();
 
     /** Returns all the possible values that a parameter can take.*/
-    Array<var> getPossibleValues()
-    {
-        return possibleValues;
-    }
+	Array<var> getPossibleValues();
 
     /** Sets the value of a parameter for a given channel.*/
     void setValue(float val, int chan);
 
     /** Returns the value of a parameter for a given channel.*/
-    var operator[](int chan)
-    {
-        return values[chan];
-    }
+	var operator[](int chan);
 
     /** Returns the value of a parameter for a given channel.*/
-    var getValue(int chan)
-    {
-        return values[chan];
-    }
+	var getValue(int chan);
 
     /** Copies a parameter.*/
     Parameter& operator=(const Parameter& other);
 
     /** Returns true if a parameter is boolean, false otherwise.*/
-    bool isBoolean()
-    {
-        return isBool;
-    }
+	bool isBoolean();
 
     /** Returns true if a parameter is continuous, false otherwise.*/
-    bool isContinuous()
-    {
-        return isCont;
-    }
+	bool isContinuous();
 
     /** Returns true if a parameter is discrete, false otherwise.*/
-    bool isDiscrete()
-    {
-        return isDisc;
-    }
+	bool isDiscrete();
 
     /** Certain parameters should not be changed while data acquisition is active.
 
diff --git a/Source/Processors/Parameter/ParameterEditor.cpp b/Source/Processors/Parameter/ParameterEditor.cpp
index 29a03585d..7cfb3649b 100755
--- a/Source/Processors/Parameter/ParameterEditor.cpp
+++ b/Source/Processors/Parameter/ParameterEditor.cpp
@@ -161,6 +161,11 @@ void ParameterEditor::parentHierarchyChanged()
 
 }
 
+void ParameterEditor::setChannelSelector(ChannelSelector* ch)
+{
+	channelSelector = ch;
+}
+
 void ParameterEditor::setEnabled(bool state)
 {
 
@@ -285,6 +290,8 @@ ParameterButton::ParameterButton(var value, int buttonType, Font labelFont) :
 
 }
 
+ParameterButton::~ParameterButton() {}
+
 void ParameterButton::paintButton(Graphics& g, bool isMouseOver, bool isButtonDown)
 {
     g.setColour(Colours::grey);
@@ -400,6 +407,8 @@ ParameterCheckbox::ParameterCheckbox(bool defaultState) : Button("name"), isEnab
                                      false);
 }
 
+ParameterCheckbox::~ParameterCheckbox() {}
+
 void ParameterCheckbox::paintButton(Graphics& g, bool isMouseOver, bool isButtonDown)
 {
 
@@ -446,6 +455,8 @@ ParameterSlider::ParameterSlider(float min, float max, float def, Font labelFont
 
 }
 
+ParameterSlider::~ParameterSlider() {}
+
 void ParameterSlider::paint(Graphics& g)
 {
 
diff --git a/Source/Processors/Parameter/ParameterEditor.h b/Source/Processors/Parameter/ParameterEditor.h
index 5f08bd2c9..b340c0d53 100755
--- a/Source/Processors/Parameter/ParameterEditor.h
+++ b/Source/Processors/Parameter/ParameterEditor.h
@@ -61,10 +61,7 @@ public:
     void buttonClicked(Button* button);
     void sliderValueChanged(Slider* slider);
 
-    void setChannelSelector(ChannelSelector* ch)
-    {
-        channelSelector = ch;
-    }
+	void setChannelSelector(ChannelSelector* ch);
 
     // for inactivation during acquisition:
     void setEnabled(bool t);
@@ -104,7 +101,7 @@ class ParameterButton : public Button
 {
 public:
     ParameterButton(var value, int buttonType, Font labelFont);
-    ~ParameterButton() {}
+	~ParameterButton();
 
     bool isEnabled;
     //Used to mark if unused, usedByActive, or usedby inactive
@@ -150,7 +147,7 @@ class ParameterCheckbox : public Button
 {
 public:
     ParameterCheckbox(bool defaultState);
-    ~ParameterCheckbox() {}
+	~ParameterCheckbox();
 
     bool isEnabled;
 
@@ -175,7 +172,7 @@ class ParameterSlider : public Slider
 {
 public:
     ParameterSlider(float min, float max, float defaultValue, Font f);
-    ~ParameterSlider() {}
+	~ParameterSlider();
 
     bool isEnabled;
 
-- 
GitLab