COOPY » Guide
version 0.6.5
|
#include <NameSniffer.h>
Public Member Functions | |
NameSniffer (const DataSheet &sheet, const coopy::cmp::CompareFlags &flags, bool autosniff=true) | |
void | sniff (int suggest=-1) |
bool | resniff (NameSniffer &alt) |
int | getHeaderHeight () const |
int | dataWidth () const |
int | dataHeight () const |
virtual std::string | suggestColumnName (int col) const |
virtual const ColumnType & | suggestColumnType (int col) const |
virtual const std::vector < std::string > & | suggestNames () const |
virtual const std::vector< int > & | getSubset () const |
virtual const std::vector < ColumnType > & | suggestTypes () const |
bool | isEmbedded () |
bool | isFake () |
bool | hasSubset () const |
bool | subset (std::vector< std::string > &names) |
Definition at line 16 of file NameSniffer.h.
coopy::store::NameSniffer::NameSniffer | ( | const DataSheet & | sheet, |
const coopy::cmp::CompareFlags & | flags, | ||
bool | autosniff = true |
||
) | [inline] |
Definition at line 29 of file NameSniffer.h.
References sniff().
int coopy::store::NameSniffer::dataHeight | ( | ) | const [inline] |
Definition at line 54 of file NameSniffer.h.
References coopy::store::DataSheet::height().
int coopy::store::NameSniffer::dataWidth | ( | ) | const [inline] |
Definition at line 50 of file NameSniffer.h.
References coopy::store::DataSheet::width().
int coopy::store::NameSniffer::getHeaderHeight | ( | ) | const [inline] |
Definition at line 45 of file NameSniffer.h.
Referenced by coopy::app::Diff::apply(), and coopy::store::SchemaSniffer::sniff().
virtual const std::vector<int>& coopy::store::NameSniffer::getSubset | ( | ) | const [inline, virtual] |
Definition at line 69 of file NameSniffer.h.
bool coopy::store::NameSniffer::hasSubset | ( | ) | const [inline] |
Definition at line 85 of file NameSniffer.h.
bool coopy::store::NameSniffer::isEmbedded | ( | ) | [inline] |
Definition at line 77 of file NameSniffer.h.
Referenced by coopy::app::Diff::apply(), and write().
bool coopy::store::NameSniffer::isFake | ( | ) | [inline] |
Definition at line 81 of file NameSniffer.h.
Referenced by resniff(), coopy::store::SchemaSniffer::sniff(), and write().
bool NameSniffer::resniff | ( | NameSniffer & | alt | ) |
Definition at line 249 of file NameSniffer.cpp.
References isFake(), and suggestNames().
void NameSniffer::sniff | ( | int | suggest = -1 | ) |
Definition at line 11 of file NameSniffer.cpp.
References COOPY_ASSERT, dbg_printf, coopy::cmp::DataStat::evaluate2(), coopy::store::SheetSchema::getColumnCount(), coopy::store::SheetSchema::getColumnInfo(), coopy::store::ColumnInfo::getColumnType(), coopy::store::ColumnInfo::getName(), coopy::cmp::DataStat::getRowDivider(), coopy::store::ColumnInfo::hasName(), coopy::store::SheetSchema::headerHeight(), coopy::store::SheetSchema::isGuess(), NULL, coopy::cmp::DataStat::suggestTypes(), and coopy::store::SheetSchema::toString().
Referenced by coopy::cmp::SheetCompare::compare(), coopy::cmp::Merger::merge(), and NameSniffer().
bool NameSniffer::subset | ( | std::vector< std::string > & | names | ) |
Definition at line 226 of file NameSniffer.cpp.
References dbg_printf.
Referenced by coopy::cmp::SheetCompare::compare().
std::string NameSniffer::suggestColumnName | ( | int | col | ) | const [virtual] |
Definition at line 218 of file NameSniffer.cpp.
References Stringer::getSpreadsheetColumnName().
Referenced by coopy::cmp::Patcher::addPoolsFromSchema(), coopy::app::Diff::apply(), coopy::cmp::BookCompare::create(), coopy::cmp::MergeOutputNovel::declareLink(), coopy::cmp::MergeOutputIndex::declareLink(), coopy::cmp::Merger::merge(), and write().
virtual const ColumnType& coopy::store::NameSniffer::suggestColumnType | ( | int | col | ) | const [inline, virtual] |
Definition at line 61 of file NameSniffer.h.
Referenced by coopy::cmp::Patcher::addPoolsFromSchema(), and coopy::cmp::MergeOutputIndex::declareLink().
virtual const std::vector<std::string>& coopy::store::NameSniffer::suggestNames | ( | ) | const [inline, virtual] |
Definition at line 65 of file NameSniffer.h.
Referenced by resniff(), and coopy::store::SchemaSniffer::sniff().
virtual const std::vector<ColumnType>& coopy::store::NameSniffer::suggestTypes | ( | ) | const [inline, virtual] |
Definition at line 73 of file NameSniffer.h.
Referenced by coopy::store::SchemaSniffer::sniff().