Thibaut Colar avatar Thibaut Colar committed 63c6238

Forgot a commit

Comments (0)

Files changed (1)

src/brie/fan/index/TrioModel.fan

+// History:
+//   12 7 12 Creation
+
+**
+** Trio tag/funcs info of a pod
+**
+const class TrioInfo
+{
+  new make(Str pod, Str:TagInfo tags, Str:FuncInfo funcs)
+  {
+    this.tags = tags
+    this.funcs = funcs
+    this.pod = pod
+  }
+
+  const Str pod
+  const Str:TagInfo tags
+  const Str:FuncInfo funcs
+}
+
+**
+** Model for trio function
+**
+const class FuncInfo
+{
+  const Str:Str data
+  const Str pod
+
+  new make(Str pod, Str:Str data) {this.data = data; this.pod = pod}
+
+  Str name() {data["name"] ?: ""}
+  Str doc() {data["doc"] ?: ""}
+  Str src() {data["src"] ?: ""}
+
+  ** Function signature ... not seing a tag fro that, so extracting from source
+  Str sig()
+  {
+    src := data["src"]
+    // probably dont need those checks but being safe
+    if(src!=null && src.contains("=>"))
+    {
+      sig := src[0 ..< src.index("=>")]
+      return "<b>${name}</b>${sig}"
+    }
+    else
+     return "<b>${name}</b>(?)"
+  }
+}
+
+**
+** Model for trio tag
+**
+const class TagInfo
+{
+  const Str:Str data
+  const Str pod
+
+  new make(Str pod, Str:Str data) {this.data = data; this.pod = pod}
+
+  Str name() {data["tag"] ?: ""}
+  Str doc() {data["doc"] ?: ""}
+  Str kind() {data["kind"] ?: ""}
+}
+
+
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.