26#ifndef SCIMATH_FUNCTIONHOLDER_H
27#define SCIMATH_FUNCTIONHOLDER_H
30#include <casacore/casa/aips.h>
31#include <casacore/casa/Utilities/RecordTransformable.h>
32#include <casacore/scimath/Functionals/Function.h>
33#include <casacore/casa/Arrays/Vector.h>
34#include <casacore/casa/BasicSL/String.h>
195 mutable std::unique_ptr<RecordInterface>
mode_p;
220#ifndef CASACORE_NO_AUTO_TEMPLATES
221#include <casacore/scimath/Functionals/FunctionHolder.tcc>
FunctionHolder()
Creates an empty holder.
void setParameters(Function< T > *&fn, const Vector< T > ¶ms)
const Vector< String > & names() const
Get the known names.
std::unique_ptr< RecordInterface > mode_p
const Function< T > & asFunction() const
Get a specific Function from the holder (with lifetime as long as holder exists).
Bool isEmpty() const
Check the the FunctionHolder holds the specified type.
virtual const String & ident() const
Get identification of record.
Bool getType(String &error, Function< U > *&fn)
Bool getType(String &error, Function< U > *&fn, const RecordInterface &in)
void setParameters(Function< AutoDiff< T > > *&fn, const Vector< T > ¶ms)
FunctionHolder(const Function< T > &in)
Create from a Function (copy made).
FunctionHolder(const FunctionHolder< T > &other)
Copy a holder (copy semantics).
virtual Bool fromString(String &error, const String &in)
Initialise the class from a String representation.
Bool getRecord(String &error, Function< U > *&fn, const RecordInterface &in)
Bool addFunction(const Function< T > &fnc)
Add a function.
Bool putType(String &error, RecordInterface &out) const
Aid for to/from Record, String.
Types type() const
Get the type of currently filled holder.
Bool isFilled
Filled list?
std::unique_ptr< Function< T > > hold_p
Pointer to a Function.
Types nf_p
Aids (only filled after a succesful to/fromRecord.
Vector< String > nam_p
List of known names.
void init() const
Initialise and check the name list.
virtual Bool fromRecord(String &error, const RecordInterface &in)
Create a Function from a record.
virtual Bool toRecord(String &error, RecordInterface &out) const
Create a record from a Function.
FunctionHolder & operator=(const FunctionHolder< T > &other)
Assignment (copy semantics).
String: the storage and methods of handling collections of characters.
this file contains all the compiler specific defines
RecordInterface()
The default constructor creates an empty record with a variable structure.
bool Bool
Define the standard types used by Casacore.
Structure to hold functional status.
Bool order
Order (True if needed).