Mercurial > octave-nkf
diff liboctave/NLConst.h @ 1865:0e095fed283c
[project @ 1996-02-04 10:53:09 by jwe]
author | jwe |
---|---|
date | Sun, 04 Feb 1996 10:54:46 +0000 |
parents | dc527156c38c |
children | 1b57120c997b |
line wrap: on
line diff
--- a/liboctave/NLConst.h Sun Feb 04 10:43:13 1996 +0000 +++ b/liboctave/NLConst.h Sun Feb 04 10:54:46 1996 +0000 @@ -1,7 +1,7 @@ // NLConst.h -*- C++ -*- /* -Copyright (C) 1992, 1993, 1994, 1995 John W. Eaton +Copyright (C) 1996 John W. Eaton This file is part of Octave. @@ -33,34 +33,38 @@ #include "Bounds.h" #include "NLFunc.h" -class NLConst : public Bounds, public NLFunc +class +NLConst : public Bounds, public NLFunc { public: - NLConst (void) : Bounds (), NLFunc () { } + NLConst (void) + : Bounds (), NLFunc () { } - NLConst (int n) : Bounds (n), NLFunc () { } + NLConst (int n) + : Bounds (n), NLFunc () { } NLConst (const ColumnVector& lb, const NLFunc f, const ColumnVector& ub) : Bounds (lb, ub), NLFunc (f) { } - NLConst (const NLConst& a) : Bounds (a.lb, a.ub), NLFunc (a.fun, a.jac) { } + NLConst (const NLConst& a) + : Bounds (a.lb, a.ub), NLFunc (a.fun, a.jac) { } NLConst& operator = (const NLConst& a) { - nb = a.nb; - lb = a.lb; - fun = a.fun; - jac = a.jac; - ub = a.ub; - + if (this != &a) + { + Bounds::operator = (a); + NLFunc::operator = (a); + } return *this; } + ~NLConst (void) { } + private: void error (const char *msg); - }; #endif