ARB
|
#include <xml.hxx>
#include <arb_defs.h>
#include <arb_diff.h>
#include <static_assert.h>
#include <list>
#include <set>
#include <iostream>
#include <fstream>
#include <cstdlib>
#include <cstdarg>
#include <cstring>
#include <climits>
#include <unistd.h>
#include <sys/stat.h>
Go to the source code of this file.
Classes | |
class | LineAttachedMessage |
struct | MessageAttachable |
class | Reader |
class | Ostring |
class | FINAL_TYPE< SEQTYPE > |
xml element More... | |
class | Link |
class | Helpfile |
class | FINAL_TYPE< SEQTYPE > |
xml element More... | |
Macros | |
#define | h2x_assert(bed) arb_assert(bed) |
#define | MAX_LINE_LENGTH 200 |
#define | TABSIZE 8 |
#define | MAX_ALLOWED_ENUM 99 |
#define | PATHS 2 |
Typedefs | |
typedef list< Ostring > | Ostrings |
typedef list< Section > | SectionList |
typedef list< Link > | Links |
Enumerations | |
enum | SectionType { SEC_OCCURRENCE, SEC_DESCRIPTION, SEC_NOTES, SEC_EXAMPLES, SEC_WARNINGS, SEC_BUGS, SEC_SECTION, KNOWN_SECTION_TYPES, SEC_NONE, SEC_FAKE } |
enum | ParagraphType { PLAIN_TEXT, ENUMERATED, ITEM } |
enum | EnumerationType { NONE, DIGITS, ALPHA_UPPER, ALPHA_LOWER } |
enum | LinkType { LT_UNKNOWN = 0, LT_HTTP = 1, LT_HTTPS = 2, LT_FTP = 4, LT_FILE = 8, LT_EMAIL = 16, LT_HLP = 32, LT_PS = 64, LT_PDF = 128 } |
Functions | |
STATIC_ASSERT (ARRAY_ELEMS(knownSections)==KNOWN_SECTION_TYPES) | |
__ATTR__VFORMAT (1) static string vstrf(const char *format | |
while (1) | |
return | string (buffer, length) |
__ATTR__FORMAT (1) static string strf(const char *format | |
va_start (argPtr, format) | |
va_end (argPtr) | |
LineAttachedMessage | unattached_message (const string &message) |
void | add_warning (const LineAttachedMessage &laMsg) |
void | add_warning (const string &warning, size_t lineno) |
void | check_TODO (const char *, const Reader &) |
bool | isWhite (char c) |
bool | isEmptyOrComment (const char *s) |
const char * | extractKeyword (const char *line, string &keyword) |
const char * | eatWhite (const char *line) |
void | pushParagraph (Section &sec, string ¶graph, size_t lineNo, ParagraphType &type, EnumerationType &etype, unsigned num) |
const char * | firstChar (const char *s) |
bool | is_startof_itemlist_element (const char *contentStart) |
static EnumerationType | startsWithLetter (string &s, unsigned &number) |
static bool | startsWithNumber (string &s, unsigned &number) |
static EnumerationType | detectLineEnumType (string &line, unsigned &number) |
static void | parseSection (Section &sec, const char *line, int indentation, Reader &reader) |
void | check_specific_duplicates (const string &link, const Links &existing, bool add_warnings) |
void | check_duplicates (const string &link, const Links &uplinks, const Links &references, bool add_warnings) |
static void | warnAboutDuplicate (SectionList §ions) |
static bool | shouldReflow (const string &s, int &foundIndentation) |
static string | correctSpaces (const string &text, int change) |
static string | correctIndentation (const string &text, int change) |
size_t | countSpaces (const string &text) |
static size_t | scanMinIndentation (const string &text) |
static string | LinkType2id (LinkType type) |
const char * | getExtension (const string &name) |
static LinkType | detectLinkType (const string &link_target) |
static string | locate_helpfile (const string &helpname) |
static string | locate_document (const string &docname) |
static void | add_link_attributes (XML_Tag &link, LinkType type, const string &dest, size_t source_line) |
static void | print_XML_Text_expanding_links (const string &text, size_t lineNo) |
static void | create_top_links (const Links &links, const char *tag) |
static void | show_err (const string &err, size_t lineno, const string &helpfile) |
void | show_err (const LineAttachedMessage &line_err, const string &helpfile) |
void | show_warning (const LineAttachedMessage &line_err, const string &helpfile) |
void | show_warnings (const string &helpfile) |
static void | show_error_and_warnings (const LineAttachedMessage &error, const string &helpfile) |
int | ARB_main (int argc, char *argv[]) |
Variables | |
static const char * | knownSections [] |
va_list static argPtr size_t | buf_size = 256 |
static char * | buffer = new char[buf_size] |
size_t | length |
string | result = vstrf(format, argPtr) |
const size_t | NO_LINENUMBER_INFO = -1U |
static list< LineAttachedMessage > | warnings |
static const char * | link_id [] |
#define h2x_assert | ( | bed | ) | arb_assert(bed) |
Definition at line 33 of file arb_help2xml.cxx.
Referenced by ARB_main(), Reader::back(), correctSpaces(), Ostring::get_enum_type(), Ostring::get_number(), Ostring::Ostring(), parseSection(), Helpfile::readHelp(), shouldReflow(), startsWithLetter(), FINAL_TYPE< SEQTYPE >::takeAllInFrontOf(), while(), and Helpfile::writeXML().
#define MAX_LINE_LENGTH 200 |
Definition at line 56 of file arb_help2xml.cxx.
#define TABSIZE 8 |
Definition at line 57 of file arb_help2xml.cxx.
#define MAX_ALLOWED_ENUM 99 |
Definition at line 465 of file arb_help2xml.cxx.
Referenced by startsWithLetter(), and startsWithNumber().
#define PATHS 2 |
Referenced by locate_helpfile().
Definition at line 306 of file arb_help2xml.cxx.
typedef list<Section> SectionList |
Definition at line 345 of file arb_help2xml.cxx.
Definition at line 364 of file arb_help2xml.cxx.
enum SectionType |
Enumerator | |
---|---|
SEC_OCCURRENCE | |
SEC_DESCRIPTION | |
SEC_NOTES | |
SEC_EXAMPLES | |
SEC_WARNINGS | |
SEC_BUGS | |
SEC_SECTION | |
KNOWN_SECTION_TYPES | |
SEC_NONE | |
SEC_FAKE |
Definition at line 69 of file arb_help2xml.cxx.
enum ParagraphType |
Enumerator | |
---|---|
PLAIN_TEXT | |
ENUMERATED | |
ITEM |
Definition at line 240 of file arb_help2xml.cxx.
enum EnumerationType |
Enumerator | |
---|---|
NONE | |
DIGITS | |
ALPHA_UPPER | |
ALPHA_LOWER |
Definition at line 245 of file arb_help2xml.cxx.
enum LinkType |
Enumerator | |
---|---|
LT_UNKNOWN | |
LT_HTTP | |
LT_HTTPS | |
LT_FTP | |
LT_FILE | |
LT_EMAIL | |
LT_HLP | |
LT_PS | |
LT_PDF |
Definition at line 1232 of file arb_help2xml.cxx.
STATIC_ASSERT | ( | ARRAY_ELEMS(knownSections) | = =KNOWN_SECTION_TYPES | ) |
__ATTR__VFORMAT | ( | 1 | ) | const |
while | ( | 1 | ) |
Definition at line 90 of file arb_help2xml.cxx.
References buf_size, buffer, h2x_assert, and string().
Referenced by GBS_hash_next_element_that().
Referenced by add_link_attributes(), FailedAt::add_prefix(), XML_Text::add_son(), XML_Comment::add_son(), ARB_main(), ComplementLocation::as_string(), awt_radio_button::awar2db(), awt_create_input_mask(), LineReader::backLine(), ConfigMapping::config_string(), constCastTo(), conversion_function_name(), correctSpaces(), current_changed_cb(), detect_sina_version(), ed_submit_info_event_rm(), ArbMatchResultsManager::enumerate_results(), extractKeyword(), StringParser::extractWord(), find_data_file(), ArbMatchResultsManager::findResultSet(), GroupBuilder::generate_group_name(), ConfigDefinition::get_awar_name(), get_downgroups(), ConfigMapping::get_entries(), RegExpr::get_error(), PartialSequence::get_multilist(), GetImageFile(), BufferedFileReader::getLine_intern(), getLocalFlag(), ShaderPlugin::init_awars(), init_file_printing(), inputMaskFullname(), keptHitReason(), load_probe_collection(), QueryExpr::matches(), mp_file2list(), NT_importValidNames(), ArbMatchResultsManager::openResultsFile(), Parameter::Parameter(), gc_desc::parse_decl(), parseLocation(), parsePosition(), parseSection(), probe_match_event(), probe_match_with_specificity_event(), MultiFastaWriter::readData(), MultiFastaWriter::readString(), GEN_graphic::reinit_gen_root(), ArbProbeCollection::remove(), XML_Text::remove_son(), XML_Comment::remove_son(), StringParser::rest(), ArbMatchResult::result(), save_probe_list_to_DB(), SetVariables::set(), awt_mask_item::set_name(), GroupChanges::show_message(), store_cb(), throw_IO_error(), throwError(), ArbMatchResultsManager::updateResults(), ArbMatchResult::weightAndResult(), and while().
__ATTR__FORMAT | ( | 1 | ) | const |
va_start | ( | argPtr | , |
format | |||
) |
Referenced by aisc_create(), aisc_get(), aisc_nput(), aisc_put(), aisc_server_errorf(), AW_copy_GC_colors(), AW_manage_GC(), errorf(), formatted(), GB_export_errorf(), GB_find_executable(), GBS_global_string(), GBS_global_string_copy(), GBS_global_string_to_buffer(), GBS_strstruct::nprintf(), Writer::outf(), FileWriter::outf(), output::put(), strf(), throw_errorf(), and warningf().
va_end | ( | argPtr | ) |
LineAttachedMessage unattached_message | ( | const string & | message | ) |
Definition at line 136 of file arb_help2xml.cxx.
Referenced by ARB_main(), and Helpfile::readHelp().
|
inline |
Definition at line 140 of file arb_help2xml.cxx.
Referenced by add_link_attributes(), add_warning(), MessageAttachable::attach_warning(), check_specific_duplicates(), and parseSection().
Definition at line 143 of file arb_help2xml.cxx.
References add_warning().
Definition at line 315 of file arb_help2xml.cxx.
Referenced by parseSection(), and Helpfile::readHelp().
|
inline |
Definition at line 398 of file arb_help2xml.cxx.
Referenced by eatWhite(), firstChar(), isEmptyOrComment(), and shouldReflow().
|
inline |
Definition at line 400 of file arb_help2xml.cxx.
References isWhite().
Referenced by parseSection(), and Helpfile::readHelp().
Definition at line 410 of file arb_help2xml.cxx.
References line, NULp, arb_test::space(), and string().
Referenced by parseSection(), and Helpfile::readHelp().
Definition at line 428 of file arb_help2xml.cxx.
References isWhite(), and line.
Referenced by Helpfile::readHelp().
|
inline |
Definition at line 434 of file arb_help2xml.cxx.
References ENUMERATED, NONE, and PLAIN_TEXT.
Referenced by parseSection().
Definition at line 449 of file arb_help2xml.cxx.
Referenced by parseSection(), and translate_config_changed_cb().
|
inline |
Definition at line 454 of file arb_help2xml.cxx.
Referenced by parseSection().
|
static |
Definition at line 467 of file arb_help2xml.cxx.
References ALPHA_LOWER, ALPHA_UPPER, h2x_assert, MAX_ALLOWED_ENUM, and NONE.
Referenced by detectLineEnumType().
|
static |
Definition at line 495 of file arb_help2xml.cxx.
References MAX_ALLOWED_ENUM.
Referenced by detectLineEnumType().
|
static |
Definition at line 522 of file arb_help2xml.cxx.
References DIGITS, startsWithLetter(), and startsWithNumber().
Referenced by parseSection().
|
static |
Definition at line 527 of file arb_help2xml.cxx.
References add_warning(), ALPHA_LOWER, ALPHA_UPPER, MessageAttachable::attached_message(), Reader::back(), check_TODO(), detectLineEnumType(), DIGITS, ENUMERATED, extractKeyword(), firstChar(), Reader::getLineNo(), Reader::getNext(), h2x_assert, is_startof_itemlist_element(), isEmptyOrComment(), ITEM, line, NONE, PLAIN_TEXT, pushParagraph(), SEC_OCCURRENCE, string(), and type.
Referenced by Helpfile::readHelp().
|
inline |
Definition at line 630 of file arb_help2xml.cxx.
References add_warning(), link, and strf().
Referenced by check_duplicates(), and Helpfile::extractInternalLinks().
|
inline |
Definition at line 638 of file arb_help2xml.cxx.
References check_specific_duplicates().
Referenced by Helpfile::readHelp().
|
static |
Definition at line 765 of file arb_help2xml.cxx.
References CHAR, h2x_assert, and isWhite().
Definition at line 803 of file arb_help2xml.cxx.
References h2x_assert, and string().
Referenced by correctIndentation().
Definition at line 821 of file arb_help2xml.cxx.
References correctSpaces(), and result.
Definition at line 847 of file arb_help2xml.cxx.
Referenced by scanMinIndentation().
Definition at line 853 of file arb_help2xml.cxx.
References countSpaces(), and min.
Definition at line 1256 of file arb_help2xml.cxx.
Referenced by add_link_attributes().
Definition at line 1273 of file arb_help2xml.cxx.
References getExtension(), LT_EMAIL, LT_FILE, LT_FTP, LT_HLP, LT_HTTP, LT_HTTPS, LT_PDF, LT_PS, LT_UNKNOWN, and type.
Referenced by create_top_links(), and print_XML_Text_expanding_links().
Definition at line 1293 of file arb_help2xml.cxx.
References PATHS.
Referenced by add_link_attributes(), and locate_document().
Definition at line 1310 of file arb_help2xml.cxx.
References locate_helpfile().
Referenced by add_link_attributes().
|
static |
Definition at line 1320 of file arb_help2xml.cxx.
References add_warning(), LinkType2id(), locate_document(), locate_helpfile(), LT_HLP, LT_PDF, LT_PS, LT_UNKNOWN, strf(), and string().
Referenced by create_top_links(), and print_XML_Text_expanding_links().
Definition at line 1344 of file arb_help2xml.cxx.
References add_link_attributes(), detectLinkType(), and link.
Definition at line 1473 of file arb_help2xml.cxx.
References add_link_attributes(), detectLinkType(), link, and s.
Referenced by Helpfile::writeXML().
Definition at line 1609 of file arb_help2xml.cxx.
Referenced by show_err(), show_error_and_warnings(), and show_warning().
|
inline |
Definition at line 1621 of file arb_help2xml.cxx.
References LineAttachedMessage::Lineno(), LineAttachedMessage::Message(), and show_err().
|
inline |
Definition at line 1624 of file arb_help2xml.cxx.
References LineAttachedMessage::Lineno(), LineAttachedMessage::Message(), and show_err().
Referenced by show_warnings().
|
inline |
Definition at line 1627 of file arb_help2xml.cxx.
References show_warning().
Referenced by ARB_main(), and show_error_and_warnings().
|
static |
Definition at line 1632 of file arb_help2xml.cxx.
References show_err(), and show_warnings().
Referenced by ARB_main().
Definition at line 1637 of file arb_help2xml.cxx.
References dot(), EXIT_FAILURE, EXIT_SUCCESS, Helpfile::extractInternalLinks(), h2x_assert, help(), Helpfile::readHelp(), show_error_and_warnings(), show_warnings(), string(), unattached_message(), and Helpfile::writeXML().
|
static |
Definition at line 59 of file arb_help2xml.cxx.
|
static |
Definition at line 86 of file arb_help2xml.cxx.
Referenced by while().
Definition at line 87 of file arb_help2xml.cxx.
Referenced by while().
size_t length |
Definition at line 89 of file arb_help2xml.cxx.
Referenced by References::add_dbid(), addToAmbiguous(), aisc_check_error(), ali_aligner_column::ali_aligner_column(), ali_prealigner_column::ali_prealigner_column(), alignTo(), alignToNextRelative(), AP_probe_iterate_event(), AW_rgb16::AW_rgb16(), AW_window::button_length(), calc_probability(), CON_insertSequences(), PT_compressed::createFrom(), Feature::createGeneName(), dot_sequence_by_consensus(), drawIsland(), ED4_pfold_calculate_secstruct_match(), ED4_pfold_extend_nucleation_sites(), ED4_pfold_resolve_overlaps(), FastSearchSequence::fast_align(), fillSelNamList(), find_date_long_form(), GB_checksum(), gb_compress_by_dictionary(), GEN_root::GEN_root(), GEN_write_position(), genbank_date(), genbank_out_header(), get_atcc(), get_estimated_memory(), getParsedFontPart(), Item::getPrimerSequence(), chartable::SepBaseFreq::init(), insertSlaveBases(), isdatenum(), Item::Item(), AW_window::label_length(), main(), paup_print_line(), phylip_print_line(), primer_design_event_go(), primer_design_event_init(), Item::print(), probe_combi_statistic::print(), probe_tabs::probe_tabs(), PS_remove_bad_probes(), readCompactedSequence(), AW_window::refresh_toggle_field(), reverseComplement(), SpeciesMergeListLength(), Item::sprint(), SQ_ambiguities::SQ_count_ambiguities(), to_printable(), and FoundGroup::track_max_widths().
return result = vstrf(format, argPtr) |
Definition at line 111 of file arb_help2xml.cxx.
Referenced by addids_match_info(), aisc_server_load_token(), alignQuality(), an_get_short(), AP_dump_index_event(), AP_probe_iterate_event(), SaiBoolchainOperator::apply(), SaiAciApplicator::apply(), apply_auto_numeric_binop(), apply_double_binop(), apply_numeric_binop(), apply_to_origin(), applyToItemFoundByKey(), ARB_float_2_ascii(), ARB_getenv_ignore_empty(), arb_look_and_start_ptserver(), ARB_main(), arb_shell_expand(), ARB_strpartdup(), AW_extract_directory(), aw_help_search(), aw_question(), aw_ref_to_title(), AW_unfold_path(), aw_xkey_2_awkey(), awar_translate(), AWTC_makeUniqueShortName(), binop_compare(), binop_equals(), SEC_root::buildStructureString(), calc_diff(), probe_combi_statistic::calc_index_system3(), probe_combi_statistic::check_duplicates(), checkopt(), CON_calculate(), ConfigMapping::config_string(), PrefixIterator::copy(), correct_extension(), correctIndentation(), default_characters(), default_color(), ColorGroupDef::defaultColorgroupName(), ED4_folding_line::delete_member(), DI_MATRIX::detect_transformation(), dont_return_unchanged(), ED4_get_NDS_text(), encode_escaped_chars(), escapeString(), List< Type >::exchange_members(), List< Type >::exchange_positions(), execute_guarded(), execute_guarded_ClientCode(), EXP_find_experiment_by_id(), expandMore(), filter_columnstat_SAIs(), filter_posvar_SAI_for_ali(), RootSynchronizer::find_best_root_candidate(), findSegmentContaining(), FindType(), ArbDBWriter::finishSave(), firstCharOfAwarOrDefault(), chartable::SepBaseFreq::firstDifference(), TreeNode::fixDeletedSon(), flag_callback(), format(), fullMacroname(), g_b_read_number2(), GB_append_suffix(), GB_canonical_path(), GB_close(), GB_command_interpreter_in_env(), GB_concat_full_path(), GB_concat_path(), GB_find_all_files(), gb_find_internal(), GB_find_latest_file(), GB_get_callback_info(), GB_get_subfields(), GB_getenv(), gb_index_find(), GB_property_file(), GB_read_file(), GB_read_lossless_byte(), GB_read_lossless_float(), GB_read_lossless_int(), GBCMC_find(), gbcmc_key_alloc(), gbcmc_send_undo_info_commands(), gbcms_talking_undo(), GBK_assert_msg(), gbl_command(), gbl_do(), gbl_eval(), gbl_exec(), gbl_select(), gbl_taxonomy(), gbmGetMemImpl(), gbs_compress_command(), GBS_global_string(), GBS_global_string_copy(), GBS_incr_hash(), GBS_merge_tagged_strings(), GBS_modify_tagged_string_with_ACI(), GBS_ptserver_id_to_choice(), GBS_read_arb_tcp(), GBS_regreplace(), GBS_scan_arb_tcp_param(), GBS_unwrap_regexpr(), GBT_create_new_alignment(), GBT_gen_species_array(), GBT_get_alignment_type_string(), GBT_get_name_or_description(), GBT_get_names_of_species_in_tree(), GBT_is_partial(), GBT_read_as_string(), GBT_read_char_pntr(), GBT_read_float(), GBT_read_gene_sequence_and_length(), GBT_read_int(), GBT_read_string(), GBT_readOrCreate_char_pntr(), GBT_readOrCreate_float(), GBT_readOrCreate_int(), GBT_readOrCreate_string(), GBT_relativeMacroname(), GBT_tree_2_newick(), GBT_tree_info_string(), gde_filter_weights(), gen_find_gene_by_id(), genbank_date(), ED4_base::get_area_level(), RootSynchronizer::get_current_roots(), get_downgroups(), ArbTcpDat::get_entry(), get_file_content_for_viewer(), get_full_qualified_help_file_name(), TypedDatabaseCallback::get_info(), get_local_help_url(), get_match_hinfo_formatted(), get_match_info_formatted(), get_match_overlay(), List< Type >::get_next(), List< Type >::get_prev(), Pair::get_primers(), Pair::get_result(), get_taxonomy(), get_taxonomy_string(), get_upgroup(), get_upper_lower_cursor_pos(), ResourceStack::getEdge(), getenv_executable(), getenv_existing_directory(), getHitInfo(), ResourceStack::getNode(), getparamlist(), getParsedFontPart(), gets_noOverflow(), GS_calc_resulting_groupname(), ignore_arb_prop(), GenerationDuplicates::insert(), List< Type >::insert_after_current(), List< Type >::insert_at_pos(), List< Type >::insert_before_current(), AWT_translator::isStartOrStopCodon(), kill_verbose(), chartable::SepBaseFreq::lastDifference(), list_keywords(), SaiBoolchainOperator::make(), SaiAciApplicator::make(), makeFromConfigRule(), makeUniqueShortName(), matrix_config_changed_cb(), message_cb(), MG_create_current_field_content(), MG_create_field_content(), MG_export_fields(), MG_update_example(), modsai_cb(), ED4_cursor::move_cursor(), MP_get_comment(), MP_get_probes(), MP_is_probe(), ArbImporter::next_file(), NT_count_different_chars(), revcomp_op::operate(), unalign_op::operate(), shift_op::operate(), AttributeParser::parse(), AW_root::peek_key_event(), pngLoad(), AW_device::polygon(), AP_STACK< AP_tree_nlen >::pop(), PRD_strdup(), primer_design_event_go(), Pair::print(), probe_match_event(), propertyName(), ptpd_read_names(), readable_probe(), MultiFastaWriter::readData(), RefEntries::refresh_result_cb(), relative_inside(), List< Type >::remove_pos_from_list(), remove_redundant_translation(), ED4_terminal::resolve_pointer_to_char_pntr(), run_command(), safe_write(), scan_flag_parameter(), scan_keyword_parameter(), scan_long_parameter(), scan_optional_parameter(), scan_string_parameter(), ExportFieldScanner::scanFields(), ED4_manager::search_spec_child_rek(), searchParamsChanged(), set_field_of_queried_cb(), shortenLongString(), Generation::single_in_generation(), SQ_evaluate(), SQ_mark_species(), strndup(), probe_combi_statistic::sub_expected_children(), RegExpr::subexpr_match(), ARB_seqtree::take_seq(), test_address_valid(), SaiBoolRule::to_string(), PartQueue::to_string(), unEscapeString(), ED4_manager::update_bases_and_rebuild_consensi(), and XFER_getFullFTS().
const size_t NO_LINENUMBER_INFO = -1U |
Definition at line 134 of file arb_help2xml.cxx.
|
static |
Definition at line 139 of file arb_help2xml.cxx.
Referenced by ARB_main(), build_consensus_tree(), main(), and TREE_load_to_db().
|
static |
Definition at line 1244 of file arb_help2xml.cxx.