Code clean-up

This commit is contained in:
2016-10-13 09:01:23 +02:00
parent f51c4dbbec
commit affe7b06a2
7 changed files with 98 additions and 18 deletions

View File

@@ -231,6 +231,17 @@ namespace ZRCola {
///
inline character_db() : idxChr(data) {}
///
/// Clears the database
///
inline void clear()
{
idxChr .clear();
idxDsc .clear();
idxDscSub.clear();
data .clear();
}
///
/// Search for characters by description in given categories
///
@@ -379,6 +390,16 @@ namespace ZRCola {
/// Constructs the database
///
inline chrcat_db() : idxChrCat(data), idxRnk(data) {}
///
/// Clears the database
///
inline void clear()
{
idxChrCat.clear();
idxRnk .clear();
data .clear();
}
};

View File

@@ -439,6 +439,17 @@ namespace ZRCola {
textindex() {}
///
/// Clears the index
///
inline void clear()
{
std::vector< mappair_t<T_idx> >::clear();
keys .clear();
values.clear();
}
///
/// Finds data for given key
///

View File

@@ -175,6 +175,18 @@ namespace ZRCola {
#endif
{}
///
/// Clears the database
///
inline void clear()
{
idxChr.clear();
#ifdef ZRCOLA_LANGCHAR_LANG_IDX
idxLng.clear();
#endif
data .clear();
}
///
/// Tests presence of character in the given language
///
@@ -248,6 +260,15 @@ namespace ZRCola {
/// Constructs the database
///
inline language_db() : idxLng(data) {}
///
/// Clears the database
///
inline void clear()
{
idxLng.clear();
data .clear();
}
};

View File

@@ -170,6 +170,16 @@ namespace ZRCola {
/// Constructs the database
///
inline chrtag_db() : idxChr(data), idxTag(data) {}
///
/// Clears the database
///
inline void clear()
{
idxChr.clear();
idxTag.clear();
data .clear();
}
};
@@ -292,6 +302,15 @@ namespace ZRCola {
///
inline tagname_db() : idxName(data) {}
///
/// Clears the database
///
inline void clear()
{
idxName.clear();
data .clear();
}
///
/// Search for tags by names
///

View File

@@ -204,6 +204,16 @@ namespace ZRCola {
///
inline translation_db() : idxComp(data), idxDecomp(data) {}
///
/// Clears the database
///
inline void clear()
{
idxComp .clear();
idxDecomp.clear();
data .clear();
}
///
/// Composes string
///