Index: src/script/api/script_text.hpp
===================================================================
--- src/script/api/script_text.hpp (revision 27543)
+++ src/script/api/script_text.hpp (working copy)
@@ -124,7 +124,10 @@
ScriptText *AddParam(Object value);
#endif /* DOXYGEN_API */
- /* virtual */ const char *GetEncodedText();
+ /**
+ * @api -all
+ */
+ virtual const char *GetEncodedText();
private:
StringID string;
Index: src/script/api/squirrel_export.awk
===================================================================
--- src/script/api/squirrel_export.awk (revision 27543)
+++ src/script/api/squirrel_export.awk (working copy)
@@ -81,7 +81,6 @@
struct_size = 0
method_size = 0
static_method_size = 0
- virtual_class = "false"
cls = ""
start_squirrel_define_on_next_line = "false"
cls_level = 0
@@ -97,7 +96,6 @@
struct_size = 0
method_size = 0
static_method_size = 0
- virtual_class = "false"
super_cls = ""
cls = ""
api_selected = ""
@@ -340,7 +338,7 @@
} else {
print " SQ" api_cls ".PreRegister(engine, \"" api_super_cls "\");"
}
- if (virtual_class == "false" && super_cls != "ScriptEvent") {
+ if (super_cls != "ScriptEvent") {
if (cls_param[2] == "v") {
print " SQ" api_cls ".AddSQAdvancedConstructor(engine);"
} else {
@@ -409,22 +407,21 @@
}
if (static_method_size != 0) print ""
- if (virtual_class == "false") {
- # Non-static methods
- mlen = 0
- for (i = 1; i <= method_size; i++) {
- if (mlen <= length(methods[i, 0])) mlen = length(methods[i, 0])
+ # Non-static methods
+ mlen = 0
+ for (i = 1; i <= method_size; i++) {
+ if (mlen <= length(methods[i, 0])) mlen = length(methods[i, 0])
+ }
+ for (i = 1; i <= method_size; i++) {
+ if (methods[i, 2] == "v") {
+ print " SQ" api_cls ".DefSQAdvancedMethod(engine, &" cls "::" methods[i, 0] ", " substr(spaces, 1, mlen - length(methods[i, 0]) - 8) "\"" methods[i, 0] "\");"
+ } else {
+ print " SQ" api_cls ".DefSQMethod(engine, &" cls "::" methods[i, 0] ", " substr(spaces, 1, mlen - length(methods[i, 0])) "\"" methods[i, 0] "\", " substr(spaces, 1, mlen - length(methods[i, 0])) "" methods[i, 1] ", \"" methods[i, 2] "\");"
}
- for (i = 1; i <= method_size; i++) {
- if (methods[i, 2] == "v") {
- print " SQ" api_cls ".DefSQAdvancedMethod(engine, &" cls "::" methods[i, 0] ", " substr(spaces, 1, mlen - length(methods[i, 0]) - 8) "\"" methods[i, 0] "\");"
- } else {
- print " SQ" api_cls ".DefSQMethod(engine, &" cls "::" methods[i, 0] ", " substr(spaces, 1, mlen - length(methods[i, 0])) "\"" methods[i, 0] "\", " substr(spaces, 1, mlen - length(methods[i, 0])) "" methods[i, 1] ", \"" methods[i, 2] "\");"
- }
- delete methods[i]
- }
- if (method_size != 0) print ""
+ delete methods[i]
}
+ if (method_size != 0) print ""
+
print " SQ" api_cls ".PostRegister(engine);"
print "}"
@@ -489,9 +486,6 @@
}
is_static = match($0, "static")
- if (match($0, "virtual")) {
- virtual_class = "true"
- }
gsub("\\yvirtual\\y", "", $0)
gsub("\\ystatic\\y", "", $0)
gsub("\\yconst\\y", "", $0)