Commit Graph

7 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 fc8dc9d55e database: Design and test updates
I add:
- Autosaving option
- Real iterators
- Better accessor functions

The new design and unit test also allows me to remove the 300,000+ line
"database.good" file that the old tests were based on.

Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:05 -04:00
Anna Schumaker ee100c0238 filter: Implement a "to lowercase" function
This function will convert the provided text to lowercase.  This really
isn't a filter function, but the filter already implements a lowercase
cache that should be useful.

Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:56:57 -04:00
Anna Schumaker a50d8f6e0a database: Allow templated keys to the database index
This allows me to have a std::pair<> as a key if needed.

Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:56:56 -04:00
Anna Schumaker 99718ade43 filter: Update filter test for Index class removal
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:56:56 -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 2b15048777 filter: Implement text filtering
Because every programming project needs a test case centered around
Discworld quotes ...

Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:56:53 -04:00