[poincare] Remove old function attributes

This commit is contained in:
Léa Saviot
2018-10-11 17:45:18 +02:00
committed by Émilie Feral
parent bd65063b67
commit dd5bf76882
3 changed files with 6 additions and 27 deletions

View File

@@ -8,21 +8,6 @@ namespace Poincare {
class FunctionNode : public SymbolAbstractNode {
public:
FunctionNode() :
SymbolAbstractNode(),
m_color(KDColorRed),
m_displayDerivative(true),
m_isActive(true)
{}
// FunctionNode
KDColor color() const { return m_color; }
bool displayDerivative() const { return m_displayDerivative; }
bool isActive() const { return m_isActive; }
void setColor(KDColor color) { m_color = color; }
void setDisplayDerivative(bool display) { m_displayDerivative = display; }
void setActive (bool active) { m_isActive = active; }
// SymbolAbstractNode
const char * name() const override { return m_name; }
@@ -34,12 +19,6 @@ public:
virtual void logNodeName(std::ostream & stream) const override {
stream << "Function";
}
virtual void logAttributes(std::ostream & stream) const override {
stream << " name=\"" << m_name << "\"";
stream << " color=\"" << m_color << "\"";
stream << " displayDerivative=\"" << m_displayDerivative << "\"";
stream << " active=\"" << m_isActive << "\"";
}
#endif
// Properties
@@ -52,9 +31,6 @@ public:
float characteristicXRange(Context & context, Preferences::AngleUnit angleUnit) const override;
private:
KDColor m_color;
bool m_displayDerivative;
bool m_isActive;
char m_name[0]; // MUST be the last member variable
VariableContext xContext(Context & parentContext) const;

View File

@@ -17,9 +17,6 @@ public:
virtual void logNodeName(std::ostream & stream) const override {
stream << "Symbol";
}
virtual void logAttributes(std::ostream & stream) const override {
stream << " name=\"" << m_name << "\"";
}
#endif
// Expression Properties

View File

@@ -5,6 +5,9 @@
namespace Poincare {
/* TODO: should Function directly inherit from Symbol and we remove
* SymbolAbstract? */
/* TODO: should we keep the size of SymbolAbstractNode as a member to speed up
* TreePool scan? */
@@ -34,6 +37,9 @@ public:
virtual void logNodeName(std::ostream & stream) const override {
stream << "SymbolAbstract";
}
virtual void logAttributes(std::ostream & stream) const override {
stream << " name=\"" << name() << "\"";
}
#endif
protected: