{"id":713,"date":"2010-09-20T17:42:09","date_gmt":"2010-09-21T01:42:09","guid":{"rendered":"http:\/\/technofovea.com\/blog\/?p=713"},"modified":"2010-09-21T14:17:38","modified_gmt":"2010-09-21T22:17:38","slug":"intitial-fgd-library-available","status":"publish","type":"post","link":"http:\/\/technofovea.com\/blog\/archives\/713","title":{"rendered":"Intitial FGD library available"},"content":{"rendered":"<p>I finally managed to tear myself away from the <a href=\"http:\/\/ai-contest.com\/\">Google AI Challenge<\/a> and packaged up some stuff for FGDs. Check the <a href=\"http:\/\/technofovea.com\/blog\/projects\/hl2parse\">Hl2Parse project page<\/a> for more.<\/p>\n<p>Quick code example:<\/p>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\r\nFile src = new File(&quot;test.fgd&quot;);\r\nFgdSpec spec = new FgdSpec();\r\n\/\/ If test.fgd uses an @include statement to \r\n\/\/ get another FGD, the DefaultLoader \r\n\/\/ will automatically handle it.\r\nDefaultLoader.fillSpec(src,spec);\r\n\/\/ Now you can pull information from spec\r\nfor(String name : spec.getEntClassNames()){\r\n    FgdEntClass eclass = spec.getEntClass(name);\r\n    System.out.println(&quot;Class &quot;+name+&quot; found of type &quot;+eclass.getType());\r\n}\r\n<\/pre>\n<p>This should give you output like:<\/p>\n<pre>\r\nClass base_prop_thing found of type BaseClass\r\nClass prop_thingy found of type PointClass\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>I finally managed to tear myself away from the Google AI Challenge and packaged up some stuff for FGDs. Check the Hl2Parse project page for more. Quick code example: This should give you output like: Class base_prop_thing found of type BaseClass Class prop_thingy found of type PointClass<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[4],"tags":[9,17],"_links":{"self":[{"href":"http:\/\/technofovea.com\/blog\/wp-json\/wp\/v2\/posts\/713"}],"collection":[{"href":"http:\/\/technofovea.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/technofovea.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/technofovea.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/technofovea.com\/blog\/wp-json\/wp\/v2\/comments?post=713"}],"version-history":[{"count":5,"href":"http:\/\/technofovea.com\/blog\/wp-json\/wp\/v2\/posts\/713\/revisions"}],"predecessor-version":[{"id":718,"href":"http:\/\/technofovea.com\/blog\/wp-json\/wp\/v2\/posts\/713\/revisions\/718"}],"wp:attachment":[{"href":"http:\/\/technofovea.com\/blog\/wp-json\/wp\/v2\/media?parent=713"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/technofovea.com\/blog\/wp-json\/wp\/v2\/categories?post=713"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/technofovea.com\/blog\/wp-json\/wp\/v2\/tags?post=713"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}