Skip to content
Snippets Groups Projects
Commit 4602606c authored by Joseph Boudreau's avatar Joseph Boudreau
Browse files

add accessors so illegal public/private trick can be avoided

parent 876442a5
No related branches found
No related tags found
No related merge requests found
Pipeline #1379228 passed
......@@ -43,7 +43,10 @@ class ArrayFunction : public AbsFunction {
// Does this function have an analytic derivative?
virtual bool hasAnalyticDerivative() const override {return true;}
// Access to the array of values
const std::vector<double> & values() const { return _values;}
private:
// It is illegal to assign a ArrayFunction
......
......@@ -26,7 +26,10 @@ namespace GeoGenfun {
virtual double operator ()(double argument) const override;
virtual double operator ()(const Argument & a) const override {return operator() (a[0]);}
// Retrieve the modulus:
double modulus() const {return _y;}
private:
// It is illegal to assign a fixed constant
......
......@@ -82,8 +82,18 @@ namespace GeoXF
Pow *clone () const;
// Copy constructor:
Pow (const Pow & right);
Pow (const Pow & right);
// For persistency:
const GeoTrf::Transform3D & transform() const {
return m_xf;
}
// For persistency:
const GeoGenfun::AbsFunction *function() const {
return m_function;
}
private:
// Assignment operator
......@@ -129,6 +139,9 @@ namespace GeoXF
Product& operator= (const Product & right) = delete;
const Function *arg1() const { return m_arg1;}
const Function *arg2() const { return m_arg2;}
private:
const Function *m_arg1;
......@@ -162,6 +175,10 @@ namespace GeoXF
PreMult& operator= (const PreMult & right) = delete;
const GeoTrf::Transform3D & arg1() const { return m_arg1;}
const Function *arg2() const { return m_arg2;}
private:
const GeoTrf::Transform3D m_arg1;
......@@ -195,6 +212,10 @@ namespace GeoXF
PostMult& operator= (const PostMult & right) = delete;
const Function *arg1() const { return m_arg1;}
const GeoTrf::Transform3D & arg2() const { return m_arg2;}
private:
const Function *m_arg1;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment