Commit Graph

8 Commits

Author SHA1 Message Date
Anna Schumaker 1b34a9a8a0 index: Update the index design
I updated the design and rewrote the unit tests.  This creates something
more consistent with how I ended up using the index.

Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:05 -04:00
Anna Schumaker 97d889531a index: Remove the index class
This patch updates the design so indexes are built upon databases using
a special IndexEntry.  I also updated the tests/index/ test to match
the new system, but I have not updated filter or group tests yet.

Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:56:56 -04:00
Anna Schumaker 629cbeb2e9 index: Add a print() function
This function is used in debug mode to print the current status of the
index.  I also created a print_keys() function to only list the keys.

Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:56:54 -04:00
Anna Schumaker 755785799b index: Make sure we can index into keys that don't exist
This should just return a set of size 0.

Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:56:53 -04:00
Anna Schumaker 379a96fe13 index: Add in save and load functionality
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:56:53 -04:00
Anna Schumaker be0d3f3da4 index: Implement most of the index
I have everything except for save() and load() written.  My unittest is
fairly comprehensive and tests everything implemented so far, so with
any luck putting in save() and load() features will go quickly.

Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:56:53 -04:00
Bryan Schumaker 33c80788b8 libsaria: Rewrite playlist filtering
I used to use my own inverted index implementation, which makes sense if
I'm searching all songs for a specific match.  Instead, GTK was visiting
each track and asking "does this song match?" and this requires a
different implementation.  So rather than make an index, instead I have
each track generate substrings for its tags and then I compare filter
text against the substring set.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-11-04 09:17:22 -05:00
Bryan Schumaker 258875bdb8 libsaria: Move header files out of include/libsaria/
Ocarina no longer has a header file subdirectory so there is no reason
to have a libsaria subdirectory anymore.  Putting header files directly
in the include/ directory is a bit simpler.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-09-12 08:15:31 -04:00