22 virtual void write_c(std::ostream& out)
56 : atomic_type(0), _unsigned(
false), _const(
false), _static(
false),
60 void write_c_type(std::ostream& out)
66 atomic_type->write_c(out);
67 for(
int i = 0; i < pointer; ++i)
69 for(
int i = 0; i < ref; ++i)
77 if(atomic_type == &BasicType::VOID && pointer == 0)
96 this->name =
"SQInteger";
97 assert(_instance == 0);
102 assert(_instance ==
this);
118 this->name =
"HSQUIRRELVM";
119 assert(_instance == 0);
124 assert(_instance ==
this);
140 this->name =
"string";
141 assert(_instance == 0);
146 assert(_instance ==
this);
155 virtual void write_c(std::ostream& out)
157 out <<
"std::string";
189 Visibility visibility;
219 std::string parameter_spec;
220 std::string docu_comment;
223 std::vector<Parameter> parameters;
237 has_const_value =
false;
241 std::string docu_comment;
243 bool has_const_value;
245 float const_float_value;
247 std::string const_string_value;
263 for(std::vector<ClassMember*>::iterator i = members.begin(); i != members.end(); ++i)
267 std::vector<ClassMember*> members;
268 std::vector<Class*> super_classes;
269 std::vector<Class*> sub_classes;
270 std::string docu_comment;
286 for(std::vector<Function*>::iterator i = functions.begin();
287 i != functions.end(); ++i)
289 for(std::vector<AtomicType*>::iterator i = types.begin();
290 i != types.end(); ++i)
292 for(std::vector<Namespace*>::iterator i = namespaces.begin();
293 i != namespaces.end(); ++i)
298 types.push_back(type);
303 namespaces.push_back(ns);
306 AtomicType* _findType(
const std::string& name,
bool godown =
false) {
307 for(std::vector<AtomicType*>::iterator i = types.begin();
308 i != types.end(); ++i) {
310 if(type->name == name)
314 return parent->_findType(name,
true);
319 Namespace* _findNamespace(
const std::string& name,
bool godown =
false) {
320 for(std::vector<Namespace*>::iterator i = namespaces.begin();
321 i != namespaces.end(); ++i) {
327 return parent->_findNamespace(name,
true);
332 Namespace* findNamespace(
const std::string& name,
bool godown =
false) {
333 Namespace* ret = _findNamespace(name, godown);
335 std::ostringstream msg;
336 msg <<
"Couldn't find namespace '" << name <<
"'.";
337 throw std::runtime_error(msg.str());
343 std::vector<Function*> functions;
344 std::vector<Field*> fields;
345 std::vector<AtomicType*> types;
346 std::vector<Namespace*> namespaces;
bool custom
a custom wrapper (just pass along HSQUIRRELVM)
Definition: tree.hpp:218
bool suspend
function should suspend squirrel VM after execution
Definition: tree.hpp:216