feisty meow concerns codebase
2.140
|
#include <bookmark_tree.h>
Public Member Functions | |
bookmark_tree () | |
virtual | ~bookmark_tree () |
DEFINE_CLASS_NAME ("bookmark_tree") | |
int | read_csv_file (const basis::astring &input_filename) |
inner_mark_tree * | process_category (const structures::string_array &items) |
void | process_link (const structures::string_array &items) |
void | process_comment (const basis::astring ¤t_line_in) |
inner_mark_tree * | find_parent (const basis::astring &parent_name) |
inner_mark_tree & | access_root () |
int | link_count () const |
int | category_count () const |
Static Public Member Functions | |
static void | break_name (const basis::astring &to_break, basis::astring &name, basis::astring &nick) |
static bool | magic_category_comparison (const basis::astring &a, const basis::astring &b) |
static basis::astring | prune_link_down (const basis::astring &to_prune) |
static bool | excellent_link_comparator (const basis::astring &a, const basis::astring &b) |
static bool | advance (int &index, const basis::astring &check, const basis::astring &finding) |
moves the "index" forward if the "finding" string is the head of "check". More... | |
static int | find_prune_point (const basis::astring &to_prune) |
attempts to locate the real start of the root URL in "to_prune". More... | |
Public Attributes | |
int | _line_number |
Definition at line 36 of file bookmark_tree.h.
bookmark_tree::bookmark_tree | ( | ) |
Definition at line 101 of file bookmark_tree.cpp.
|
virtual |
Definition at line 112 of file bookmark_tree.cpp.
References basis::WHACK().
inner_mark_tree & bookmark_tree::access_root | ( | ) |
Definition at line 134 of file bookmark_tree.cpp.
|
static |
moves the "index" forward if the "finding" string is the head of "check".
Definition at line 157 of file bookmark_tree.cpp.
References basis::astring::compare(), and basis::astring::length().
Referenced by find_prune_point().
|
static |
Definition at line 119 of file bookmark_tree.cpp.
References basis::astring::end(), basis::astring::find(), basis::negative(), basis::astring::strip_spaces(), basis::astring::substring(), and basis::astring::zap().
Referenced by magic_category_comparison(), and process_category().
|
inline |
Definition at line 87 of file bookmark_tree.h.
bookmark_tree::DEFINE_CLASS_NAME | ( | "bookmark_tree" | ) |
|
static |
Definition at line 181 of file bookmark_tree.cpp.
References basis::astring::compare(), find_prune_point(), basis::astring::length(), and basis::maximum().
Referenced by process_link().
inner_mark_tree * bookmark_tree::find_parent | ( | const basis::astring & | parent_name | ) |
Definition at line 191 of file bookmark_tree.cpp.
References _line_number, nodes::tree::attach(), ESTIMATED_ELEMENTS, nodes::symbol_tree::find(), FUNCDEF, LOG, magic_category_comparison(), nodes::symbol_tree::recurse_downward, nodes::symbol_tree::recurse_upward, and nodes::symbol_tree::sort().
Referenced by process_category(), and process_link().
|
static |
attempts to locate the real start of the root URL in "to_prune".
Definition at line 166 of file bookmark_tree.cpp.
References advance(), FTP_HEAD, FTP_SITE, HTTP_HEAD, and WWW_SITE.
Referenced by excellent_link_comparator(), and prune_link_down().
|
inline |
Definition at line 85 of file bookmark_tree.h.
|
static |
Definition at line 136 of file bookmark_tree.cpp.
References break_name(), FUNCDEF, basis::astring::iequals(), and basis::astring::t().
Referenced by find_parent(), and process_category().
inner_mark_tree * bookmark_tree::process_category | ( | const structures::string_array & | items | ) |
fake_it = (inner_mark_tree *)_mark_tree->find(*found2, symbol_tree::recurse_downward);
Definition at line 245 of file bookmark_tree.cpp.
References _line_number, structures::symbol_table< contents >::add(), nodes::tree::attach(), nodes::symbol_tree::branch(), nodes::tree::branches(), break_name(), case_insense_compare(), deadly_error, DEADLY_LINE, ESTIMATED_ELEMENTS, structures::symbol_table< contents >::find(), nodes::symbol_tree::find(), find_parent(), FUNCDEF, basis::array< contents >::length(), LOG, magic_category_comparison(), nodes::symbol_tree::name(), non_continuable_error, NULL_POINTER, nodes::symbol_tree::recurse_downward, and nodes::symbol_tree::sort().
Referenced by read_csv_file().
void bookmark_tree::process_comment | ( | const basis::astring & | current_line_in | ) |
Definition at line 410 of file bookmark_tree.cpp.
References _line_number, inner_mark_tree::_links, listo_links::add(), basis::astring::contains(), basis::astring::find(), FUNCDEF, basis::astring::t(), and basis::astring::zap().
Referenced by read_csv_file().
void bookmark_tree::process_link | ( | const structures::string_array & | items | ) |
Definition at line 366 of file bookmark_tree.cpp.
References _line_number, inner_mark_tree::_links, listo_links::add(), basis::astring::end(), excellent_link_comparator(), find_parent(), FUNCDEF, basis::array< contents >::length(), LOG, prune_link_down(), and basis::astring::zap().
Referenced by read_csv_file().
|
static |
Definition at line 176 of file bookmark_tree.cpp.
References basis::astring::end(), find_prune_point(), and basis::astring::substring().
Referenced by process_link().
int bookmark_tree::read_csv_file | ( | const basis::astring & | input_filename | ) |
Definition at line 433 of file bookmark_tree.cpp.
References _line_number, DEADLY_LINE, basis::astring::end(), FUNCDEF, filesystem::byte_filer::getline(), filesystem::byte_filer::good(), is_eol(), basis::array< contents >::length(), basis::astring::length(), LOG, MAX_LINE_SIZE, non_continuable_error, process_category(), process_comment(), process_link(), basis::astring::strip_spaces(), and basis::astring::zap().
int bookmark_tree::_line_number |
Definition at line 90 of file bookmark_tree.h.
Referenced by find_parent(), process_category(), process_comment(), process_link(), and read_csv_file().