{"action":"created","issue":{"url":"https://api.github.com/repos/bytedeco/javacpp-presets/issues/231","repository_url":"https://api.github.com/repos/bytedeco/javacpp-presets","labels_url":"https://api.github.com/repos/bytedeco/javacpp-presets/issues/231/labels{/name}","comments_url":"https://api.github.com/repos/bytedeco/javacpp-presets/issues/231/comments","events_url":"https://api.github.com/repos/bytedeco/javacpp-presets/issues/231/events","html_url":"https://github.com/bytedeco/javacpp-presets/issues/231","id":157387282,"number":231,"title":"Problems with presets for annoy","user":{"login":"ReneHollander","id":5379596,"avatar_url":"https://avatars.githubusercontent.com/u/5379596?v=3","gravatar_id":"","url":"https://api.github.com/users/ReneHollander","html_url":"https://github.com/ReneHollander","followers_url":"https://api.github.com/users/ReneHollander/followers","following_url":"https://api.github.com/users/ReneHollander/following{/other_user}","gists_url":"https://api.github.com/users/ReneHollander/gists{/gist_id}","starred_url":"https://api.github.com/users/ReneHollander/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ReneHollander/subscriptions","organizations_url":"https://api.github.com/users/ReneHollander/orgs","repos_url":"https://api.github.com/users/ReneHollander/repos","events_url":"https://api.github.com/users/ReneHollander/events{/privacy}","received_events_url":"https://api.github.com/users/ReneHollander/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/bytedeco/javacpp-presets/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/bytedeco/javacpp-presets/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2016-05-29T13:52:20Z","updated_at":"2016-06-02T07:04:00Z","closed_at":null,"body":"I am trying to implement presets for the [annoy](https://github.com/spotify/annoy/) header-only library.\r\nThe C++ classes `AnnoyIndexInterface` and `AnnoyIndex` from [`annoylib.h`](https://github.com/spotify/annoy/blob/master/src/annoylib.h) heavily rely on templates and I just can't figure out how to handle those.  \r\nThis is the preset that I currently have. It successfully generates the classes `RandRandom`, `Angular` and `Euclidean` but doesn't output anything else into `annoy.java`.\r\n```java\r\n@Properties(target=\"org.bytedeco.javacpp.annoy\", value={@Platform(include=\"annoylib.h\", link=\"z@.1\")})\r\npublic class annoy implements InfoMapper {\r\n    public void map(InfoMap infoMap) {\r\n    }\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/bytedeco/javacpp-presets/issues/comments/223212048","html_url":"https://github.com/bytedeco/javacpp-presets/issues/231#issuecomment-223212048","issue_url":"https://api.github.com/repos/bytedeco/javacpp-presets/issues/231","id":223212048,"user":{"login":"saudet","id":3328023,"avatar_url":"https://avatars.githubusercontent.com/u/3328023?v=3","gravatar_id":"","url":"https://api.github.com/users/saudet","html_url":"https://github.com/saudet","followers_url":"https://api.github.com/users/saudet/followers","following_url":"https://api.github.com/users/saudet/following{/other_user}","gists_url":"https://api.github.com/users/saudet/gists{/gist_id}","starred_url":"https://api.github.com/users/saudet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saudet/subscriptions","organizations_url":"https://api.github.com/users/saudet/orgs","repos_url":"https://api.github.com/users/saudet/repos","events_url":"https://api.github.com/users/saudet/events{/privacy}","received_events_url":"https://api.github.com/users/saudet/received_events","type":"User","site_admin":false},"created_at":"2016-06-02T07:04:00Z","updated_at":"2016-06-02T07:04:00Z","body":"Ah, I see the problem. It's matching types in a very dumb way, and we can't have whitespaces after the commas. So this works:\r\n```\r\nimport org.bytedeco.javacpp.annotation.*;\r\nimport org.bytedeco.javacpp.tools.*;\r\n\r\n@Properties(target=\"annoyint\", value={@Platform(include=\"annoylib.h\", link=\"z@.1\")})\r\npublic class annoy implements InfoMapper {\r\n    public void map(InfoMap infoMap) {\r\n      infoMap\r\n        .put(new Info(\"AnnoyIndexInterface<int,float>\").pointerTypes(\"TestAnnoyIndexInterface\"))\r\n        .put(new Info(\"AnnoyIndex<int,float,Euclidean,Kiss64Random>\").pointerTypes(\"TestAnnoyIndex\").base(\"TestAnnoyIndexInterface\"))\r\n        ;\r\n    }\r\n}\r\n```\r\nI have to figure out a better way to normalize type names..."}}
{"actor":{"display_login":"saudet"}}