{"action":"created","issue":{"url":"https://api.github.com/repos/chrsmith/bwapi/issues/142","labels_url":"https://api.github.com/repos/chrsmith/bwapi/issues/142/labels{/name}","comments_url":"https://api.github.com/repos/chrsmith/bwapi/issues/142/comments","events_url":"https://api.github.com/repos/chrsmith/bwapi/issues/142/events","html_url":"https://github.com/chrsmith/bwapi/issues/142","id":58384087,"number":142,"title":"interfaces and portability","user":{"login":"GoogleCodeExporter","id":9614759,"avatar_url":"https://avatars.githubusercontent.com/u/9614759?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCodeExporter","html_url":"https://github.com/GoogleCodeExporter","followers_url":"https://api.github.com/users/GoogleCodeExporter/followers","following_url":"https://api.github.com/users/GoogleCodeExporter/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCodeExporter/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCodeExporter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCodeExporter/subscriptions","organizations_url":"https://api.github.com/users/GoogleCodeExporter/orgs","repos_url":"https://api.github.com/users/GoogleCodeExporter/repos","events_url":"https://api.github.com/users/GoogleCodeExporter/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCodeExporter/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/chrsmith/bwapi/labels/auto-migrated","name":"auto-migrated","color":"ededed"},{"url":"https://api.github.com/repos/chrsmith/bwapi/labels/Usability","name":"Usability","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-02-20T17:28:16Z","updated_at":"2015-02-20T17:28:17Z","closed_at":null,"body":"```\nforked issue 134, collecting facts:\n\n1.\nfact:\ncurrent interface is the \"abstract interface\". Read more under \"C++ Mature \nApproach: Using an Abstract Interface\" at \nhttp://www.codeproject.com/KB/cpp/howto_export_cpp_classes.aspx . This \ninterface is only portable between C++ compilers. More on that under \"Why \nThis Works With Other Compilers\". \n\nplan:\nremove the abstract interface and let agents compile the receiver code. \nThis option became available since the bridge from issue 134.\nNote: \"receiver\" is coined as \"agent-side wrapper classes around bridge's \nprotocoll\"\n\n2.\nfact:\nMany nonC++ classes beg to use BWAPI. This feature is best implemented on \nthe agent's side. Since the bridge, the are no drawbacks this way.\n\nsuggestion:\nigalvelis has a promising project using swig to port the C++ receiver into \nany target language. Technically this is a better way than using sockets. \nI suggest making a wiki acticle for nonC++ users about portability and \nlink to igalvelis's project page, where they hopefully, soon will be able \nto download an adapter library for their target language.\nOr we could make igalvelis's project part of BWAPIs and publish the \nadapter libraries with our releases.\n```\n\n-----\nOriginal issue reported on code.google.com by `goo...@teabix.com` on 28 Nov 2009 at 12:58"},"comment":{"url":"https://api.github.com/repos/chrsmith/bwapi/issues/comments/75281349","html_url":"https://github.com/chrsmith/bwapi/issues/142#issuecomment-75281349","issue_url":"https://api.github.com/repos/chrsmith/bwapi/issues/142","id":75281349,"user":{"login":"GoogleCodeExporter","id":9614759,"avatar_url":"https://avatars.githubusercontent.com/u/9614759?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCodeExporter","html_url":"https://github.com/GoogleCodeExporter","followers_url":"https://api.github.com/users/GoogleCodeExporter/followers","following_url":"https://api.github.com/users/GoogleCodeExporter/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCodeExporter/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCodeExporter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCodeExporter/subscriptions","organizations_url":"https://api.github.com/users/GoogleCodeExporter/orgs","repos_url":"https://api.github.com/users/GoogleCodeExporter/repos","events_url":"https://api.github.com/users/GoogleCodeExporter/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCodeExporter/received_events","type":"User","site_admin":false},"created_at":"2015-02-20T17:28:17Z","updated_at":"2015-02-20T17:28:17Z","body":"```\nWeber: I did send you some emails earlier, asking about sockets vs JNI. I am \ncurrently implementing JNI to work with the bwapi api. So far it seems very \npossible. \nHowever, I take another approach, where I implement the JNI-code directly into \nthe \nMyExampleAi C++ class and from there create or hook onto the JVM. Then I can \neasily \nobtain the \"main\" object which i call JNIManager.class and call methods such as \nonStart, onFrame etc.. Here onStart returns the init settings, such as flags \nand \nonFrame can return the commands which is currently in the queue. Another \napproach to \nasynchronous commands, could be implemented by having a c++ method running as a \nthread and updating some global queue. But, since only the main bwapi thread \ncan \nissue the commands this wouldn't serve a big purpose.\n```\n\n-----\nOriginal comment by `jahes...@gmail.com` on 28 Nov 2009 at 2:46"}}