Factor the iterator out of LoadOrRequireExtensions.

This commit is contained in:
David Anderson
2015-09-20 23:44:41 -07:00
parent e559e6ffa8
commit 15f4a05122
2 changed files with 39 additions and 16 deletions
+11
View File
@@ -53,6 +53,7 @@
#include "PhraseCollection.h"
#include <am-string.h>
#include <bridge/include/IScriptManager.h>
#include <am-function.h>
class CPlayer;
@@ -155,6 +156,16 @@ public:
CNativeOwner *ToNativeOwner() {
return this;
}
struct ExtVar {
char *name;
char *file;
bool autoload;
bool required;
};
typedef ke::Lambda<bool(const sp_pubvar_t *, const ExtVar& ext)> ExtVarCallback;
bool ForEachExtVar(const ExtVarCallback& callback);
public:
/**
* Creates a plugin object with default values.