/usr/include/JAGS/function/FunctionPtr.h is in jags 4.2.0-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | #ifndef FUNCTION_POINTER_H_
#define FUNCTION_POINTER_H_
#include <function/LinkFunction.h>
#include <function/ScalarFunction.h>
#include <function/VectorFunction.h>
#include <function/ArrayFunction.h>
namespace jags {
/**
* @short Polymorphic pointer to Function
*
* A FunctionPtr holds a pointer to one of the four sub-classes of
* Function: LinkFunction, ScalarFunction, VectorFunction, or
* ArrayFunction. The pointers can be extracted using the extractor
* functions LINK, SCALAR, VECTOR, and ARRAY, respectively .
*/
class FunctionPtr
{
LinkFunction const * lfunc;
ScalarFunction const * sfunc;
VectorFunction const * vfunc;
ArrayFunction const * afunc;
public:
FunctionPtr();
FunctionPtr(ScalarFunction const *);
FunctionPtr(VectorFunction const *);
FunctionPtr(ArrayFunction const *);
FunctionPtr(LinkFunction const *);
bool operator==(FunctionPtr const &rhs) const;
std::string const &name() const;
friend LinkFunction const *LINK(FunctionPtr const &p);
friend ScalarFunction const *SCALAR(FunctionPtr const &p);
friend VectorFunction const *VECTOR(FunctionPtr const &p);
friend ArrayFunction const *ARRAY(FunctionPtr const &p);
friend Function const *FUNC(FunctionPtr const &p);
friend bool isNULL(FunctionPtr const &p);
};
} /* namespace jags */
#endif /* FUNCTION_POINTER_H_ */
|