/usr/include/trilinos/RTC_VariableRTC.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 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 | #ifndef _VARIABLERTC_H
#define _VARIABLERTC_H
#include "RTC_commonRTC.hh"
#include "RTC_ValueRTC.hh"
#include <cassert>
#include <string>
namespace PG_RuntimeCompiler {
/**
* A Varaible object represents the variables in the code the user gives us.
*/
class Variable: public Value
{
public:
/**
* Constructor -> Trivial
*
* @param name - The name of the variable
* @param type - The data type of the variable
* @param objType - The object type of the variable
*/
Variable(const std::string& name, Type type, ObjectType objType)
: Value(type, objType) {
_name = name;
_address = NULL;
_willBeInitAtTimeOfUse = false;
}
/**
* getName -> This method returns the name of the variable
*/
std::string getName() const {return _name;}
/**
* setAddress -> This method sets the memory address of a variable. This
* only applies to Variables that have been passed in to
* Function by-reference.
*
* @param addr - The new address
*/
virtual void setAddress(void* addr) = 0;
/**
* setSize - Applies to arrays only, no-op here
*/
virtual void setSize(int size) {}
/**
* evaluateSizeExpr - Applies to arrays only, no-op here
*/
virtual void evaluateSizeExpr() {}
/**
* init -> This method sets _willBeInitAtTimeOfUse to true
*/
void init() { _willBeInitAtTimeOfUse = true;}
/**
* isInit -> This method returns _willBeInitAtTimeOfUse
*/
bool isInit() const { return _willBeInitAtTimeOfUse;}
protected:
std::string _name; //!< The name of the variable
bool _willBeInitAtTimeOfUse; /**!< helps us find errors where the user is
* trying to use an uninitialized variable.
*/
void* _address; //!< The address location of the variable
};
}
#endif
|