19#include "RegisteredObject.h"
34 typedef std::shared_ptr<SBTObjectType> SP;
39 const std::vector<OWLVarDecl> &
varDecls);
52 std::string
toString()
const override;
86 std::shared_ptr<SBTObjectType>
type);
93 inline Variable::SP
getVariable(
const std::string &name);
102 const DeviceContext::SP &device)
const;
106 std::shared_ptr<SBTObjectType>
const type;
116 template<
typename ObjectType>
119 typedef std::shared_ptr<SBTObject> SP;
125 std::shared_ptr<ObjectType>
type)
130 virtual std::string
toString()
const {
return "SBTObject<"+
type->toString()+
">"; }
134 std::shared_ptr<ObjectType>
const type;
146 return type->hasVariable(name);
153 int varID =
type->getVariableIdx(name);
Definition: ObjectRegistry.h:30
Definition: RegisteredObject.h:30
ObjectRegistry & registry
Definition: RegisteredObject.h:42
Definition: SBTObject.h:81
std::shared_ptr< SBTObjectType > const type
Definition: SBTObject.h:106
void writeVariables(uint8_t *sbtEntry, const DeviceContext::SP &device) const
Definition: SBTObject.cpp:113
const std::vector< Variable::SP > variables
Definition: SBTObject.h:109
bool hasVariable(const std::string &name)
Definition: SBTObject.h:144
Variable::SP getVariable(const std::string &name)
Definition: SBTObject.h:151
Definition: SBTObject.h:33
std::string toString() const override
Definition: SBTObject.cpp:88
const std::vector< OWLVarDecl > varDecls
Definition: SBTObject.h:70
virtual ~SBTObjectType()
Definition: SBTObject.cpp:54
const size_t varStructSize
Definition: SBTObject.h:66
bool hasVariable(const std::string &varName)
Definition: SBTObject.cpp:71
std::vector< Variable::SP > instantiateVariables()
Definition: SBTObject.cpp:77
int getVariableIdx(const std::string &varName)
Definition: SBTObject.cpp:61
void declareVariable(const std::string &varName, OWLDataType type, size_t offset)
Definition: SBTObject.h:118
SBTObject(Context *const context, ObjectRegistry ®istry, std::shared_ptr< ObjectType > type)
Definition: SBTObject.h:123
std::shared_ptr< ObjectType > const type
Definition: SBTObject.h:134
virtual std::string toString() const
Definition: SBTObject.h:130