/usr/include/trilinos/RTC_ScalarNumberRTC.hh is in libtrilinos-pamgen-dev 12.4.2-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 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | #ifndef _SCALARNUMBERRTC_H
#define _SCALARNUMBERRTC_H
#include "RTC_ValueRTC.hh"
#include "RTC_commonRTC.hh"
#include <iostream>
#include <cassert>
namespace PG_RuntimeCompiler {
/**
* A Number object represnts the constants in the code the user gives us.
*/
template <class T>
class ScalarNumber: public Value
{
public:
/**
* Constructor -> Trivial
*
* @param type - The type of the number
* @param value - The value of the number
*/
ScalarNumber(Type type, T value) : Value(type, ScalarNumberOT) {
_value = value;
}
/**
* Constructor -> Value set to zero
*/
ScalarNumber() : Value(DoubleT, ScalarNumberOT) { _value = 0; }
/**
* getValue -> Returns the value of the number
*/
double getValue() {return (double) _value;}
/**
* setValue -> Changes the value of the number
*
* @param value - The new value for the number
*/
void setValue(double value) {_value = (T) value;}
std::ostream& operator<<(std::ostream& os) const {
//os << "ScalarNumber:" << _value;
os << _value;
return os;
}
protected:
T _value; //!< The value of this number
};
}
#endif
|