From e1fa4a088dd95caef22045f905a9d5d22b71bef0 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Tue, 24 Jan 2017 21:50:39 -0500 Subject: Whitespace changes --- lib/pronunciation.cpp | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'lib/pronunciation.cpp') diff --git a/lib/pronunciation.cpp b/lib/pronunciation.cpp index f5b742f..e937ba6 100644 --- a/lib/pronunciation.cpp +++ b/lib/pronunciation.cpp @@ -6,64 +6,64 @@ #include "util.h" namespace verbly { - + const object pronunciation::objectType = object::pronunciation; - + const std::list pronunciation::select = {"pronunciation_id", "phonemes", "syllables", "stress", "prerhyme", "rhyme"}; - + const field pronunciation::id = field::integerField(object::pronunciation, "pronunciation_id"); const field pronunciation::numOfSyllables = field::integerField(object::pronunciation, "syllables"); const field pronunciation::stress = field::stringField(object::pronunciation, "stress"); - + const field pronunciation::form = field::joinThrough(object::pronunciation, "pronunciation_id", object::form, "forms_pronunciations", "form_id"); - + const field pronunciation::prerhyme = field::stringField(object::pronunciation, "prerhyme", true); const field pronunciation::rhyme = field::stringField(object::pronunciation, "rhyme", true); - + pronunciation::pronunciation(const database& db, sqlite3_stmt* row) : db_(&db), valid_(true) { id_ = sqlite3_column_int(row, 0); - + std::string phonemesStr(reinterpret_cast(sqlite3_column_text(row, 1))); phonemes_ = split>(phonemesStr, " "); - + syllables_ = sqlite3_column_int(row, 2); stress_ = std::string(reinterpret_cast(sqlite3_column_text(row, 3))); - + if (sqlite3_column_type(row, 5) != SQLITE_NULL) { hasRhyme_ = true; - + prerhyme_ = std::string(reinterpret_cast(sqlite3_column_text(row, 4))); rhyme_ = std::string(reinterpret_cast(sqlite3_column_text(row, 5))); } } - + filter pronunciation::rhymesWith(const pronunciation& arg) { return (prerhyme != arg.getPrerhyme()) && (rhyme == arg.getRhyme()); } - + /*filter pronunciation::rhymesWith(const class form& arg) { filter result; - + for (const pronunciation& p : arg.getPronunciations()) { result |= rhymesWith(p); } - + return result; } - + filter pronunciation::rhymesWith(const lemma& arg) { return rhymesWith(arg.getBaseForm()); } - + filter pronunciation::rhymesWith(const word& arg) { return rhymesWith(arg.getLemma()); }*/ - + }; -- cgit 1.4.1