28 #ifndef SCIMATH_FUNCTIONHOLDER_H
29 #define SCIMATH_FUNCTIONHOLDER_H
32 #include <casacore/casa/aips.h>
33 #include <casacore/casa/Utilities/PtrHolder.h>
34 #include <casacore/casa/Utilities/RecordTransformable.h>
35 #include <casacore/scimath/Functionals/Function.h>
36 #include <casacore/casa/Arrays/Vector.h>
37 #include <casacore/casa/BasicSL/String.h>
222 #ifndef CASACORE_NO_AUTO_TEMPLATES
223 #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.
Bool isEmpty() const
Check the the FunctionHolder holds the specified type.
PtrHolder< Function< T > > hold_p
Pointer to a Function.
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)
const Function< T > & asFunction() const
Get a specific Function from the holder (with lifetime as long as holder exists).
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.
PtrHolder< RecordInterface > mode_p
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?
Types nf_p
Aids (only filled after a succesful to/fromRecord.
FunctionHolder & operator=(const FunctionHolder< T > &other)
Assignment (copy semantics)
virtual const String & ident() const
Get identification of record.
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.
String: the storage and methods of handling collections of characters.
this file contains all the compiler specific defines
bool Bool
Define the standard types used by Casacore.
Structure to hold functional status.
Bool order
Order (True if needed)