summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 33a8d30)
raw | patch | inline | side by side (parent: 33a8d30)
author | ishmal <ishmal@users.sourceforge.net> | |
Wed, 12 Mar 2008 18:18:39 +0000 (18:18 +0000) | ||
committer | ishmal <ishmal@users.sourceforge.net> | |
Wed, 12 Mar 2008 18:18:39 +0000 (18:18 +0000) |
src/bind/javabind-private.h | patch | blob | history | |
src/bind/javabind.cpp | patch | blob | history | |
src/bind/javabind.h | patch | blob | history |
index 9b7b4e9959cafd7b2ed515665ec3e0fdd0476b52..5a810480ba6dfcf51eaf7f07b61fbe4ebc0a9fbd 100644 (file)
const std::vector<Value> ¶ms,
Value &retval);
- virtual bool callMain(const String &className);
+ virtual bool callMain(const String &className,
+ const std::vector<String> &args);
virtual bool isLoaded();
diff --git a/src/bind/javabind.cpp b/src/bind/javabind.cpp
index f4905e15349b48a235753a7b92714ede1bdb7860..b03d562ceea3da7807669a1b4805e2f2e6144b12 100644 (file)
--- a/src/bind/javabind.cpp
+++ b/src/bind/javabind.cpp
* method of a given class
*
* @param className full name of the java class
+ * @args the argument strings to the method
* @return true if successful, else false
*/
-bool JavaBinderyImpl::callMain(const String &className)
+bool JavaBinderyImpl::callMain(const String &className,
+ const std::vector<String> &args)
{
std::vector<Value> parms;
+ for (unsigned int i=0 ; i<args.size() ; i++)
+ {
+ Value v;
+ v.setString(args[i]);
+ parms.push_back(v);
+ }
Value retval;
return callStatic(Value::BIND_VOID, className, "main",
"([Ljava/lang/String;)V", parms, retval);
diff --git a/src/bind/javabind.h b/src/bind/javabind.h
index cd622960b6824b8129a8c3e528dbd16b41a8e34f..c73afa58194dc5d35575648d9845e207a940da5a 100644 (file)
--- a/src/bind/javabind.h
+++ b/src/bind/javabind.h
/**
*
*/
- virtual bool callMain(const String &/*className*/)
+ virtual bool callMain(const String &/*className*/,
+ const std::vector<String> &/*args*/)
{
return false;
}