core/filter: Clean up header file
Adjust commends and remove the filter namespace. Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
This commit is contained in:
parent
f2664aa8f2
commit
91239a392d
|
@ -1,4 +1,4 @@
|
|||
/**
|
||||
/*
|
||||
* Copyright 2013 (c) Anna Schumaker.
|
||||
*/
|
||||
|
||||
|
@ -9,7 +9,6 @@ extern "C" {
|
|||
#include <core/string.h>
|
||||
}
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
static struct database filter_index;
|
||||
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
/**
|
||||
/*
|
||||
* Copyright 2013 (c) Anna Schumaker.
|
||||
*
|
||||
* The filter layer is used to search for a subset of
|
||||
* songs based on an input string.
|
||||
*/
|
||||
#ifndef OCARINA_CORE_FILTER_H
|
||||
#define OCARINA_CORE_FILTER_H
|
||||
|
@ -8,32 +11,11 @@ extern "C" {
|
|||
#include <core/set.h>
|
||||
}
|
||||
|
||||
#include <string>
|
||||
|
||||
/**
|
||||
* The filter layer is used to find a subset of songs based on an input
|
||||
* string. Since this layer does text processing, it also provides a
|
||||
* functions for converting strings to lowercase.
|
||||
*
|
||||
* The text processing is mostly interested in alphanumeric characters, so
|
||||
* any special characters included in the input text will be stripped out.
|
||||
* Tabs, spaces and the following characters are used to delimit words:
|
||||
*
|
||||
* \/,;()_-~+"
|
||||
*/
|
||||
namespace filter {
|
||||
|
||||
/**
|
||||
* Converts the input text to lowercase and returns the result.
|
||||
*
|
||||
* @param text The text to be converted.
|
||||
* @return The lowercase form of the input text.
|
||||
*/
|
||||
std::string lowercase(const std::string &);
|
||||
|
||||
};
|
||||
|
||||
/* Called to initialize the filter index. */
|
||||
void filter_init();
|
||||
|
||||
/* Called to clean up the filter index. */
|
||||
void filter_deinit();
|
||||
|
||||
/* Add the input string to the index. */
|
||||
|
|
Loading…
Reference in New Issue